text: // source: user.proto
  /**
   * @fileoverview
   * @enhanceable
   * @suppress {messageConventions} JS Compiler reports an error if a variable or
   *     field starts with 'MSG_' and isn't a translatable message.
   * @public
   */
  // GENERATED CODE -- DO NOT EDIT!
  /* eslint-disable */
  // @ts-nocheck
  
  var jspb = require('google-protobuf');
  var goog = jspb;
  var global = Function('return this')();
  
  goog.exportSymbol('proto.User', null, global);
  goog.exportSymbol('proto.User.UserType', null, global);
  goog.exportSymbol('proto.UserRequest', null, global);
  goog.exportSymbol('proto.UserResponse', 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 = function(opt_data) {
    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  };
  goog.inherits(proto.User, jspb.Message);
  if (goog.DEBUG && !COMPILED) {
    /**
     * @public
     * @override
     */
    proto.User.displayName = 'proto.User';
  }
  /**
   * 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.UserRequest = function(opt_data) {
    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  };
  goog.inherits(proto.UserRequest, jspb.Message);
  if (goog.DEBUG && !COMPILED) {
    /**
     * @public
     * @override
     */
    proto.UserRequest.displayName = 'proto.UserRequest';
  }
  /**
   * 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.UserResponse = function(opt_data) {
    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  };
  goog.inherits(proto.UserResponse, jspb.Message);
  if (goog.DEBUG && !COMPILED) {
    /**
     * @public
     * @override
     */
    proto.UserResponse.displayName = 'proto.UserResponse';
  }
  
  
  
  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.prototype.toObject = function(opt_includeInstance) {
    return proto.User.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} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.User.toObject = function(includeInstance, msg) {
    var f, obj = {
      id: jspb.Message.getFieldWithDefault(msg, 1, 0),
      nickname: jspb.Message.getFieldWithDefault(msg, 2, ""),
      mailAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
      userType: 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}
   */
  proto.User.deserializeBinary = function(bytes) {
    var reader = new jspb.BinaryReader(bytes);
    var msg = new proto.User;
    return proto.User.deserializeBinaryFromReader(msg, reader);
  };
  
  
  /**
   * Deserializes binary data (in protobuf wire format) from the
   * given reader into the given message object.
   * @param {!proto.User} msg The message object to deserialize into.
   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   * @return {!proto.User}
   */
  proto.User.deserializeBinaryFromReader = function(msg, reader) {
    while (reader.nextField()) {
      if (reader.isEndGroup()) {
        break;
      }
      var field = reader.getFieldNumber();
      switch (field) {
      case 1:
        var value = /** @type {number} */ (reader.readUint32());
        msg.setId(value);
        break;
      case 2:
        var value = /** @type {string} */ (reader.readString());
        msg.setNickname(value);
        break;
      case 3:
        var value = /** @type {string} */ (reader.readString());
        msg.setMailAddress(value);
        break;
      case 4:
        var value = /** @type {!proto.User.UserType} */ (reader.readEnum());
        msg.setUserType(value);
        break;
      default:
        reader.skipField();
        break;
      }
    }
    return msg;
  };
  
  
  /**
   * Serializes the message to binary data (in protobuf wire format).
   * @return {!Uint8Array}
   */
  proto.User.prototype.serializeBinary = function() {
    var writer = new jspb.BinaryWriter();
    proto.User.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} message
   * @param {!jspb.BinaryWriter} writer
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.User.serializeBinaryToWriter = function(message, writer) {
    var f = undefined;
    f = message.getId();
    if (f !== 0) {
      writer.writeUint32(
        1,
        f
      );
    }
    f = message.getNickname();
    if (f.length > 0) {
      writer.writeString(
        2,
        f
      );
    }
    f = message.getMailAddress();
    if (f.length > 0) {
      writer.writeString(
        3,
        f
      );
    }
    f = message.getUserType();
    if (f !== 0.0) {
      writer.writeEnum(
        4,
        f
      );
    }
  };
  
  
  /**
   * @enum {number}
   */
  proto.User.UserType = {
    NORMAL: 0,
    ADMINISTRATOR: 1,
    GUEST: 2,
    DISABLED: 3
  };
  
  /**
   * optional uint32 id = 1;
   * @return {number}
   */
  proto.User.prototype.getId = function() {
    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  };
  
  
  /**
   * @param {number} value
   * @return {!proto.User} returns this
   */
  proto.User.prototype.setId = function(value) {
    return jspb.Message.setProto3IntField(this, 1, value);
  };
  
  
  /**
   * optional string nickname = 2;
   * @return {string}
   */
  proto.User.prototype.getNickname = function() {
    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  };
  
  
  /**
   * @param {string} value
   * @return {!proto.User} returns this
   */
  proto.User.prototype.setNickname = function(value) {
    return jspb.Message.setProto3StringField(this, 2, value);
  };
  
  
  /**
   * optional string mail_address = 3;
   * @return {string}
   */
  proto.User.prototype.getMailAddress = function() {
    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  };
  
  
  /**
   * @param {string} value
   * @return {!proto.User} returns this
   */
  proto.User.prototype.setMailAddress = function(value) {
    return jspb.Message.setProto3StringField(this, 3, value);
  };
  
  
  /**
   * optional UserType user_type = 4;
   * @return {!proto.User.UserType}
   */
  proto.User.prototype.getUserType = function() {
    return /** @type {!proto.User.UserType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  };
  
  
  /**
   * @param {!proto.User.UserType} value
   * @return {!proto.User} returns this
   */
  proto.User.prototype.setUserType = function(value) {
    return jspb.Message.setProto3EnumField(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.UserRequest.prototype.toObject = function(opt_includeInstance) {
    return proto.UserRequest.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.UserRequest} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.UserRequest.toObject = function(includeInstance, msg) {
    var f, obj = {
      id: jspb.Message.getFieldWithDefault(msg, 1, 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.UserRequest}
   */
  proto.UserRequest.deserializeBinary = function(bytes) {
    var reader = new jspb.BinaryReader(bytes);
    var msg = new proto.UserRequest;
    return proto.UserRequest.deserializeBinaryFromReader(msg, reader);
  };
  
  
  /**
   * Deserializes binary data (in protobuf wire format) from the
   * given reader into the given message object.
   * @param {!proto.UserRequest} msg The message object to deserialize into.
   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   * @return {!proto.UserRequest}
   */
  proto.UserRequest.deserializeBinaryFromReader = function(msg, reader) {
    while (reader.nextField()) {
      if (reader.isEndGroup()) {
        break;
      }
      var field = reader.getFieldNumber();
      switch (field) {
      case 1:
        var value = /** @type {number} */ (reader.readUint32());
        msg.setId(value);
        break;
      default:
        reader.skipField();
        break;
      }
    }
    return msg;
  };
  
  
  /**
   * Serializes the message to binary data (in protobuf wire format).
   * @return {!Uint8Array}
   */
  proto.UserRequest.prototype.serializeBinary = function() {
    var writer = new jspb.BinaryWriter();
    proto.UserRequest.serializeBinaryToWriter(this, writer);
    return writer.getResultBuffer();
  };
  
  
  /**
   * Serializes the given message to binary data (in protobuf wire
   * format), writing to the given BinaryWriter.
   * @param {!proto.UserRequest} message
   * @param {!jspb.BinaryWriter} writer
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.UserRequest.serializeBinaryToWriter = function(message, writer) {
    var f = undefined;
    f = message.getId();
    if (f !== 0) {
      writer.writeUint32(
        1,
        f
      );
    }
  };
  
  
  /**
   * optional uint32 id = 1;
   * @return {number}
   */
  proto.UserRequest.prototype.getId = function() {
    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  };
  
  
  /**
   * @param {number} value
   * @return {!proto.UserRequest} returns this
   */
  proto.UserRequest.prototype.setId = function(value) {
    return jspb.Message.setProto3IntField(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.UserResponse.prototype.toObject = function(opt_includeInstance) {
    return proto.UserResponse.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.UserResponse} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.UserResponse.toObject = function(includeInstance, msg) {
    var f, obj = {
      error: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
      message: jspb.Message.getFieldWithDefault(msg, 2, ""),
      user: (f = msg.getUser()) && proto.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.UserResponse}
   */
  proto.UserResponse.deserializeBinary = function(bytes) {
    var reader = new jspb.BinaryReader(bytes);
    var msg = new proto.UserResponse;
    return proto.UserResponse.deserializeBinaryFromReader(msg, reader);
  };
  
  
  /**
   * Deserializes binary data (in protobuf wire format) from the
   * given reader into the given message object.
   * @param {!proto.UserResponse} msg The message object to deserialize into.
   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   * @return {!proto.UserResponse}
   */
  proto.UserResponse.deserializeBinaryFromReader = function(msg, reader) {
    while (reader.nextField()) {
      if (reader.isEndGroup()) {
        break;
      }
      var field = reader.getFieldNumber();
      switch (field) {
      case 1:
        var value = /** @type {boolean} */ (reader.readBool());
        msg.setError(value);
        break;
      case 2:
        var value = /** @type {string} */ (reader.readString());
        msg.setMessage(value);
        break;
      case 3:
        var value = new proto.User;
        reader.readMessage(value,proto.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.UserResponse.prototype.serializeBinary = function() {
    var writer = new jspb.BinaryWriter();
    proto.UserResponse.serializeBinaryToWriter(this, writer);
    return writer.getResultBuffer();
  };
  
  
  /**
   * Serializes the given message to binary data (in protobuf wire
   * format), writing to the given BinaryWriter.
   * @param {!proto.UserResponse} message
   * @param {!jspb.BinaryWriter} writer
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.UserResponse.serializeBinaryToWriter = function(message, writer) {
    var f = undefined;
    f = message.getError();
    if (f) {
      writer.writeBool(
        1,
        f
      );
    }
    f = message.getMessage();
    if (f.length > 0) {
      writer.writeString(
        2,
        f
      );
    }
    f = message.getUser();
    if (f != null) {
      writer.writeMessage(
        3,
        f,
        proto.User.serializeBinaryToWriter
      );
    }
  };
  
  
  /**
   * optional bool error = 1;
   * @return {boolean}
   */
  proto.UserResponse.prototype.getError = function() {
    return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
  };
  
  
  /**
   * @param {boolean} value
   * @return {!proto.UserResponse} returns this
   */
  proto.UserResponse.prototype.setError = function(value) {
    return jspb.Message.setProto3BooleanField(this, 1, value);
  };
  
  
  /**
   * optional string message = 2;
   * @return {string}
   */
  proto.UserResponse.prototype.getMessage = function() {
    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  };
  
  
  /**
   * @param {string} value
   * @return {!proto.UserResponse} returns this
   */
  proto.UserResponse.prototype.setMessage = function(value) {
    return jspb.Message.setProto3StringField(this, 2, value);
  };
  
  
  /**
   * optional User user = 3;
   * @return {?proto.User}
   */
  proto.UserResponse.prototype.getUser = function() {
    return /** @type{?proto.User} */ (
      jspb.Message.getWrapperField(this, proto.User, 3));
  };
  
  
  /**
   * @param {?proto.User|undefined} value
   * @return {!proto.UserResponse} returns this
  */
  proto.UserResponse.prototype.setUser = function(value) {
    return jspb.Message.setWrapperField(this, 3, value);
  };
  
  
  /**
   * Clears the message field making it undefined.
   * @return {!proto.UserResponse} returns this
   */
  proto.UserResponse.prototype.clearUser = function() {
    return this.setUser(undefined);
  };
  
  
  /**
   * Returns whether this field is set.
   * @return {boolean}
   */
  proto.UserResponse.prototype.hasUser = function() {
    return jspb.Message.getField(this, 3) != null;
  };
  
  
  goog.object.extend(exports, proto);
  