UNPKG

echofi-client

Version:

A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.

1,681 lines (1,478 loc) 110 kB
// source: user/service.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 user_user_pb = require('../user/user_pb.js'); goog.object.extend(proto, user_user_pb); goog.exportSymbol('proto.user.CheckEmailLinkingRequest', null, global); goog.exportSymbol('proto.user.CheckEmailLinkingResponse', null, global); goog.exportSymbol('proto.user.CheckWalletLinkingRequest', null, global); goog.exportSymbol('proto.user.CheckWalletLinkingResponse', null, global); goog.exportSymbol('proto.user.ExistingUserInfo', null, global); goog.exportSymbol('proto.user.GetUserAuthStateRequest', null, global); goog.exportSymbol('proto.user.GetUserAuthStateResponse', null, global); goog.exportSymbol('proto.user.GetUserRequest', null, global); goog.exportSymbol('proto.user.GetUserResponse', null, global); goog.exportSymbol('proto.user.LinkEmailToUserRequest', null, global); goog.exportSymbol('proto.user.LinkEmailToUserResponse', null, global); goog.exportSymbol('proto.user.LinkWalletToUserRequest', null, global); goog.exportSymbol('proto.user.LinkWalletToUserResponse', null, global); goog.exportSymbol('proto.user.ListUsersRequest', null, global); goog.exportSymbol('proto.user.ListUsersResponse', null, global); goog.exportSymbol('proto.user.UpdateUserRequest', null, global); goog.exportSymbol('proto.user.UpdateUserResponse', 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.user.GetUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.GetUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.GetUserRequest.displayName = 'proto.user.GetUserRequest'; } /** * 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.user.GetUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.GetUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.GetUserResponse.displayName = 'proto.user.GetUserResponse'; } /** * 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.user.UpdateUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.UpdateUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.UpdateUserRequest.displayName = 'proto.user.UpdateUserRequest'; } /** * 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.user.UpdateUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.UpdateUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.UpdateUserResponse.displayName = 'proto.user.UpdateUserResponse'; } /** * 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.user.ListUsersRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.ListUsersRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.ListUsersRequest.displayName = 'proto.user.ListUsersRequest'; } /** * 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.user.ListUsersResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.user.ListUsersResponse.repeatedFields_, null); }; goog.inherits(proto.user.ListUsersResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.ListUsersResponse.displayName = 'proto.user.ListUsersResponse'; } /** * 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.user.CheckWalletLinkingRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.CheckWalletLinkingRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.CheckWalletLinkingRequest.displayName = 'proto.user.CheckWalletLinkingRequest'; } /** * 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.user.CheckWalletLinkingResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.CheckWalletLinkingResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.CheckWalletLinkingResponse.displayName = 'proto.user.CheckWalletLinkingResponse'; } /** * 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.user.LinkWalletToUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.LinkWalletToUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.LinkWalletToUserRequest.displayName = 'proto.user.LinkWalletToUserRequest'; } /** * 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.user.LinkWalletToUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.LinkWalletToUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.LinkWalletToUserResponse.displayName = 'proto.user.LinkWalletToUserResponse'; } /** * 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.user.CheckEmailLinkingRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.CheckEmailLinkingRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.CheckEmailLinkingRequest.displayName = 'proto.user.CheckEmailLinkingRequest'; } /** * 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.user.CheckEmailLinkingResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.CheckEmailLinkingResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.CheckEmailLinkingResponse.displayName = 'proto.user.CheckEmailLinkingResponse'; } /** * 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.user.LinkEmailToUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.LinkEmailToUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.LinkEmailToUserRequest.displayName = 'proto.user.LinkEmailToUserRequest'; } /** * 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.user.LinkEmailToUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.LinkEmailToUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.LinkEmailToUserResponse.displayName = 'proto.user.LinkEmailToUserResponse'; } /** * 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.user.GetUserAuthStateRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.GetUserAuthStateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.GetUserAuthStateRequest.displayName = 'proto.user.GetUserAuthStateRequest'; } /** * 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.user.GetUserAuthStateResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.GetUserAuthStateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.GetUserAuthStateResponse.displayName = 'proto.user.GetUserAuthStateResponse'; } /** * 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.user.ExistingUserInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.user.ExistingUserInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.user.ExistingUserInfo.displayName = 'proto.user.ExistingUserInfo'; } 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.user.GetUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.user.GetUserRequest.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.user.GetUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.GetUserRequest.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.user.GetUserRequest} */ proto.user.GetUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.GetUserRequest; return proto.user.GetUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.user.GetUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.user.GetUserRequest} */ proto.user.GetUserRequest.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.user.GetUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.user.GetUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.user.GetUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.GetUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } }; /** * optional string id = 1; * @return {string} */ proto.user.GetUserRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.user.GetUserRequest} returns this */ proto.user.GetUserRequest.prototype.setId = function(value) { return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. * @return {!proto.user.GetUserRequest} returns this */ proto.user.GetUserRequest.prototype.clearId = function() { return jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.GetUserRequest.prototype.hasId = 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.user.GetUserResponse.prototype.toObject = function(opt_includeInstance) { return proto.user.GetUserResponse.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.user.GetUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.GetUserResponse.toObject = function(includeInstance, msg) { var f, obj = { user: (f = msg.getUser()) && user_user_pb.User.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.user.GetUserResponse} */ proto.user.GetUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.GetUserResponse; return proto.user.GetUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.user.GetUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.user.GetUserResponse} */ proto.user.GetUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new user_user_pb.User; reader.readMessage(value,user_user_pb.User.deserializeBinaryFromReader); msg.setUser(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.user.GetUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.user.GetUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.user.GetUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.GetUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUser(); if (f != null) { writer.writeMessage( 1, f, user_user_pb.User.serializeBinaryToWriter ); } }; /** * optional User user = 1; * @return {?proto.user.User} */ proto.user.GetUserResponse.prototype.getUser = function() { return /** @type{?proto.user.User} */ ( jspb.Message.getWrapperField(this, user_user_pb.User, 1)); }; /** * @param {?proto.user.User|undefined} value * @return {!proto.user.GetUserResponse} returns this */ proto.user.GetUserResponse.prototype.setUser = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.user.GetUserResponse} returns this */ proto.user.GetUserResponse.prototype.clearUser = function() { return this.setUser(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.GetUserResponse.prototype.hasUser = 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.user.UpdateUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.user.UpdateUserRequest.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.user.UpdateUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.UpdateUserRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), image: jspb.Message.getFieldWithDefault(msg, 3, ""), background: jspb.Message.getFieldWithDefault(msg, 4, ""), username: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.user.UpdateUserRequest} */ proto.user.UpdateUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.UpdateUserRequest; return proto.user.UpdateUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.user.UpdateUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.user.UpdateUserRequest} */ proto.user.UpdateUserRequest.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.setName(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setImage(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setBackground(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setUsername(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.user.UpdateUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.user.UpdateUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.user.UpdateUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.UpdateUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeString( 3, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 4)); if (f != null) { writer.writeString( 4, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 5)); if (f != null) { writer.writeString( 5, f ); } }; /** * optional string id = 1; * @return {string} */ proto.user.UpdateUserRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.setId = function(value) { return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.clearId = function() { return jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.UpdateUserRequest.prototype.hasId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string name = 2; * @return {string} */ proto.user.UpdateUserRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.setName = function(value) { return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.clearName = function() { return jspb.Message.setField(this, 2, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.UpdateUserRequest.prototype.hasName = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional string image = 3; * @return {string} */ proto.user.UpdateUserRequest.prototype.getImage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.setImage = function(value) { return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.clearImage = function() { return jspb.Message.setField(this, 3, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.UpdateUserRequest.prototype.hasImage = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string background = 4; * @return {string} */ proto.user.UpdateUserRequest.prototype.getBackground = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.setBackground = function(value) { return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.clearBackground = function() { return jspb.Message.setField(this, 4, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.UpdateUserRequest.prototype.hasBackground = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional string username = 5; * @return {string} */ proto.user.UpdateUserRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.setUsername = function(value) { return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. * @return {!proto.user.UpdateUserRequest} returns this */ proto.user.UpdateUserRequest.prototype.clearUsername = function() { return jspb.Message.setField(this, 5, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.UpdateUserRequest.prototype.hasUsername = 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.user.UpdateUserResponse.prototype.toObject = function(opt_includeInstance) { return proto.user.UpdateUserResponse.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.user.UpdateUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.UpdateUserResponse.toObject = function(includeInstance, msg) { var f, obj = { user: (f = msg.getUser()) && user_user_pb.User.toObject(includeInstance, f), message: 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.user.UpdateUserResponse} */ proto.user.UpdateUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.UpdateUserResponse; return proto.user.UpdateUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.user.UpdateUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.user.UpdateUserResponse} */ proto.user.UpdateUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new user_user_pb.User; reader.readMessage(value,user_user_pb.User.deserializeBinaryFromReader); msg.setUser(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.user.UpdateUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.user.UpdateUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.user.UpdateUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.UpdateUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUser(); if (f != null) { writer.writeMessage( 1, f, user_user_pb.User.serializeBinaryToWriter ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional User user = 1; * @return {?proto.user.User} */ proto.user.UpdateUserResponse.prototype.getUser = function() { return /** @type{?proto.user.User} */ ( jspb.Message.getWrapperField(this, user_user_pb.User, 1)); }; /** * @param {?proto.user.User|undefined} value * @return {!proto.user.UpdateUserResponse} returns this */ proto.user.UpdateUserResponse.prototype.setUser = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.user.UpdateUserResponse} returns this */ proto.user.UpdateUserResponse.prototype.clearUser = function() { return this.setUser(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.user.UpdateUserResponse.prototype.hasUser = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string message = 2; * @return {string} */ proto.user.UpdateUserResponse.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.user.UpdateUserResponse} returns this */ proto.user.UpdateUserResponse.prototype.setMessage = 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.user.ListUsersRequest.prototype.toObject = function(opt_includeInstance) { return proto.user.ListUsersRequest.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.user.ListUsersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.ListUsersRequest.toObject = function(includeInstance, msg) { var f, obj = { offset: jspb.Message.getFieldWithDefault(msg, 1, 0), limit: jspb.Message.getFieldWithDefault(msg, 2, 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.user.ListUsersRequest} */ proto.user.ListUsersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.ListUsersRequest; return proto.user.ListUsersRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.user.ListUsersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.user.ListUsersRequest} */ proto.user.ListUsersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setOffset(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setLimit(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.user.ListUsersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.user.ListUsersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.user.ListUsersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.ListUsersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOffset(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getLimit(); if (f !== 0) { writer.writeInt32( 2, f ); } }; /** * optional int32 offset = 1; * @return {number} */ proto.user.ListUsersRequest.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.user.ListUsersRequest} returns this */ proto.user.ListUsersRequest.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int32 limit = 2; * @return {number} */ proto.user.ListUsersRequest.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.user.ListUsersRequest} returns this */ proto.user.ListUsersRequest.prototype.setLimit = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.user.ListUsersResponse.repeatedFields_ = [1]; 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.user.ListUsersResponse.prototype.toObject = function(opt_includeInstance) { return proto.user.ListUsersResponse.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.user.ListUsersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.ListUsersResponse.toObject = function(includeInstance, msg) { var f, obj = { usersList: jspb.Message.toObjectList(msg.getUsersList(), user_user_pb.User.toObject, includeInstance), total: jspb.Message.getFieldWithDefault(msg, 2, 0), offset: jspb.Message.getFieldWithDefault(msg, 3, 0), limit: jspb.Message.getFieldWithDefault(msg, 4, 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.user.ListUsersResponse} */ proto.user.ListUsersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.ListUsersResponse; return proto.user.ListUsersResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.user.ListUsersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.user.ListUsersResponse} */ proto.user.ListUsersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new user_user_pb.User; reader.readMessage(value,user_user_pb.User.deserializeBinaryFromReader); msg.addUsers(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setTotal(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setOffset(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setLimit(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.user.ListUsersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.user.ListUsersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.user.ListUsersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.ListUsersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUsersList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, user_user_pb.User.serializeBinaryToWriter ); } f = message.getTotal(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getOffset(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getLimit(); if (f !== 0) { writer.writeInt32( 4, f ); } }; /** * repeated User users = 1; * @return {!Array<!proto.user.User>} */ proto.user.ListUsersResponse.prototype.getUsersList = function() { return /** @type{!Array<!proto.user.User>} */ ( jspb.Message.getRepeatedWrapperField(this, user_user_pb.User, 1)); }; /** * @param {!Array<!proto.user.User>} value * @return {!proto.user.ListUsersResponse} returns this */ proto.user.ListUsersResponse.prototype.setUsersList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.user.User=} opt_value * @param {number=} opt_index * @return {!proto.user.User} */ proto.user.ListUsersResponse.prototype.addUsers = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.user.User, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.user.ListUsersResponse} returns this */ proto.user.ListUsersResponse.prototype.clearUsersList = function() { return this.setUsersList([]); }; /** * optional int64 total = 2; * @return {number} */ proto.user.ListUsersResponse.prototype.getTotal = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.user.ListUsersResponse} returns this */ proto.user.ListUsersResponse.prototype.setTotal = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int32 offset = 3; * @return {number} */ proto.user.ListUsersResponse.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.user.ListUsersResponse} returns this */ proto.user.ListUsersResponse.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int32 limit = 4; * @return {number} */ proto.user.ListUsersResponse.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.user.ListUsersResponse} returns this */ proto.user.ListUsersResponse.prototype.setLimit = function(value) { return jspb.Message.setProto3IntField(this, 4, 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.user.CheckWalletLinkingRequest.prototype.toObject = function(opt_includeInstance) { return proto.user.CheckWalletLinkingRequest.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.user.CheckWalletLinkingRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.user.CheckWalletLinkingRequest.toObject = function(includeInstance, msg) { var f, obj = { walletAddress: 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.user.CheckWalletLinkingRequest} */ proto.user.CheckWalletLinkingRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.user.CheckWalletLinkingRequest; return proto.user.CheckWalletLinkingRequest.deserializeBinaryFromReader(ms