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

package org.okraAx.v3.beans.room;

/**
 * <pre>
 *  角色
 * </pre>
 *
 * Protobuf type {@code org.okraAx.v3.MsgPlayerInfo}
 */
public  final class MsgPlayerInfo extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:org.okraAx.v3.MsgPlayerInfo)
    MsgPlayerInfoOrBuilder {
  // Use MsgPlayerInfo.newBuilder() to construct.
  private MsgPlayerInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private MsgPlayerInfo() {
    uid_ = 0L;
    name_ = "";
    figure_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private MsgPlayerInfo(
      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: {

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

            name_ = s;
            break;
          }
          case 24: {

            figure_ = input.readInt32();
            break;
          }
          case 34: {
            org.okraAx.v3.AxAnyProto.AxAny.Builder subBuilder = null;
            if (ext_ != null) {
              subBuilder = ext_.toBuilder();
            }
            ext_ = input.readMessage(org.okraAx.v3.AxAnyProto.AxAny.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(ext_);
              ext_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
              items_ = com.google.protobuf.MapField.newMapField(
                  ItemsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000010;
            }
            com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Integer>
            items__ = input.readMessage(
                ItemsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            items_.getMutableMap().put(
                items__.getKey(), items__.getValue());
            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 org.okraAx.v3.beans.room.GpcBnRoom.internal_static_org_okraAx_v3_MsgPlayerInfo_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 5:
        return internalGetItems();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.okraAx.v3.beans.room.GpcBnRoom.internal_static_org_okraAx_v3_MsgPlayerInfo_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.okraAx.v3.beans.room.MsgPlayerInfo.class, org.okraAx.v3.beans.room.MsgPlayerInfo.Builder.class);
  }

  private int bitField0_;
  public static final int UID_FIELD_NUMBER = 1;
  private long uid_;
  /**
   * <pre>
   *  角色 唯一ID
   * </pre>
   *
   * <code>optional int64 uid = 1;</code>
   */
  public long getUid() {
    return uid_;
  }

  public static final int NAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   *  角色名称
   * </pre>
   *
   * <code>optional string name = 2;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *  角色名称
   * </pre>
   *
   * <code>optional string name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FIGURE_FIELD_NUMBER = 3;
  private int figure_;
  /**
   * <pre>
   *  形象
   * </pre>
   *
   * <code>optional int32 figure = 3;</code>
   */
  public int getFigure() {
    return figure_;
  }

  public static final int EXT_FIELD_NUMBER = 4;
  private org.okraAx.v3.AxAnyProto.AxAny ext_;
  /**
   * <pre>
   *  扩展数据
   * </pre>
   *
   * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
   */
  public boolean hasExt() {
    return ext_ != null;
  }
  /**
   * <pre>
   *  扩展数据
   * </pre>
   *
   * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
   */
  public org.okraAx.v3.AxAnyProto.AxAny getExt() {
    return ext_ == null ? org.okraAx.v3.AxAnyProto.AxAny.getDefaultInstance() : ext_;
  }
  /**
   * <pre>
   *  扩展数据
   * </pre>
   *
   * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
   */
  public org.okraAx.v3.AxAnyProto.AxAnyOrBuilder getExtOrBuilder() {
    return getExt();
  }

  public static final int ITEMS_FIELD_NUMBER = 5;
  private static final class ItemsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.Integer, java.lang.Integer> defaultEntry =
            com.google.protobuf.MapEntry
            .<java.lang.Integer, java.lang.Integer>newDefaultInstance(
                org.okraAx.v3.beans.room.GpcBnRoom.internal_static_org_okraAx_v3_MsgPlayerInfo_ItemsEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.INT32,
                0,
                com.google.protobuf.WireFormat.FieldType.INT32,
                0);
  }
  private com.google.protobuf.MapField<
      java.lang.Integer, java.lang.Integer> items_;
  private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
  internalGetItems() {
    if (items_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          ItemsDefaultEntryHolder.defaultEntry);
    }
    return items_;
  }

  public int getItemsCount() {
    return internalGetItems().getMap().size();
  }
  /**
   * <pre>
   *  道具数据
   * </pre>
   *
   * <code>map&lt;int32, int32&gt; items = 5;</code>
   */

  public boolean containsItems(
      int key) {
    
    return internalGetItems().getMap().containsKey(key);
  }
  /**
   * Use {@link #getItemsMap()} instead.
   */
  @java.lang.Deprecated
  public java.util.Map<java.lang.Integer, java.lang.Integer> getItems() {
    return getItemsMap();
  }
  /**
   * <pre>
   *  道具数据
   * </pre>
   *
   * <code>map&lt;int32, int32&gt; items = 5;</code>
   */

  public java.util.Map<java.lang.Integer, java.lang.Integer> getItemsMap() {
    return internalGetItems().getMap();
  }
  /**
   * <pre>
   *  道具数据
   * </pre>
   *
   * <code>map&lt;int32, int32&gt; items = 5;</code>
   */

  public int getItemsOrDefault(
      int key,
      int defaultValue) {
    
    java.util.Map<java.lang.Integer, java.lang.Integer> map =
        internalGetItems().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <pre>
   *  道具数据
   * </pre>
   *
   * <code>map&lt;int32, int32&gt; items = 5;</code>
   */

  public int getItemsOrThrow(
      int key) {
    
    java.util.Map<java.lang.Integer, java.lang.Integer> map =
        internalGetItems().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  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 (uid_ != 0L) {
      output.writeInt64(1, uid_);
    }
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    }
    if (figure_ != 0) {
      output.writeInt32(3, figure_);
    }
    if (ext_ != null) {
      output.writeMessage(4, getExt());
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeIntegerMapTo(
        output,
        internalGetItems(),
        ItemsDefaultEntryHolder.defaultEntry,
        5);
  }

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

    size = 0;
    if (uid_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(1, uid_);
    }
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    }
    if (figure_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, figure_);
    }
    if (ext_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getExt());
    }
    for (java.util.Map.Entry<java.lang.Integer, java.lang.Integer> entry
         : internalGetItems().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Integer>
      items__ = ItemsDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, items__);
    }
    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 org.okraAx.v3.beans.room.MsgPlayerInfo)) {
      return super.equals(obj);
    }
    org.okraAx.v3.beans.room.MsgPlayerInfo other = (org.okraAx.v3.beans.room.MsgPlayerInfo) obj;

    boolean result = true;
    result = result && (getUid()
        == other.getUid());
    result = result && getName()
        .equals(other.getName());
    result = result && (getFigure()
        == other.getFigure());
    result = result && (hasExt() == other.hasExt());
    if (hasExt()) {
      result = result && getExt()
          .equals(other.getExt());
    }
    result = result && internalGetItems().equals(
        other.internalGetItems());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptorForType().hashCode();
    hash = (37 * hash) + UID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getUid());
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + FIGURE_FIELD_NUMBER;
    hash = (53 * hash) + getFigure();
    if (hasExt()) {
      hash = (37 * hash) + EXT_FIELD_NUMBER;
      hash = (53 * hash) + getExt().hashCode();
    }
    if (!internalGetItems().getMap().isEmpty()) {
      hash = (37 * hash) + ITEMS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetItems().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.okraAx.v3.beans.room.MsgPlayerInfo parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo 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 org.okraAx.v3.beans.room.MsgPlayerInfo parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo 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 org.okraAx.v3.beans.room.MsgPlayerInfo parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.okraAx.v3.beans.room.MsgPlayerInfo 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(org.okraAx.v3.beans.room.MsgPlayerInfo 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 org.okraAx.v3.MsgPlayerInfo}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:org.okraAx.v3.MsgPlayerInfo)
      org.okraAx.v3.beans.room.MsgPlayerInfoOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.okraAx.v3.beans.room.GpcBnRoom.internal_static_org_okraAx_v3_MsgPlayerInfo_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 5:
          return internalGetItems();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 5:
          return internalGetMutableItems();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.okraAx.v3.beans.room.GpcBnRoom.internal_static_org_okraAx_v3_MsgPlayerInfo_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.okraAx.v3.beans.room.MsgPlayerInfo.class, org.okraAx.v3.beans.room.MsgPlayerInfo.Builder.class);
    }

    // Construct using org.okraAx.v3.beans.room.MsgPlayerInfo.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();
      uid_ = 0L;

      name_ = "";

      figure_ = 0;

      if (extBuilder_ == null) {
        ext_ = null;
      } else {
        ext_ = null;
        extBuilder_ = null;
      }
      internalGetMutableItems().clear();
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.okraAx.v3.beans.room.GpcBnRoom.internal_static_org_okraAx_v3_MsgPlayerInfo_descriptor;
    }

    public org.okraAx.v3.beans.room.MsgPlayerInfo getDefaultInstanceForType() {
      return org.okraAx.v3.beans.room.MsgPlayerInfo.getDefaultInstance();
    }

    public org.okraAx.v3.beans.room.MsgPlayerInfo build() {
      org.okraAx.v3.beans.room.MsgPlayerInfo result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public org.okraAx.v3.beans.room.MsgPlayerInfo buildPartial() {
      org.okraAx.v3.beans.room.MsgPlayerInfo result = new org.okraAx.v3.beans.room.MsgPlayerInfo(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.uid_ = uid_;
      result.name_ = name_;
      result.figure_ = figure_;
      if (extBuilder_ == null) {
        result.ext_ = ext_;
      } else {
        result.ext_ = extBuilder_.build();
      }
      result.items_ = internalGetItems();
      result.items_.makeImmutable();
      result.bitField0_ = to_bitField0_;
      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 org.okraAx.v3.beans.room.MsgPlayerInfo) {
        return mergeFrom((org.okraAx.v3.beans.room.MsgPlayerInfo)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.okraAx.v3.beans.room.MsgPlayerInfo other) {
      if (other == org.okraAx.v3.beans.room.MsgPlayerInfo.getDefaultInstance()) return this;
      if (other.getUid() != 0L) {
        setUid(other.getUid());
      }
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.getFigure() != 0) {
        setFigure(other.getFigure());
      }
      if (other.hasExt()) {
        mergeExt(other.getExt());
      }
      internalGetMutableItems().mergeFrom(
          other.internalGetItems());
      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 {
      org.okraAx.v3.beans.room.MsgPlayerInfo parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.okraAx.v3.beans.room.MsgPlayerInfo) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private long uid_ ;
    /**
     * <pre>
     *  角色 唯一ID
     * </pre>
     *
     * <code>optional int64 uid = 1;</code>
     */
    public long getUid() {
      return uid_;
    }
    /**
     * <pre>
     *  角色 唯一ID
     * </pre>
     *
     * <code>optional int64 uid = 1;</code>
     */
    public Builder setUid(long value) {
      
      uid_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  角色 唯一ID
     * </pre>
     *
     * <code>optional int64 uid = 1;</code>
     */
    public Builder clearUid() {
      
      uid_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     * <pre>
     *  角色名称
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *  角色名称
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *  角色名称
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  角色名称
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  角色名称
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private int figure_ ;
    /**
     * <pre>
     *  形象
     * </pre>
     *
     * <code>optional int32 figure = 3;</code>
     */
    public int getFigure() {
      return figure_;
    }
    /**
     * <pre>
     *  形象
     * </pre>
     *
     * <code>optional int32 figure = 3;</code>
     */
    public Builder setFigure(int value) {
      
      figure_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *  形象
     * </pre>
     *
     * <code>optional int32 figure = 3;</code>
     */
    public Builder clearFigure() {
      
      figure_ = 0;
      onChanged();
      return this;
    }

    private org.okraAx.v3.AxAnyProto.AxAny ext_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.okraAx.v3.AxAnyProto.AxAny, org.okraAx.v3.AxAnyProto.AxAny.Builder, org.okraAx.v3.AxAnyProto.AxAnyOrBuilder> extBuilder_;
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public boolean hasExt() {
      return extBuilder_ != null || ext_ != null;
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public org.okraAx.v3.AxAnyProto.AxAny getExt() {
      if (extBuilder_ == null) {
        return ext_ == null ? org.okraAx.v3.AxAnyProto.AxAny.getDefaultInstance() : ext_;
      } else {
        return extBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public Builder setExt(org.okraAx.v3.AxAnyProto.AxAny value) {
      if (extBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ext_ = value;
        onChanged();
      } else {
        extBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public Builder setExt(
        org.okraAx.v3.AxAnyProto.AxAny.Builder builderForValue) {
      if (extBuilder_ == null) {
        ext_ = builderForValue.build();
        onChanged();
      } else {
        extBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public Builder mergeExt(org.okraAx.v3.AxAnyProto.AxAny value) {
      if (extBuilder_ == null) {
        if (ext_ != null) {
          ext_ =
            org.okraAx.v3.AxAnyProto.AxAny.newBuilder(ext_).mergeFrom(value).buildPartial();
        } else {
          ext_ = value;
        }
        onChanged();
      } else {
        extBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public Builder clearExt() {
      if (extBuilder_ == null) {
        ext_ = null;
        onChanged();
      } else {
        ext_ = null;
        extBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public org.okraAx.v3.AxAnyProto.AxAny.Builder getExtBuilder() {
      
      onChanged();
      return getExtFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    public org.okraAx.v3.AxAnyProto.AxAnyOrBuilder getExtOrBuilder() {
      if (extBuilder_ != null) {
        return extBuilder_.getMessageOrBuilder();
      } else {
        return ext_ == null ?
            org.okraAx.v3.AxAnyProto.AxAny.getDefaultInstance() : ext_;
      }
    }
    /**
     * <pre>
     *  扩展数据
     * </pre>
     *
     * <code>optional .org.okraAx.v3.AxAny ext = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.okraAx.v3.AxAnyProto.AxAny, org.okraAx.v3.AxAnyProto.AxAny.Builder, org.okraAx.v3.AxAnyProto.AxAnyOrBuilder> 
        getExtFieldBuilder() {
      if (extBuilder_ == null) {
        extBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.okraAx.v3.AxAnyProto.AxAny, org.okraAx.v3.AxAnyProto.AxAny.Builder, org.okraAx.v3.AxAnyProto.AxAnyOrBuilder>(
                getExt(),
                getParentForChildren(),
                isClean());
        ext_ = null;
      }
      return extBuilder_;
    }

    private com.google.protobuf.MapField<
        java.lang.Integer, java.lang.Integer> items_;
    private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
    internalGetItems() {
      if (items_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ItemsDefaultEntryHolder.defaultEntry);
      }
      return items_;
    }
    private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
    internalGetMutableItems() {
      onChanged();;
      if (items_ == null) {
        items_ = com.google.protobuf.MapField.newMapField(
            ItemsDefaultEntryHolder.defaultEntry);
      }
      if (!items_.isMutable()) {
        items_ = items_.copy();
      }
      return items_;
    }

    public int getItemsCount() {
      return internalGetItems().getMap().size();
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */

    public boolean containsItems(
        int key) {
      
      return internalGetItems().getMap().containsKey(key);
    }
    /**
     * Use {@link #getItemsMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.Integer, java.lang.Integer> getItems() {
      return getItemsMap();
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */

    public java.util.Map<java.lang.Integer, java.lang.Integer> getItemsMap() {
      return internalGetItems().getMap();
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */

    public int getItemsOrDefault(
        int key,
        int defaultValue) {
      
      java.util.Map<java.lang.Integer, java.lang.Integer> map =
          internalGetItems().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */

    public int getItemsOrThrow(
        int key) {
      
      java.util.Map<java.lang.Integer, java.lang.Integer> map =
          internalGetItems().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearItems() {
      getMutableItems().clear();
      return this;
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */

    public Builder removeItems(
        int key) {
      
      getMutableItems().remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.Integer, java.lang.Integer>
    getMutableItems() {
      return internalGetMutableItems().getMutableMap();
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */
    public Builder putItems(
        int key,
        int value) {
      
      
      getMutableItems().put(key, value);
      return this;
    }
    /**
     * <pre>
     *  道具数据
     * </pre>
     *
     * <code>map&lt;int32, int32&gt; items = 5;</code>
     */

    public Builder putAllItems(
        java.util.Map<java.lang.Integer, java.lang.Integer> values) {
      getMutableItems().putAll(values);
      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:org.okraAx.v3.MsgPlayerInfo)
  }

  // @@protoc_insertion_point(class_scope:org.okraAx.v3.MsgPlayerInfo)
  private static final org.okraAx.v3.beans.room.MsgPlayerInfo DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.okraAx.v3.beans.room.MsgPlayerInfo();
  }

  public static org.okraAx.v3.beans.room.MsgPlayerInfo getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public org.okraAx.v3.beans.room.MsgPlayerInfo getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

