// 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_domain_site_pb = require("../../models/domain/site_pb.js");
goog.object.extend(proto, models_domain_site_pb);
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);
goog.exportSymbol("proto.bet.beteran.member.Member", null, global);
goog.exportSymbol("proto.bet.beteran.member.MemberModel", 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";
}
/**
 * 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.MemberModel = function (opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.member.MemberModel, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.bet.beteran.member.MemberModel.displayName =
    "proto.bet.beteran.member.MemberModel";
}

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, ""),
        siteId: jspb.Message.getFieldWithDefault(msg, 2, ""),
        memberClassId: jspb.Message.getFieldWithDefault(msg, 3, ""),
        memberLevelId: jspb.Message.getFieldWithDefault(msg, 4, ""),
        referrerMemberId: jspb.Message.getFieldWithDefault(msg, 5, ""),
        referredCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
        username: jspb.Message.getFieldWithDefault(msg, 7, ""),
        nickname: jspb.Message.getFieldWithDefault(msg, 8, ""),
        mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 9, ""),
        state: jspb.Message.getFieldWithDefault(msg, 10, 0),
        stateChangedAt: jspb.Message.getFieldWithDefault(msg, 11, 0),
        lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 12, ""),
        lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 13, 0),
        createdAt: jspb.Message.getFieldWithDefault(msg, 14, 0),
        updatedAt: jspb.Message.getFieldWithDefault(msg, 15, 0),
        deletedAt: jspb.Message.getFieldWithDefault(msg, 16, 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.setSiteId(value);
        break;
      case 3:
        var value = /** @type {string} */ (reader.readString());
        msg.setMemberClassId(value);
        break;
      case 4:
        var value = /** @type {string} */ (reader.readString());
        msg.setMemberLevelId(value);
        break;
      case 5:
        var value = /** @type {string} */ (reader.readString());
        msg.setReferrerMemberId(value);
        break;
      case 6:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setReferredCount(value);
        break;
      case 7:
        var value = /** @type {string} */ (reader.readString());
        msg.setUsername(value);
        break;
      case 8:
        var value = /** @type {string} */ (reader.readString());
        msg.setNickname(value);
        break;
      case 9:
        var value = /** @type {string} */ (reader.readString());
        msg.setMobilePhoneNumber(value);
        break;
      case 10:
        var value = /** @type {!proto.bet.beteran.member.MemberState} */ (
          reader.readEnum()
        );
        msg.setState(value);
        break;
      case 11:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setStateChangedAt(value);
        break;
      case 12:
        var value = /** @type {string} */ (reader.readString());
        msg.setLastSigninedIp(value);
        break;
      case 13:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setLastSigninedAt(value);
        break;
      case 14:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setCreatedAt(value);
        break;
      case 15:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setUpdatedAt(value);
        break;
      case 16:
        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.getSiteId();
  if (f.length > 0) {
    writer.writeString(2, f);
  }
  f = message.getMemberClassId();
  if (f.length > 0) {
    writer.writeString(3, f);
  }
  f = message.getMemberLevelId();
  if (f.length > 0) {
    writer.writeString(4, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 5));
  if (f != null) {
    writer.writeString(5, f);
  }
  f = message.getReferredCount();
  if (f !== 0) {
    writer.writeUint64(6, f);
  }
  f = message.getUsername();
  if (f.length > 0) {
    writer.writeString(7, f);
  }
  f = message.getNickname();
  if (f.length > 0) {
    writer.writeString(8, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 9));
  if (f != null) {
    writer.writeString(9, f);
  }
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(10, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 11));
  if (f != null) {
    writer.writeUint64(11, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 12));
  if (f != null) {
    writer.writeString(12, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 13));
  if (f != null) {
    writer.writeUint64(13, f);
  }
  f = message.getCreatedAt();
  if (f !== 0) {
    writer.writeUint64(14, f);
  }
  f = message.getUpdatedAt();
  if (f !== 0) {
    writer.writeUint64(15, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 16));
  if (f != null) {
    writer.writeUint64(16, 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 site_id = 2;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getSiteId = 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.setSiteId = function (value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};

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

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

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

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

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

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

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

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

/**
 * optional uint64 referred_count = 6;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getReferredCount = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 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, 6, value);
};

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

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

/**
 * optional string nickname = 8;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getNickname = 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.setNickname = function (value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};

/**
 * optional string mobile_phone_number = 9;
 * @return {string}
 */
proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = 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.setMobilePhoneNumber = function (
  value
) {
  return jspb.Message.setField(this, 9, 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, 9, undefined);
};

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

/**
 * optional MemberState state = 10;
 * @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, 10, 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, 10, value);
};

/**
 * optional uint64 state_changed_at = 11;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 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, 11, 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, 11, undefined);
};

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

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

/**
 * @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, 12, 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, 12, undefined);
};

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

/**
 * optional uint64 last_signined_at = 13;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 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, 13, 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, 13, undefined);
};

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

/**
 * optional uint64 created_at = 14;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getCreatedAt = 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.setCreatedAt = function (value) {
  return jspb.Message.setProto3IntField(this, 14, value);
};

/**
 * optional uint64 updated_at = 15;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getUpdatedAt = 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.setUpdatedAt = function (value) {
  return jspb.Message.setProto3IntField(this, 15, value);
};

/**
 * optional uint64 deleted_at = 16;
 * @return {number}
 */
proto.bet.beteran.member.Member.prototype.getDeletedAt = 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.setDeletedAt = function (value) {
  return jspb.Message.setField(this, 16, 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, 16, undefined);
};

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.Member.prototype.hasDeletedAt = function () {
  return jspb.Message.getField(this, 16) != 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.bet.beteran.member.MemberModel.prototype.toObject = function (
    opt_includeInstance
  ) {
    return proto.bet.beteran.member.MemberModel.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.MemberModel} msg The msg instance to transform.
   * @return {!Object}
   * @suppress {unusedLocalVariables} f is only used for nested messages
   */
  proto.bet.beteran.member.MemberModel.toObject = function (
    includeInstance,
    msg
  ) {
    var f,
      obj = {
        id: jspb.Message.getFieldWithDefault(msg, 1, ""),
        site:
          (f = msg.getSite()) &&
          models_domain_site_pb.Site.toObject(includeInstance, f),
        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
          ),
        referrerMember:
          (f = msg.getReferrerMember()) &&
          proto.bet.beteran.member.Member.toObject(includeInstance, f),
        referredCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
        username: jspb.Message.getFieldWithDefault(msg, 7, ""),
        nickname: jspb.Message.getFieldWithDefault(msg, 8, ""),
        mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 9, ""),
        state: jspb.Message.getFieldWithDefault(msg, 10, 0),
        stateChangedAt: jspb.Message.getFieldWithDefault(msg, 11, 0),
        lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 12, ""),
        lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 13, 0),
        createdAt: jspb.Message.getFieldWithDefault(msg, 14, 0),
        updatedAt: jspb.Message.getFieldWithDefault(msg, 15, 0),
        deletedAt: jspb.Message.getFieldWithDefault(msg, 16, 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.MemberModel}
 */
proto.bet.beteran.member.MemberModel.deserializeBinary = function (bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.bet.beteran.member.MemberModel();
  return proto.bet.beteran.member.MemberModel.deserializeBinaryFromReader(
    msg,
    reader
  );
};

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.bet.beteran.member.MemberModel} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.bet.beteran.member.MemberModel}
 */
proto.bet.beteran.member.MemberModel.deserializeBinaryFromReader = function (
  msg,
  reader
) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
      case 1:
        var value = /** @type {string} */ (reader.readString());
        msg.setId(value);
        break;
      case 2:
        var value = new models_domain_site_pb.Site();
        reader.readMessage(
          value,
          models_domain_site_pb.Site.deserializeBinaryFromReader
        );
        msg.setSite(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 proto.bet.beteran.member.Member();
        reader.readMessage(
          value,
          proto.bet.beteran.member.Member.deserializeBinaryFromReader
        );
        msg.setReferrerMember(value);
        break;
      case 6:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setReferredCount(value);
        break;
      case 7:
        var value = /** @type {string} */ (reader.readString());
        msg.setUsername(value);
        break;
      case 8:
        var value = /** @type {string} */ (reader.readString());
        msg.setNickname(value);
        break;
      case 9:
        var value = /** @type {string} */ (reader.readString());
        msg.setMobilePhoneNumber(value);
        break;
      case 10:
        var value = /** @type {!proto.bet.beteran.member.MemberState} */ (
          reader.readEnum()
        );
        msg.setState(value);
        break;
      case 11:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setStateChangedAt(value);
        break;
      case 12:
        var value = /** @type {string} */ (reader.readString());
        msg.setLastSigninedIp(value);
        break;
      case 13:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setLastSigninedAt(value);
        break;
      case 14:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setCreatedAt(value);
        break;
      case 15:
        var value = /** @type {number} */ (reader.readUint64());
        msg.setUpdatedAt(value);
        break;
      case 16:
        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.MemberModel.prototype.serializeBinary = function () {
  var writer = new jspb.BinaryWriter();
  proto.bet.beteran.member.MemberModel.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.MemberModel} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.bet.beteran.member.MemberModel.serializeBinaryToWriter = function (
  message,
  writer
) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(1, f);
  }
  f = message.getSite();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      models_domain_site_pb.Site.serializeBinaryToWriter
    );
  }
  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.getReferrerMember();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      proto.bet.beteran.member.Member.serializeBinaryToWriter
    );
  }
  f = message.getReferredCount();
  if (f !== 0) {
    writer.writeUint64(6, f);
  }
  f = message.getUsername();
  if (f.length > 0) {
    writer.writeString(7, f);
  }
  f = message.getNickname();
  if (f.length > 0) {
    writer.writeString(8, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 9));
  if (f != null) {
    writer.writeString(9, f);
  }
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(10, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 11));
  if (f != null) {
    writer.writeUint64(11, f);
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 12));
  if (f != null) {
    writer.writeString(12, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 13));
  if (f != null) {
    writer.writeUint64(13, f);
  }
  f = message.getCreatedAt();
  if (f !== 0) {
    writer.writeUint64(14, f);
  }
  f = message.getUpdatedAt();
  if (f !== 0) {
    writer.writeUint64(15, f);
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 16));
  if (f != null) {
    writer.writeUint64(16, f);
  }
};

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

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

/**
 * optional bet.beteran.domain.Site site = 2;
 * @return {?proto.bet.beteran.domain.Site}
 */
proto.bet.beteran.member.MemberModel.prototype.getSite = function () {
  return /** @type{?proto.bet.beteran.domain.Site} */ (
    jspb.Message.getWrapperField(this, models_domain_site_pb.Site, 2)
  );
};

/**
 * @param {?proto.bet.beteran.domain.Site|undefined} value
 * @return {!proto.bet.beteran.member.MemberModel} returns this
 */
proto.bet.beteran.member.MemberModel.prototype.setSite = function (value) {
  return jspb.Message.setWrapperField(this, 2, value);
};

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

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

/**
 * optional MemberClass member_class = 3;
 * @return {?proto.bet.beteran.member.MemberClass}
 */
proto.bet.beteran.member.MemberModel.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.MemberModel} returns this
 */
proto.bet.beteran.member.MemberModel.prototype.setMemberClass = function (
  value
) {
  return jspb.Message.setWrapperField(this, 3, value);
};

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

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.MemberModel.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.MemberModel.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.MemberModel} returns this
 */
proto.bet.beteran.member.MemberModel.prototype.setMemberLevel = function (
  value
) {
  return jspb.Message.setWrapperField(this, 4, value);
};

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

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

/**
 * optional Member referrer_member = 5;
 * @return {?proto.bet.beteran.member.Member}
 */
proto.bet.beteran.member.MemberModel.prototype.getReferrerMember = function () {
  return /** @type{?proto.bet.beteran.member.Member} */ (
    jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 5)
  );
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.bet.beteran.member.MemberModel.prototype.hasDeletedAt = function () {
  return jspb.Message.getField(this, 16) != 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);
