// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: user.proto

package com.ywt.gapi.user;

/**
 * <pre>
 *用户信息
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.user.User}
 */
public  final class User extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.user.User)
    UserOrBuilder {
  // Use User.newBuilder() to construct.
  private User(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private User() {
    userid_ = 0;
    username_ = "";
    realname_ = "";
    mobile_ = "";
    idtype_ = 0;
    idno_ = "";
    sex_ = 0;
    age_ = 0;
    avatar_ = "";
    birthday_ = "";
    createtime_ = 0L;
    registerip_ = "";
    usertype_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private User(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!input.skipField(tag)) {
              done = true;
            }
            break;
          }
          case 8: {

            userid_ = input.readInt32();
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            username_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            realname_ = s;
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            mobile_ = s;
            break;
          }
          case 40: {

            idtype_ = input.readInt32();
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            idno_ = s;
            break;
          }
          case 56: {

            sex_ = input.readInt32();
            break;
          }
          case 64: {

            age_ = input.readInt32();
            break;
          }
          case 74: {
            java.lang.String s = input.readStringRequireUtf8();

            avatar_ = s;
            break;
          }
          case 82: {
            java.lang.String s = input.readStringRequireUtf8();

            birthday_ = s;
            break;
          }
          case 88: {

            createtime_ = input.readInt64();
            break;
          }
          case 98: {
            java.lang.String s = input.readStringRequireUtf8();

            registerip_ = s;
            break;
          }
          case 104: {

            usertype_ = input.readInt32();
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_User_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_User_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.user.User.class, com.ywt.gapi.user.User.Builder.class);
  }

  public static final int USERID_FIELD_NUMBER = 1;
  private int userid_;
  /**
   * <code>int32 userid = 1;</code>
   */
  public int getUserid() {
    return userid_;
  }

  public static final int USERNAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object username_;
  /**
   * <code>string username = 2;</code>
   */
  public java.lang.String getUsername() {
    java.lang.Object ref = username_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      username_ = s;
      return s;
    }
  }
  /**
   * <code>string username = 2;</code>
   */
  public com.google.protobuf.ByteString
      getUsernameBytes() {
    java.lang.Object ref = username_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      username_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REALNAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object realname_;
  /**
   * <code>string realname = 3;</code>
   */
  public java.lang.String getRealname() {
    java.lang.Object ref = realname_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      realname_ = s;
      return s;
    }
  }
  /**
   * <code>string realname = 3;</code>
   */
  public com.google.protobuf.ByteString
      getRealnameBytes() {
    java.lang.Object ref = realname_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      realname_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MOBILE_FIELD_NUMBER = 4;
  private volatile java.lang.Object mobile_;
  /**
   * <code>string mobile = 4;</code>
   */
  public java.lang.String getMobile() {
    java.lang.Object ref = mobile_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      mobile_ = s;
      return s;
    }
  }
  /**
   * <code>string mobile = 4;</code>
   */
  public com.google.protobuf.ByteString
      getMobileBytes() {
    java.lang.Object ref = mobile_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      mobile_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IDTYPE_FIELD_NUMBER = 5;
  private int idtype_;
  /**
   * <code>int32 idtype = 5;</code>
   */
  public int getIdtype() {
    return idtype_;
  }

  public static final int IDNO_FIELD_NUMBER = 6;
  private volatile java.lang.Object idno_;
  /**
   * <code>string idno = 6;</code>
   */
  public java.lang.String getIdno() {
    java.lang.Object ref = idno_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      idno_ = s;
      return s;
    }
  }
  /**
   * <code>string idno = 6;</code>
   */
  public com.google.protobuf.ByteString
      getIdnoBytes() {
    java.lang.Object ref = idno_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      idno_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SEX_FIELD_NUMBER = 7;
  private int sex_;
  /**
   * <code>int32 sex = 7;</code>
   */
  public int getSex() {
    return sex_;
  }

  public static final int AGE_FIELD_NUMBER = 8;
  private int age_;
  /**
   * <code>int32 age = 8;</code>
   */
  public int getAge() {
    return age_;
  }

  public static final int AVATAR_FIELD_NUMBER = 9;
  private volatile java.lang.Object avatar_;
  /**
   * <code>string avatar = 9;</code>
   */
  public java.lang.String getAvatar() {
    java.lang.Object ref = avatar_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      avatar_ = s;
      return s;
    }
  }
  /**
   * <code>string avatar = 9;</code>
   */
  public com.google.protobuf.ByteString
      getAvatarBytes() {
    java.lang.Object ref = avatar_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      avatar_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int BIRTHDAY_FIELD_NUMBER = 10;
  private volatile java.lang.Object birthday_;
  /**
   * <code>string birthday = 10;</code>
   */
  public java.lang.String getBirthday() {
    java.lang.Object ref = birthday_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      birthday_ = s;
      return s;
    }
  }
  /**
   * <code>string birthday = 10;</code>
   */
  public com.google.protobuf.ByteString
      getBirthdayBytes() {
    java.lang.Object ref = birthday_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      birthday_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CREATETIME_FIELD_NUMBER = 11;
  private long createtime_;
  /**
   * <code>int64 createtime = 11;</code>
   */
  public long getCreatetime() {
    return createtime_;
  }

  public static final int REGISTERIP_FIELD_NUMBER = 12;
  private volatile java.lang.Object registerip_;
  /**
   * <code>string registerip = 12;</code>
   */
  public java.lang.String getRegisterip() {
    java.lang.Object ref = registerip_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      registerip_ = s;
      return s;
    }
  }
  /**
   * <code>string registerip = 12;</code>
   */
  public com.google.protobuf.ByteString
      getRegisteripBytes() {
    java.lang.Object ref = registerip_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      registerip_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int USERTYPE_FIELD_NUMBER = 13;
  private int usertype_;
  /**
   * <code>int32 usertype = 13;</code>
   */
  public int getUsertype() {
    return usertype_;
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (userid_ != 0) {
      output.writeInt32(1, userid_);
    }
    if (!getUsernameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, username_);
    }
    if (!getRealnameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, realname_);
    }
    if (!getMobileBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mobile_);
    }
    if (idtype_ != 0) {
      output.writeInt32(5, idtype_);
    }
    if (!getIdnoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, idno_);
    }
    if (sex_ != 0) {
      output.writeInt32(7, sex_);
    }
    if (age_ != 0) {
      output.writeInt32(8, age_);
    }
    if (!getAvatarBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, avatar_);
    }
    if (!getBirthdayBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, birthday_);
    }
    if (createtime_ != 0L) {
      output.writeInt64(11, createtime_);
    }
    if (!getRegisteripBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, registerip_);
    }
    if (usertype_ != 0) {
      output.writeInt32(13, usertype_);
    }
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (userid_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, userid_);
    }
    if (!getUsernameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_);
    }
    if (!getRealnameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, realname_);
    }
    if (!getMobileBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mobile_);
    }
    if (idtype_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(5, idtype_);
    }
    if (!getIdnoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, idno_);
    }
    if (sex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, sex_);
    }
    if (age_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(8, age_);
    }
    if (!getAvatarBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, avatar_);
    }
    if (!getBirthdayBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, birthday_);
    }
    if (createtime_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(11, createtime_);
    }
    if (!getRegisteripBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, registerip_);
    }
    if (usertype_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(13, usertype_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.user.User)) {
      return super.equals(obj);
    }
    com.ywt.gapi.user.User other = (com.ywt.gapi.user.User) obj;

    boolean result = true;
    result = result && (getUserid()
        == other.getUserid());
    result = result && getUsername()
        .equals(other.getUsername());
    result = result && getRealname()
        .equals(other.getRealname());
    result = result && getMobile()
        .equals(other.getMobile());
    result = result && (getIdtype()
        == other.getIdtype());
    result = result && getIdno()
        .equals(other.getIdno());
    result = result && (getSex()
        == other.getSex());
    result = result && (getAge()
        == other.getAge());
    result = result && getAvatar()
        .equals(other.getAvatar());
    result = result && getBirthday()
        .equals(other.getBirthday());
    result = result && (getCreatetime()
        == other.getCreatetime());
    result = result && getRegisterip()
        .equals(other.getRegisterip());
    result = result && (getUsertype()
        == other.getUsertype());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserid();
    hash = (37 * hash) + USERNAME_FIELD_NUMBER;
    hash = (53 * hash) + getUsername().hashCode();
    hash = (37 * hash) + REALNAME_FIELD_NUMBER;
    hash = (53 * hash) + getRealname().hashCode();
    hash = (37 * hash) + MOBILE_FIELD_NUMBER;
    hash = (53 * hash) + getMobile().hashCode();
    hash = (37 * hash) + IDTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getIdtype();
    hash = (37 * hash) + IDNO_FIELD_NUMBER;
    hash = (53 * hash) + getIdno().hashCode();
    hash = (37 * hash) + SEX_FIELD_NUMBER;
    hash = (53 * hash) + getSex();
    hash = (37 * hash) + AGE_FIELD_NUMBER;
    hash = (53 * hash) + getAge();
    hash = (37 * hash) + AVATAR_FIELD_NUMBER;
    hash = (53 * hash) + getAvatar().hashCode();
    hash = (37 * hash) + BIRTHDAY_FIELD_NUMBER;
    hash = (53 * hash) + getBirthday().hashCode();
    hash = (37 * hash) + CREATETIME_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getCreatetime());
    hash = (37 * hash) + REGISTERIP_FIELD_NUMBER;
    hash = (53 * hash) + getRegisterip().hashCode();
    hash = (37 * hash) + USERTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getUsertype();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.user.User parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.User parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.User parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.User parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.User parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.User parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.User parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.User parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.ywt.gapi.user.User parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.User parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.ywt.gapi.user.User parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.User parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.user.User prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *用户信息
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.user.User}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.user.User)
      com.ywt.gapi.user.UserOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_User_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_User_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.user.User.class, com.ywt.gapi.user.User.Builder.class);
    }

    // Construct using com.ywt.gapi.user.User.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      userid_ = 0;

      username_ = "";

      realname_ = "";

      mobile_ = "";

      idtype_ = 0;

      idno_ = "";

      sex_ = 0;

      age_ = 0;

      avatar_ = "";

      birthday_ = "";

      createtime_ = 0L;

      registerip_ = "";

      usertype_ = 0;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_User_descriptor;
    }

    public com.ywt.gapi.user.User getDefaultInstanceForType() {
      return com.ywt.gapi.user.User.getDefaultInstance();
    }

    public com.ywt.gapi.user.User build() {
      com.ywt.gapi.user.User result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.ywt.gapi.user.User buildPartial() {
      com.ywt.gapi.user.User result = new com.ywt.gapi.user.User(this);
      result.userid_ = userid_;
      result.username_ = username_;
      result.realname_ = realname_;
      result.mobile_ = mobile_;
      result.idtype_ = idtype_;
      result.idno_ = idno_;
      result.sex_ = sex_;
      result.age_ = age_;
      result.avatar_ = avatar_;
      result.birthday_ = birthday_;
      result.createtime_ = createtime_;
      result.registerip_ = registerip_;
      result.usertype_ = usertype_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.ywt.gapi.user.User) {
        return mergeFrom((com.ywt.gapi.user.User)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.user.User other) {
      if (other == com.ywt.gapi.user.User.getDefaultInstance()) return this;
      if (other.getUserid() != 0) {
        setUserid(other.getUserid());
      }
      if (!other.getUsername().isEmpty()) {
        username_ = other.username_;
        onChanged();
      }
      if (!other.getRealname().isEmpty()) {
        realname_ = other.realname_;
        onChanged();
      }
      if (!other.getMobile().isEmpty()) {
        mobile_ = other.mobile_;
        onChanged();
      }
      if (other.getIdtype() != 0) {
        setIdtype(other.getIdtype());
      }
      if (!other.getIdno().isEmpty()) {
        idno_ = other.idno_;
        onChanged();
      }
      if (other.getSex() != 0) {
        setSex(other.getSex());
      }
      if (other.getAge() != 0) {
        setAge(other.getAge());
      }
      if (!other.getAvatar().isEmpty()) {
        avatar_ = other.avatar_;
        onChanged();
      }
      if (!other.getBirthday().isEmpty()) {
        birthday_ = other.birthday_;
        onChanged();
      }
      if (other.getCreatetime() != 0L) {
        setCreatetime(other.getCreatetime());
      }
      if (!other.getRegisterip().isEmpty()) {
        registerip_ = other.registerip_;
        onChanged();
      }
      if (other.getUsertype() != 0) {
        setUsertype(other.getUsertype());
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.ywt.gapi.user.User parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.user.User) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int userid_ ;
    /**
     * <code>int32 userid = 1;</code>
     */
    public int getUserid() {
      return userid_;
    }
    /**
     * <code>int32 userid = 1;</code>
     */
    public Builder setUserid(int value) {
      
      userid_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 userid = 1;</code>
     */
    public Builder clearUserid() {
      
      userid_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object username_ = "";
    /**
     * <code>string username = 2;</code>
     */
    public java.lang.String getUsername() {
      java.lang.Object ref = username_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        username_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string username = 2;</code>
     */
    public com.google.protobuf.ByteString
        getUsernameBytes() {
      java.lang.Object ref = username_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        username_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string username = 2;</code>
     */
    public Builder setUsername(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      username_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string username = 2;</code>
     */
    public Builder clearUsername() {
      
      username_ = getDefaultInstance().getUsername();
      onChanged();
      return this;
    }
    /**
     * <code>string username = 2;</code>
     */
    public Builder setUsernameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      username_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object realname_ = "";
    /**
     * <code>string realname = 3;</code>
     */
    public java.lang.String getRealname() {
      java.lang.Object ref = realname_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        realname_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string realname = 3;</code>
     */
    public com.google.protobuf.ByteString
        getRealnameBytes() {
      java.lang.Object ref = realname_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        realname_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string realname = 3;</code>
     */
    public Builder setRealname(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      realname_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string realname = 3;</code>
     */
    public Builder clearRealname() {
      
      realname_ = getDefaultInstance().getRealname();
      onChanged();
      return this;
    }
    /**
     * <code>string realname = 3;</code>
     */
    public Builder setRealnameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      realname_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object mobile_ = "";
    /**
     * <code>string mobile = 4;</code>
     */
    public java.lang.String getMobile() {
      java.lang.Object ref = mobile_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        mobile_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public com.google.protobuf.ByteString
        getMobileBytes() {
      java.lang.Object ref = mobile_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        mobile_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public Builder setMobile(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      mobile_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public Builder clearMobile() {
      
      mobile_ = getDefaultInstance().getMobile();
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public Builder setMobileBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      mobile_ = value;
      onChanged();
      return this;
    }

    private int idtype_ ;
    /**
     * <code>int32 idtype = 5;</code>
     */
    public int getIdtype() {
      return idtype_;
    }
    /**
     * <code>int32 idtype = 5;</code>
     */
    public Builder setIdtype(int value) {
      
      idtype_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 idtype = 5;</code>
     */
    public Builder clearIdtype() {
      
      idtype_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object idno_ = "";
    /**
     * <code>string idno = 6;</code>
     */
    public java.lang.String getIdno() {
      java.lang.Object ref = idno_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        idno_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string idno = 6;</code>
     */
    public com.google.protobuf.ByteString
        getIdnoBytes() {
      java.lang.Object ref = idno_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        idno_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string idno = 6;</code>
     */
    public Builder setIdno(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idno_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string idno = 6;</code>
     */
    public Builder clearIdno() {
      
      idno_ = getDefaultInstance().getIdno();
      onChanged();
      return this;
    }
    /**
     * <code>string idno = 6;</code>
     */
    public Builder setIdnoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      idno_ = value;
      onChanged();
      return this;
    }

    private int sex_ ;
    /**
     * <code>int32 sex = 7;</code>
     */
    public int getSex() {
      return sex_;
    }
    /**
     * <code>int32 sex = 7;</code>
     */
    public Builder setSex(int value) {
      
      sex_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 sex = 7;</code>
     */
    public Builder clearSex() {
      
      sex_ = 0;
      onChanged();
      return this;
    }

    private int age_ ;
    /**
     * <code>int32 age = 8;</code>
     */
    public int getAge() {
      return age_;
    }
    /**
     * <code>int32 age = 8;</code>
     */
    public Builder setAge(int value) {
      
      age_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 age = 8;</code>
     */
    public Builder clearAge() {
      
      age_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object avatar_ = "";
    /**
     * <code>string avatar = 9;</code>
     */
    public java.lang.String getAvatar() {
      java.lang.Object ref = avatar_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        avatar_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string avatar = 9;</code>
     */
    public com.google.protobuf.ByteString
        getAvatarBytes() {
      java.lang.Object ref = avatar_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        avatar_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string avatar = 9;</code>
     */
    public Builder setAvatar(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      avatar_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string avatar = 9;</code>
     */
    public Builder clearAvatar() {
      
      avatar_ = getDefaultInstance().getAvatar();
      onChanged();
      return this;
    }
    /**
     * <code>string avatar = 9;</code>
     */
    public Builder setAvatarBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      avatar_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object birthday_ = "";
    /**
     * <code>string birthday = 10;</code>
     */
    public java.lang.String getBirthday() {
      java.lang.Object ref = birthday_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        birthday_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string birthday = 10;</code>
     */
    public com.google.protobuf.ByteString
        getBirthdayBytes() {
      java.lang.Object ref = birthday_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        birthday_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string birthday = 10;</code>
     */
    public Builder setBirthday(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      birthday_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string birthday = 10;</code>
     */
    public Builder clearBirthday() {
      
      birthday_ = getDefaultInstance().getBirthday();
      onChanged();
      return this;
    }
    /**
     * <code>string birthday = 10;</code>
     */
    public Builder setBirthdayBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      birthday_ = value;
      onChanged();
      return this;
    }

    private long createtime_ ;
    /**
     * <code>int64 createtime = 11;</code>
     */
    public long getCreatetime() {
      return createtime_;
    }
    /**
     * <code>int64 createtime = 11;</code>
     */
    public Builder setCreatetime(long value) {
      
      createtime_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int64 createtime = 11;</code>
     */
    public Builder clearCreatetime() {
      
      createtime_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object registerip_ = "";
    /**
     * <code>string registerip = 12;</code>
     */
    public java.lang.String getRegisterip() {
      java.lang.Object ref = registerip_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        registerip_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string registerip = 12;</code>
     */
    public com.google.protobuf.ByteString
        getRegisteripBytes() {
      java.lang.Object ref = registerip_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        registerip_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string registerip = 12;</code>
     */
    public Builder setRegisterip(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      registerip_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string registerip = 12;</code>
     */
    public Builder clearRegisterip() {
      
      registerip_ = getDefaultInstance().getRegisterip();
      onChanged();
      return this;
    }
    /**
     * <code>string registerip = 12;</code>
     */
    public Builder setRegisteripBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      registerip_ = value;
      onChanged();
      return this;
    }

    private int usertype_ ;
    /**
     * <code>int32 usertype = 13;</code>
     */
    public int getUsertype() {
      return usertype_;
    }
    /**
     * <code>int32 usertype = 13;</code>
     */
    public Builder setUsertype(int value) {
      
      usertype_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 usertype = 13;</code>
     */
    public Builder clearUsertype() {
      
      usertype_ = 0;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.user.User)
  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.user.User)
  private static final com.ywt.gapi.user.User DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ywt.gapi.user.User();
  }

  public static com.ywt.gapi.user.User getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<User>
      PARSER = new com.google.protobuf.AbstractParser<User>() {
    public User parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
        return new User(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<User> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<User> getParserForType() {
    return PARSER;
  }

  public com.ywt.gapi.user.User getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

