// 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 {
private static final long serialVersionUID = 0L;
  // Use User.newBuilder() to construct.
  private User(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private User() {
    username_ = "";
    realname_ = "";
    mobile_ = "";
    idno_ = "";
    avatar_ = "";
    birthday_ = "";
    registerip_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new User();
  }

  @Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private User(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8: {

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

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

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

            mobile_ = s;
            break;
          }
          case 40: {

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

            idno_ = s;
            break;
          }
          case 56: {

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

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

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

            birthday_ = s;
            break;
          }
          case 88: {

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

            registerip_ = s;
            break;
          }
          case 104: {

            usertype_ = input.readInt32();
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            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 {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.user.UserProto.internal_static_com_ywt_gapi_user_User_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.user.UserProto.internal_static_com_ywt_gapi_user_User_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            User.class, Builder.class);
  }

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

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

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

  public static final int MOBILE_FIELD_NUMBER = 4;
  private volatile Object mobile_;
  /**
   * <code>string mobile = 4;</code>
   * @return The mobile.
   */
  @Override
  public String getMobile() {
    Object ref = mobile_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      mobile_ = s;
      return s;
    }
  }
  /**
   * <code>string mobile = 4;</code>
   * @return The bytes for mobile.
   */
  @Override
  public com.google.protobuf.ByteString
      getMobileBytes() {
    Object ref = mobile_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (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>
   * @return The idtype.
   */
  @Override
  public int getIdtype() {
    return idtype_;
  }

  public static final int IDNO_FIELD_NUMBER = 6;
  private volatile Object idno_;
  /**
   * <code>string idno = 6;</code>
   * @return The idno.
   */
  @Override
  public String getIdno() {
    Object ref = idno_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      idno_ = s;
      return s;
    }
  }
  /**
   * <code>string idno = 6;</code>
   * @return The bytes for idno.
   */
  @Override
  public com.google.protobuf.ByteString
      getIdnoBytes() {
    Object ref = idno_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (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>
   * @return The sex.
   */
  @Override
  public int getSex() {
    return sex_;
  }

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

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

  public static final int BIRTHDAY_FIELD_NUMBER = 10;
  private volatile Object birthday_;
  /**
   * <code>string birthday = 10;</code>
   * @return The birthday.
   */
  @Override
  public String getBirthday() {
    Object ref = birthday_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      birthday_ = s;
      return s;
    }
  }
  /**
   * <code>string birthday = 10;</code>
   * @return The bytes for birthday.
   */
  @Override
  public com.google.protobuf.ByteString
      getBirthdayBytes() {
    Object ref = birthday_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (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>
   * @return The createtime.
   */
  @Override
  public long getCreatetime() {
    return createtime_;
  }

  public static final int REGISTERIP_FIELD_NUMBER = 12;
  private volatile Object registerip_;
  /**
   * <code>string registerip = 12;</code>
   * @return The registerip.
   */
  @Override
  public String getRegisterip() {
    Object ref = registerip_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      registerip_ = s;
      return s;
    }
  }
  /**
   * <code>string registerip = 12;</code>
   * @return The bytes for registerip.
   */
  @Override
  public com.google.protobuf.ByteString
      getRegisteripBytes() {
    Object ref = registerip_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (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>
   * @return The usertype.
   */
  @Override
  public int getUsertype() {
    return usertype_;
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

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

  @Override
  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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(realname_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, realname_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mobile_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mobile_);
    }
    if (idtype_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(5, idtype_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idno_)) {
      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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, avatar_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(birthday_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, birthday_);
    }
    if (createtime_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(11, createtime_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registerip_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, registerip_);
    }
    if (usertype_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(13, usertype_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof User)) {
      return super.equals(obj);
    }
    User other = (User) obj;

    if (getUserid()
        != other.getUserid()) return false;
    if (!getUsername()
        .equals(other.getUsername())) return false;
    if (!getRealname()
        .equals(other.getRealname())) return false;
    if (!getMobile()
        .equals(other.getMobile())) return false;
    if (getIdtype()
        != other.getIdtype()) return false;
    if (!getIdno()
        .equals(other.getIdno())) return false;
    if (getSex()
        != other.getSex()) return false;
    if (getAge()
        != other.getAge()) return false;
    if (!getAvatar()
        .equals(other.getAvatar())) return false;
    if (!getBirthday()
        .equals(other.getBirthday())) return false;
    if (getCreatetime()
        != other.getCreatetime()) return false;
    if (!getRegisterip()
        .equals(other.getRegisterip())) return false;
    if (getUsertype()
        != other.getUsertype()) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @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 User parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static User parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static User parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static User parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static User parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static User parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static User parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static 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 User parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static 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 User parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static 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);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(User prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      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.UserProto.internal_static_com_ywt_gapi_user_User_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.user.UserProto.internal_static_com_ywt_gapi_user_User_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              User.class, Builder.class);
    }

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

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @Override
    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;
    }

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

    @Override
    public User getDefaultInstanceForType() {
      return User.getDefaultInstance();
    }

    @Override
    public User build() {
      User result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public User buildPartial() {
      User result = new 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;
    }

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

    public Builder mergeFrom(User other) {
      if (other == 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());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

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

    private int userid_ ;
    /**
     * <code>int32 userid = 1;</code>
     * @return The userid.
     */
    @Override
    public int getUserid() {
      return userid_;
    }
    /**
     * <code>int32 userid = 1;</code>
     * @param value The userid to set.
     * @return This builder for chaining.
     */
    public Builder setUserid(int value) {
      
      userid_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 userid = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearUserid() {
      
      userid_ = 0;
      onChanged();
      return this;
    }

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

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

    private Object mobile_ = "";
    /**
     * <code>string mobile = 4;</code>
     * @return The mobile.
     */
    public String getMobile() {
      Object ref = mobile_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        mobile_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string mobile = 4;</code>
     * @return The bytes for mobile.
     */
    public com.google.protobuf.ByteString
        getMobileBytes() {
      Object ref = mobile_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        mobile_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string mobile = 4;</code>
     * @param value The mobile to set.
     * @return This builder for chaining.
     */
    public Builder setMobile(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      mobile_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearMobile() {
      
      mobile_ = getDefaultInstance().getMobile();
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 4;</code>
     * @param value The bytes for mobile to set.
     * @return This builder for chaining.
     */
    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>
     * @return The idtype.
     */
    @Override
    public int getIdtype() {
      return idtype_;
    }
    /**
     * <code>int32 idtype = 5;</code>
     * @param value The idtype to set.
     * @return This builder for chaining.
     */
    public Builder setIdtype(int value) {
      
      idtype_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 idtype = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearIdtype() {
      
      idtype_ = 0;
      onChanged();
      return this;
    }

    private Object idno_ = "";
    /**
     * <code>string idno = 6;</code>
     * @return The idno.
     */
    public String getIdno() {
      Object ref = idno_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        idno_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string idno = 6;</code>
     * @return The bytes for idno.
     */
    public com.google.protobuf.ByteString
        getIdnoBytes() {
      Object ref = idno_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        idno_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string idno = 6;</code>
     * @param value The idno to set.
     * @return This builder for chaining.
     */
    public Builder setIdno(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idno_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string idno = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearIdno() {
      
      idno_ = getDefaultInstance().getIdno();
      onChanged();
      return this;
    }
    /**
     * <code>string idno = 6;</code>
     * @param value The bytes for idno to set.
     * @return This builder for chaining.
     */
    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>
     * @return The sex.
     */
    @Override
    public int getSex() {
      return sex_;
    }
    /**
     * <code>int32 sex = 7;</code>
     * @param value The sex to set.
     * @return This builder for chaining.
     */
    public Builder setSex(int value) {
      
      sex_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 sex = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearSex() {
      
      sex_ = 0;
      onChanged();
      return this;
    }

    private int age_ ;
    /**
     * <code>int32 age = 8;</code>
     * @return The age.
     */
    @Override
    public int getAge() {
      return age_;
    }
    /**
     * <code>int32 age = 8;</code>
     * @param value The age to set.
     * @return This builder for chaining.
     */
    public Builder setAge(int value) {
      
      age_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 age = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearAge() {
      
      age_ = 0;
      onChanged();
      return this;
    }

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

    private Object birthday_ = "";
    /**
     * <code>string birthday = 10;</code>
     * @return The birthday.
     */
    public String getBirthday() {
      Object ref = birthday_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        birthday_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string birthday = 10;</code>
     * @return The bytes for birthday.
     */
    public com.google.protobuf.ByteString
        getBirthdayBytes() {
      Object ref = birthday_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        birthday_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string birthday = 10;</code>
     * @param value The birthday to set.
     * @return This builder for chaining.
     */
    public Builder setBirthday(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      birthday_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string birthday = 10;</code>
     * @return This builder for chaining.
     */
    public Builder clearBirthday() {
      
      birthday_ = getDefaultInstance().getBirthday();
      onChanged();
      return this;
    }
    /**
     * <code>string birthday = 10;</code>
     * @param value The bytes for birthday to set.
     * @return This builder for chaining.
     */
    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>
     * @return The createtime.
     */
    @Override
    public long getCreatetime() {
      return createtime_;
    }
    /**
     * <code>int64 createtime = 11;</code>
     * @param value The createtime to set.
     * @return This builder for chaining.
     */
    public Builder setCreatetime(long value) {
      
      createtime_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int64 createtime = 11;</code>
     * @return This builder for chaining.
     */
    public Builder clearCreatetime() {
      
      createtime_ = 0L;
      onChanged();
      return this;
    }

    private Object registerip_ = "";
    /**
     * <code>string registerip = 12;</code>
     * @return The registerip.
     */
    public String getRegisterip() {
      Object ref = registerip_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        registerip_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string registerip = 12;</code>
     * @return The bytes for registerip.
     */
    public com.google.protobuf.ByteString
        getRegisteripBytes() {
      Object ref = registerip_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        registerip_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string registerip = 12;</code>
     * @param value The registerip to set.
     * @return This builder for chaining.
     */
    public Builder setRegisterip(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      registerip_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string registerip = 12;</code>
     * @return This builder for chaining.
     */
    public Builder clearRegisterip() {
      
      registerip_ = getDefaultInstance().getRegisterip();
      onChanged();
      return this;
    }
    /**
     * <code>string registerip = 12;</code>
     * @param value The bytes for registerip to set.
     * @return This builder for chaining.
     */
    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>
     * @return The usertype.
     */
    @Override
    public int getUsertype() {
      return usertype_;
    }
    /**
     * <code>int32 usertype = 13;</code>
     * @param value The usertype to set.
     * @return This builder for chaining.
     */
    public Builder setUsertype(int value) {
      
      usertype_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 usertype = 13;</code>
     * @return This builder for chaining.
     */
    public Builder clearUsertype() {
      
      usertype_ = 0;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


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

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

  public static User getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<User>
      PARSER = new com.google.protobuf.AbstractParser<User>() {
    @Override
    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;
  }

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

  @Override
  public User getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

