// source: models/member/member.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 models_member_member_class_pb = require("../../models/member/member_class_pb.js");
goog.object.extend(proto, models_member_member_class_pb);
var models_member_member_level_pb = require("../../models/member/member_level_pb.js");
goog.object.extend(proto, models_member_member_level_pb);
var models_member_member_site_pb = require("../../models/member/member_site_pb.js");
goog.object.extend(proto, models_member_member_site_pb);
goog.exportSymbol("proto.bet.beteran.member.Member", null, global);
goog.exportSymbol("proto.bet.beteran.member.MemberState", 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.bet.beteran.member.Member = function (opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.member.Member, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.bet.beteran.member.Member.displayName =
    "proto.bet.beteran.member.Member";
}

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.member.Member.prototype.toObject = function (
    opt_includeInstance
  ) {
    return proto.bet.beteran.member.Member.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.member.Member} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.bet.beteran.member.Member.toObject = function (includeInstance, msg) {
    var f,
      obj = {
        id: jspb.Message.getFieldWithDefault(msg, 1, ""),
        domainId: jspb.Message.getFieldWithDefault(msg, 2, ""),
        memberClass:
          (f = msg.getMemberClass()) &&
          models_member_member_class_pb.MemberClass.toObject(
            includeInstance,
            f
          ),
        memberLevel:
          (f = msg.getMemberLevel()) &&
          models_member_member_level_pb.MemberLevel.toObject(
            includeInstance,
            f
          ),
        memberSite:
          (f = msg.getMemberSite()) &&
          models_member_member_site_pb.MemberSite.toObject(includeInstance, f),
        referrer:
          (f = msg.getReferrer()) &&
          proto.bet.beteran.member.Member.toObject(includeInstance, f),
        referredCount: jspb.Message.getFieldWithDefault(msg, 7, 0),
        username: jspb.Message.getFieldWithDefault(msg, 8, ""),
        nickname: jspb.Message.getFieldWithDefault(msg, 9, ""),
        mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 10, ""),
        state: jspb.Message.getFieldWithDefault(msg, 11, 0),
        stateChangedAt: jspb.Message.getFieldWithDefault(msg, 12, 0),
        lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 13, ""),
        lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 14, 0),
        createdAt: jspb.Message.getFieldWithDefault(msg, 15, 0),
        updatedAt: jspb.Message.getFieldWithDefault(msg, 16, 0),
        deletedAt: jspb.Message.getFieldWithDefault(msg, 17, 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.bet.beteran.member.Member}
 */
proto.bet.beteran.member.Member.deserializeBinary = function (bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.bet.beteran.member.Member();
  return proto.bet.beteran.member.Member.deserializeBinaryFromReader(
    msg,
    reader
  );
};

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.bet.beteran.member.Member} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.bet.beteran.member.Member}
 */
proto.bet.beteran.member.Member.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.setDomainId(value);
        break;
      case 3:
        var value = new models_member_member_class_pb.MemberClass();
        reader.readMessage(
          value,
          models_member_member_class_pb.MemberClass.deserializeBinaryFromReader
        );
        msg.setMemberClass(value);
        break;
      case 4:
        var value = new models_member_member_level_pb.MemberLevel();
        reader.readMessage(
          value,
          models_member_member_level_pb.MemberLevel.deserializeBinaryFromReader
        );
        msg.setMemberLevel(value);
        break;
      case 5:
        var value = new models_member_member_site_pb.MemberSite();
        reader.readMessage(
          value,
          models_member_member_site_pb.MemberSite.deserializeBinaryFromReader
        );
        msg.setMemberSite(value);
        break;
      case 6:
        var value = new proto.bet.beteran.member.Member();
        reader.readMessage(
          value,
          proto.bet.beteran.member.Member.deserializeBinaryFromReader
        );
        msg.setReferrer(value);
        break;
      case 7:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setReferredCount(value);
        break;
      case 8:
        var value = /** @type {string} */ (reader.readString());
        msg.setUsername(value);
        break;
      case 9:
        var value = /** @type {string} */ (reader.readString());
        msg.setNickname(value);
        break;
      case 10:
        var value = /** @type {string} */ (reader.readString());
        msg.setMobilePhoneNumber(value);
        break;
      case 11:
        var value = /** @type {!proto.bet.beteran.member.MemberState} */ (
          reader.readEnum()
        );
        msg.setState(value);
        break;
      case 12:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setStateChangedAt(value);
        break;
      case 13:
        var value = /** @type {string} */ (reader.readString());
        msg.setLastSigninedIp(value);
        break;
      case 14:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setLastSigninedAt(value);
        break;
      case 15:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setCreatedAt(value);
        break;
      case 16:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setUpdatedAt(value);
        break;
      case 17:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setDeletedAt(value);
        break;
      default:
        reader.skipField();
        break;
    }
  }
  return msg;
};

/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.bet.beteran.member.Member.prototype.serializeBinary = function () {
  var writer = new jspb.BinaryWriter();
  proto.bet.beteran.member.Member.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.member.Member} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.bet.beteran.member.Member.serializeBinaryToWriter = function (
  message,
  writer
) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(1, f);
  }
  f = message.getDomainId();
  if (f.length > 0) {
    writer.writeString(2, f);
  }
  f = message.getMemberClass();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      models_member_member_class_pb.MemberClass.serializeBinaryToWriter
    );
  }
  f = message.getMemberLevel();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      models_member_member_level_pb.MemberLevel.serializeBinaryToWriter
    );
  }
  f = message.getMemberSite();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      models_member_member_site_pb.MemberSite.serializeBinaryToWriter
    );
  }
  f = message.getReferrer();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      proto.bet.beteran.member.Member.serializeBinaryToWriter
    );
  }
  f = message.getReferredCount();
  if (f !== 0) {
    writer.writeUint64(7, f);
  }
  f = message.getUsername();
  if (f.length > 0) {
    writer.writeString(8, f);
  }
  f = message.getNickname();
  if (f.length > 0) {
    writer.writeString(9, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 10));
  if (f != null) {
    writer.writeString(10, f);
  }
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(11, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 12));
  if (f != null) {
    writer.writeUint64(12, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 13));
  if (f != null) {
    writer.writeString(13, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 14));
  if (f != null) {
    writer.writeUint64(14, f);
  }
  f = message.getCreatedAt();
  if (f !== 0) {
    writer.writeUint64(15, f);
  }
  f = message.getUpdatedAt();
  if (f !== 0) {
    writer.writeUint64(16, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 17));
  if (f != null) {
    writer.writeUint64(17, f);
  }
};

/**
 * optional string id = 1;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getId = function () {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};

/**
 * @param {string} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setId = function (value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};

/**
 * optional string domain_id = 2;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getDomainId = function () {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};

/**
 * @param {string} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setDomainId = function (value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};

/**
 * optional MemberClass member_class = 3;
 * @return {?proto.bet.beteran.member.MemberClass}
 */
proto.bet.beteran.member.Member.prototype.getMemberClass = function () {
  return /** @type{?proto.bet.beteran.member.MemberClass} */ (
    jspb.Message.getWrapperField(
      this,
      models_member_member_class_pb.MemberClass,
      3
    )
  );
};

/**
 * @param {?proto.bet.beteran.member.MemberClass|undefined} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setMemberClass = function (value) {
  return jspb.Message.setWrapperField(this, 3, value);
};

/**
 * Clears the message field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearMemberClass = function () {
  return this.setMemberClass(undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasMemberClass = function () {
  return jspb.Message.getField(this, 3) != null;
};

/**
 * optional MemberLevel member_level = 4;
 * @return {?proto.bet.beteran.member.MemberLevel}
 */
proto.bet.beteran.member.Member.prototype.getMemberLevel = function () {
  return /** @type{?proto.bet.beteran.member.MemberLevel} */ (
    jspb.Message.getWrapperField(
      this,
      models_member_member_level_pb.MemberLevel,
      4
    )
  );
};

/**
 * @param {?proto.bet.beteran.member.MemberLevel|undefined} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setMemberLevel = function (value) {
  return jspb.Message.setWrapperField(this, 4, value);
};

/**
 * Clears the message field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearMemberLevel = function () {
  return this.setMemberLevel(undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasMemberLevel = function () {
  return jspb.Message.getField(this, 4) != null;
};

/**
 * optional MemberSite member_site = 5;
 * @return {?proto.bet.beteran.member.MemberSite}
 */
proto.bet.beteran.member.Member.prototype.getMemberSite = function () {
  return /** @type{?proto.bet.beteran.member.MemberSite} */ (
    jspb.Message.getWrapperField(
      this,
      models_member_member_site_pb.MemberSite,
      5
    )
  );
};

/**
 * @param {?proto.bet.beteran.member.MemberSite|undefined} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setMemberSite = function (value) {
  return jspb.Message.setWrapperField(this, 5, value);
};

/**
 * Clears the message field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearMemberSite = function () {
  return this.setMemberSite(undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasMemberSite = function () {
  return jspb.Message.getField(this, 5) != null;
};

/**
 * optional Member referrer = 6;
 * @return {?proto.bet.beteran.member.Member}
 */
proto.bet.beteran.member.Member.prototype.getReferrer = function () {
  return /** @type{?proto.bet.beteran.member.Member} */ (
    jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 6)
  );
};

/**
 * @param {?proto.bet.beteran.member.Member|undefined} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setReferrer = function (value) {
  return jspb.Message.setWrapperField(this, 6, value);
};

/**
 * Clears the message field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearReferrer = function () {
  return this.setReferrer(undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasReferrer = function () {
  return jspb.Message.getField(this, 6) != null;
};

/**
 * optional uint64 referred_count = 7;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getReferredCount = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};

/**
 * @param {number} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setReferredCount = function (value) {
  return jspb.Message.setProto3IntField(this, 7, value);
};

/**
 * optional string username = 8;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getUsername = function () {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};

/**
 * @param {string} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setUsername = function (value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};

/**
 * optional string nickname = 9;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getNickname = function () {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};

/**
 * @param {string} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setNickname = function (value) {
  return jspb.Message.setProto3StringField(this, 9, value);
};

/**
 * optional string mobile_phone_number = 10;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};

/**
 * @param {string} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function (
  value
) {
  return jspb.Message.setField(this, 10, value);
};

/**
 * Clears the field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () {
  return jspb.Message.setField(this, 10, undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasMobilePhoneNumber = function () {
  return jspb.Message.getField(this, 10) != null;
};

/**
 * optional MemberState state = 11;
 * @return {!proto.bet.beteran.member.MemberState}
 */
proto.bet.beteran.member.Member.prototype.getState = function () {
  return /** @type {!proto.bet.beteran.member.MemberState} */ (
    jspb.Message.getFieldWithDefault(this, 11, 0)
  );
};

/**
 * @param {!proto.bet.beteran.member.MemberState} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setState = function (value) {
  return jspb.Message.setProto3EnumField(this, 11, value);
};

/**
 * optional uint64 state_changed_at = 12;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};

/**
 * @param {number} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) {
  return jspb.Message.setField(this, 12, value);
};

/**
 * Clears the field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () {
  return jspb.Message.setField(this, 12, undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasStateChangedAt = function () {
  return jspb.Message.getField(this, 12) != null;
};

/**
 * optional string last_signined_ip = 13;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
};

/**
 * @param {string} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) {
  return jspb.Message.setField(this, 13, value);
};

/**
 * Clears the field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () {
  return jspb.Message.setField(this, 13, undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasLastSigninedIp = function () {
  return jspb.Message.getField(this, 13) != null;
};

/**
 * optional uint64 last_signined_at = 14;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));
};

/**
 * @param {number} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) {
  return jspb.Message.setField(this, 14, value);
};

/**
 * Clears the field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () {
  return jspb.Message.setField(this, 14, undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasLastSigninedAt = function () {
  return jspb.Message.getField(this, 14) != null;
};

/**
 * optional uint64 created_at = 15;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getCreatedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));
};

/**
 * @param {number} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setCreatedAt = function (value) {
  return jspb.Message.setProto3IntField(this, 15, value);
};

/**
 * optional uint64 updated_at = 16;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
};

/**
 * @param {number} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setUpdatedAt = function (value) {
  return jspb.Message.setProto3IntField(this, 16, value);
};

/**
 * optional uint64 deleted_at = 17;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getDeletedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
};

/**
 * @param {number} value
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) {
  return jspb.Message.setField(this, 17, value);
};

/**
 * Clears the field making it undefined.
 * @return {!proto.bet.beteran.member.Member} returns this
 */
proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () {
  return jspb.Message.setField(this, 17, undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasDeletedAt = function () {
  return jspb.Message.getField(this, 17) != null;
};

/**
 * @enum {number}
 */
proto.bet.beteran.member.MemberState = {
  NONE: 0,
  NORMAL: 1,
  PENDING: 2,
  WITHDRAWAL: 3,
  DORMANCY: 4,
  BLACKLIST: 5,
  SUSPENDED: 6,
};

goog.object.extend(exports, proto.bet.beteran.member);
