// source: c2se/backend/identity.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 () {
  return this || window || global || self || Function("return this")();
}.call(null);

var protobuf_rpc_error_pb = require("../../protobuf/rpc/error_pb.js");
goog.object.extend(proto, protobuf_rpc_error_pb);
goog.exportSymbol(
  "proto.bet.beteran.c2se.backend.identity.SigninRequest",
  null,
  global
);
goog.exportSymbol(
  "proto.bet.beteran.c2se.backend.identity.SigninResponse",
  null,
  global
);
goog.exportSymbol(
  "proto.bet.beteran.c2se.backend.identity.SigninResponse.Result",
  null,
  global
);

proto.bet.beteran.c2se.backend.identity.SUBJECT_CHECK_USERNAME_FOR_DUPLICATION =
  "bet.beteran.c2se.backend.identity.CheckUsernameForDuplication";

proto.bet.beteran.c2se.backend.identity.SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION =
  "bet.beteran.c2se.backend.identity.CheckNicknameForDuplication";

proto.bet.beteran.c2se.backend.identity.SUBJECT_CAPTCHA =
  "bet.beteran.c2se.backend.identity.Captcha";

proto.bet.beteran.c2se.backend.identity.SUBJECT_SIGNIN =
  "bet.beteran.c2se.backend.identity.Signin";

/**
 * 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.bet.beteran.c2se.backend.identity.SigninRequest = function (opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(
  proto.bet.beteran.c2se.backend.identity.SigninRequest,
  jspb.Message
);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.bet.beteran.c2se.backend.identity.SigninRequest.displayName =
    "proto.bet.beteran.c2se.backend.identity.SigninRequest";
}
/**
 * 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.bet.beteran.c2se.backend.identity.SigninResponse = function (opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(
  proto.bet.beteran.c2se.backend.identity.SigninResponse,
  jspb.Message
);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.bet.beteran.c2se.backend.identity.SigninResponse.displayName =
    "proto.bet.beteran.c2se.backend.identity.SigninResponse";
}
/**
 * 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.bet.beteran.c2se.backend.identity.SigninResponse.Result = function (
  opt_data
) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(
  proto.bet.beteran.c2se.backend.identity.SigninResponse.Result,
  jspb.Message
);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.displayName =
    "proto.bet.beteran.c2se.backend.identity.SigninResponse.Result";
}

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.bet.beteran.c2se.backend.identity.SigninRequest.prototype.toObject =
    function (opt_includeInstance) {
      return proto.bet.beteran.c2se.backend.identity.SigninRequest.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.bet.beteran.c2se.backend.identity.SigninRequest} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.bet.beteran.c2se.backend.identity.SigninRequest.toObject = function (
    includeInstance,
    msg
  ) {
    var f,
      obj = {
        securityCodeHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
        securityCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
        username: jspb.Message.getFieldWithDefault(msg, 3, ""),
        password: jspb.Message.getFieldWithDefault(msg, 4, ""),
      };

    if (includeInstance) {
      obj.$jspbMessageInstance = msg;
    }
    return obj;
  };
}

/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.deserializeBinary =
  function (bytes) {
    var reader = new jspb.BinaryReader(bytes);
    var msg = new proto.bet.beteran.c2se.backend.identity.SigninRequest();
    return proto.bet.beteran.c2se.backend.identity.SigninRequest.deserializeBinaryFromReader(
      msg,
      reader
    );
  };

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.bet.beteran.c2se.backend.identity.SigninRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.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.setSecurityCodeHash(value);
          break;
        case 2:
          var value = /** @type {string} */ (reader.readString());
          msg.setSecurityCode(value);
          break;
        case 3:
          var value = /** @type {string} */ (reader.readString());
          msg.setUsername(value);
          break;
        case 4:
          var value = /** @type {string} */ (reader.readString());
          msg.setPassword(value);
          break;
        default:
          reader.skipField();
          break;
      }
    }
    return msg;
  };

/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.serializeBinary =
  function () {
    var writer = new jspb.BinaryWriter();
    proto.bet.beteran.c2se.backend.identity.SigninRequest.serializeBinaryToWriter(
      this,
      writer
    );
    return writer.getResultBuffer();
  };

/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.bet.beteran.c2se.backend.identity.SigninRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.serializeBinaryToWriter =
  function (message, writer) {
    var f = undefined;
    f = message.getSecurityCodeHash();
    if (f.length > 0) {
      writer.writeString(1, f);
    }
    f = message.getSecurityCode();
    if (f.length > 0) {
      writer.writeString(2, f);
    }
    f = message.getUsername();
    if (f.length > 0) {
      writer.writeString(3, f);
    }
    f = message.getPassword();
    if (f.length > 0) {
      writer.writeString(4, f);
    }
  };

/**
 * optional string securityCodeHash = 1;
 * @return {string}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getSecurityCodeHash =
  function () {
    return /** @type {string} */ (
      jspb.Message.getFieldWithDefault(this, 1, "")
    );
  };

/**
 * @param {string} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setSecurityCodeHash =
  function (value) {
    return jspb.Message.setProto3StringField(this, 1, value);
  };

/**
 * optional string security_code = 2;
 * @return {string}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getSecurityCode =
  function () {
    return /** @type {string} */ (
      jspb.Message.getFieldWithDefault(this, 2, "")
    );
  };

/**
 * @param {string} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setSecurityCode =
  function (value) {
    return jspb.Message.setProto3StringField(this, 2, value);
  };

/**
 * optional string username = 3;
 * @return {string}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getUsername =
  function () {
    return /** @type {string} */ (
      jspb.Message.getFieldWithDefault(this, 3, "")
    );
  };

/**
 * @param {string} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setUsername =
  function (value) {
    return jspb.Message.setProto3StringField(this, 3, value);
  };

/**
 * optional string password = 4;
 * @return {string}
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getPassword =
  function () {
    return /** @type {string} */ (
      jspb.Message.getFieldWithDefault(this, 4, "")
    );
  };

/**
 * @param {string} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setPassword =
  function (value) {
    return jspb.Message.setProto3StringField(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.bet.beteran.c2se.backend.identity.SigninResponse.prototype.toObject =
    function (opt_includeInstance) {
      return proto.bet.beteran.c2se.backend.identity.SigninResponse.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.bet.beteran.c2se.backend.identity.SigninResponse} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.bet.beteran.c2se.backend.identity.SigninResponse.toObject = function (
    includeInstance,
    msg
  ) {
    var f,
      obj = {
        error:
          (f = msg.getError()) &&
          protobuf_rpc_error_pb.Error.toObject(includeInstance, f),
        result:
          (f = msg.getResult()) &&
          proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.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.bet.beteran.c2se.backend.identity.SigninResponse}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinary =
  function (bytes) {
    var reader = new jspb.BinaryReader(bytes);
    var msg = new proto.bet.beteran.c2se.backend.identity.SigninResponse();
    return proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinaryFromReader(
      msg,
      reader
    );
  };

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.bet.beteran.c2se.backend.identity.SigninResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinaryFromReader =
  function (msg, reader) {
    while (reader.nextField()) {
      if (reader.isEndGroup()) {
        break;
      }
      var field = reader.getFieldNumber();
      switch (field) {
        case 1:
          var value = new protobuf_rpc_error_pb.Error();
          reader.readMessage(
            value,
            protobuf_rpc_error_pb.Error.deserializeBinaryFromReader
          );
          msg.setError(value);
          break;
        case 2:
          var value =
            new proto.bet.beteran.c2se.backend.identity.SigninResponse.Result();
          reader.readMessage(
            value,
            proto.bet.beteran.c2se.backend.identity.SigninResponse.Result
              .deserializeBinaryFromReader
          );
          msg.setResult(value);
          break;
        default:
          reader.skipField();
          break;
      }
    }
    return msg;
  };

/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.serializeBinary =
  function () {
    var writer = new jspb.BinaryWriter();
    proto.bet.beteran.c2se.backend.identity.SigninResponse.serializeBinaryToWriter(
      this,
      writer
    );
    return writer.getResultBuffer();
  };

/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.bet.beteran.c2se.backend.identity.SigninResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.serializeBinaryToWriter =
  function (message, writer) {
    var f = undefined;
    f = message.getError();
    if (f != null) {
      writer.writeMessage(
        1,
        f,
        protobuf_rpc_error_pb.Error.serializeBinaryToWriter
      );
    }
    f = message.getResult();
    if (f != null) {
      writer.writeMessage(
        2,
        f,
        proto.bet.beteran.c2se.backend.identity.SigninResponse.Result
          .serializeBinaryToWriter
      );
    }
  };

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

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse.Result}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.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.setAccessToken(value);
          break;
        default:
          reader.skipField();
          break;
      }
    }
    return msg;
  };

/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.prototype.serializeBinary =
  function () {
    var writer = new jspb.BinaryWriter();
    proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.serializeBinaryToWriter(
      this,
      writer
    );
    return writer.getResultBuffer();
  };

/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.serializeBinaryToWriter =
  function (message, writer) {
    var f = undefined;
    f = message.getAccessToken();
    if (f.length > 0) {
      writer.writeString(1, f);
    }
  };

/**
 * optional string access_token = 1;
 * @return {string}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.prototype.getAccessToken =
  function () {
    return /** @type {string} */ (
      jspb.Message.getFieldWithDefault(this, 1, "")
    );
  };

/**
 * @param {string} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.prototype.setAccessToken =
  function (value) {
    return jspb.Message.setProto3StringField(this, 1, value);
  };

/**
 * optional bet.protobuf.rpc.Error error = 1;
 * @return {?proto.bet.protobuf.rpc.Error}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.getError =
  function () {
    return /** @type{?proto.bet.protobuf.rpc.Error} */ (
      jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1)
    );
  };

/**
 * @param {?proto.bet.protobuf.rpc.Error|undefined} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.setError =
  function (value) {
    return jspb.Message.setWrapperField(this, 1, value);
  };

/**
 * Clears the message field making it undefined.
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.clearError =
  function () {
    return this.setError(undefined);
  };

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasError =
  function () {
    return jspb.Message.getField(this, 1) != null;
  };

/**
 * optional Result result = 2;
 * @return {?proto.bet.beteran.c2se.backend.identity.SigninResponse.Result}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.getResult =
  function () {
    return /** @type{?proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} */ (
      jspb.Message.getWrapperField(
        this,
        proto.bet.beteran.c2se.backend.identity.SigninResponse.Result,
        2
      )
    );
  };

/**
 * @param {?proto.bet.beteran.c2se.backend.identity.SigninResponse.Result|undefined} value
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.setResult =
  function (value) {
    return jspb.Message.setWrapperField(this, 2, value);
  };

/**
 * Clears the message field making it undefined.
 * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.clearResult =
  function () {
    return this.setResult(undefined);
  };

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasResult =
  function () {
    return jspb.Message.getField(this, 2) != null;
  };

goog.object.extend(exports, proto.bet.beteran.c2se.backend.identity);
