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

package emu.grasscutter.net.proto;

public final class CodexTypeDataOuterClass {
  private CodexTypeDataOuterClass() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface CodexTypeDataOrBuilder extends
      // @@protoc_insertion_point(interface_extends:CodexTypeData)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>repeated uint32 codex_id_list = 14;</code>
     * @return A list containing the codexIdList.
     */
    java.util.List<java.lang.Integer> getCodexIdListList();
    /**
     * <code>repeated uint32 codex_id_list = 14;</code>
     * @return The count of codexIdList.
     */
    int getCodexIdListCount();
    /**
     * <code>repeated uint32 codex_id_list = 14;</code>
     * @param index The index of the element to return.
     * @return The codexIdList at the given index.
     */
    int getCodexIdList(int index);

    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */
    int getWeaponMaxPromoteLevelMapCount();
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */
    boolean containsWeaponMaxPromoteLevelMap(
        int key);
    /**
     * Use {@link #getWeaponMaxPromoteLevelMapMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.Integer, java.lang.Integer>
    getWeaponMaxPromoteLevelMap();
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */
    java.util.Map<java.lang.Integer, java.lang.Integer>
    getWeaponMaxPromoteLevelMapMap();
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */

    int getWeaponMaxPromoteLevelMapOrDefault(
        int key,
        int defaultValue);
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */

    int getWeaponMaxPromoteLevelMapOrThrow(
        int key);

    /**
     * <code>.CodexType type = 13;</code>
     * @return The enum numeric value on the wire for type.
     */
    int getTypeValue();
    /**
     * <code>.CodexType type = 13;</code>
     * @return The type.
     */
    emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType getType();

    /**
     * <code>repeated bool have_viewed_list = 5;</code>
     * @return A list containing the haveViewedList.
     */
    java.util.List<java.lang.Boolean> getHaveViewedListList();
    /**
     * <code>repeated bool have_viewed_list = 5;</code>
     * @return The count of haveViewedList.
     */
    int getHaveViewedListCount();
    /**
     * <code>repeated bool have_viewed_list = 5;</code>
     * @param index The index of the element to return.
     * @return The haveViewedList at the given index.
     */
    boolean getHaveViewedList(int index);
  }
  /**
   * Protobuf type {@code CodexTypeData}
   */
  public static final class CodexTypeData extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:CodexTypeData)
      CodexTypeDataOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use CodexTypeData.newBuilder() to construct.
    private CodexTypeData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private CodexTypeData() {
      codexIdList_ = emptyIntList();
      type_ = 0;
      haveViewedList_ = emptyBooleanList();
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new CodexTypeData();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private CodexTypeData(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      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 34: {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                weaponMaxPromoteLevelMap_ = com.google.protobuf.MapField.newMapField(
                    WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000002;
              }
              com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Integer>
              weaponMaxPromoteLevelMap__ = input.readMessage(
                  WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              weaponMaxPromoteLevelMap_.getMutableMap().put(
                  weaponMaxPromoteLevelMap__.getKey(), weaponMaxPromoteLevelMap__.getValue());
              break;
            }
            case 40: {
              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                haveViewedList_ = newBooleanList();
                mutable_bitField0_ |= 0x00000004;
              }
              haveViewedList_.addBoolean(input.readBool());
              break;
            }
            case 42: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
                haveViewedList_ = newBooleanList();
                mutable_bitField0_ |= 0x00000004;
              }
              while (input.getBytesUntilLimit() > 0) {
                haveViewedList_.addBoolean(input.readBool());
              }
              input.popLimit(limit);
              break;
            }
            case 104: {
              int rawValue = input.readEnum();

              type_ = rawValue;
              break;
            }
            case 112: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                codexIdList_ = newIntList();
                mutable_bitField0_ |= 0x00000001;
              }
              codexIdList_.addInt(input.readUInt32());
              break;
            }
            case 114: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
                codexIdList_ = newIntList();
                mutable_bitField0_ |= 0x00000001;
              }
              while (input.getBytesUntilLimit() > 0) {
                codexIdList_.addInt(input.readUInt32());
              }
              input.popLimit(limit);
              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 {
        if (((mutable_bitField0_ & 0x00000004) != 0)) {
          haveViewedList_.makeImmutable(); // C
        }
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          codexIdList_.makeImmutable(); // C
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return emu.grasscutter.net.proto.CodexTypeDataOuterClass.internal_static_CodexTypeData_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    @java.lang.Override
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 4:
          return internalGetWeaponMaxPromoteLevelMap();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return emu.grasscutter.net.proto.CodexTypeDataOuterClass.internal_static_CodexTypeData_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.class, emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.Builder.class);
    }

    public static final int CODEX_ID_LIST_FIELD_NUMBER = 14;
    private com.google.protobuf.Internal.IntList codexIdList_;
    /**
     * <code>repeated uint32 codex_id_list = 14;</code>
     * @return A list containing the codexIdList.
     */
    @java.lang.Override
    public java.util.List<java.lang.Integer>
        getCodexIdListList() {
      return codexIdList_;
    }
    /**
     * <code>repeated uint32 codex_id_list = 14;</code>
     * @return The count of codexIdList.
     */
    public int getCodexIdListCount() {
      return codexIdList_.size();
    }
    /**
     * <code>repeated uint32 codex_id_list = 14;</code>
     * @param index The index of the element to return.
     * @return The codexIdList at the given index.
     */
    public int getCodexIdList(int index) {
      return codexIdList_.getInt(index);
    }
    private int codexIdListMemoizedSerializedSize = -1;

    public static final int WEAPON_MAX_PROMOTE_LEVEL_MAP_FIELD_NUMBER = 4;
    private static final class WeaponMaxPromoteLevelMapDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.Integer, java.lang.Integer> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.Integer, java.lang.Integer>newDefaultInstance(
                  emu.grasscutter.net.proto.CodexTypeDataOuterClass.internal_static_CodexTypeData_WeaponMaxPromoteLevelMapEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.UINT32,
                  0,
                  com.google.protobuf.WireFormat.FieldType.UINT32,
                  0);
    }
    private com.google.protobuf.MapField<
        java.lang.Integer, java.lang.Integer> weaponMaxPromoteLevelMap_;
    private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
    internalGetWeaponMaxPromoteLevelMap() {
      if (weaponMaxPromoteLevelMap_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry);
      }
      return weaponMaxPromoteLevelMap_;
    }

    public int getWeaponMaxPromoteLevelMapCount() {
      return internalGetWeaponMaxPromoteLevelMap().getMap().size();
    }
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */

    @java.lang.Override
    public boolean containsWeaponMaxPromoteLevelMap(
        int key) {
      
      return internalGetWeaponMaxPromoteLevelMap().getMap().containsKey(key);
    }
    /**
     * Use {@link #getWeaponMaxPromoteLevelMapMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.Integer, java.lang.Integer> getWeaponMaxPromoteLevelMap() {
      return getWeaponMaxPromoteLevelMapMap();
    }
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */
    @java.lang.Override

    public java.util.Map<java.lang.Integer, java.lang.Integer> getWeaponMaxPromoteLevelMapMap() {
      return internalGetWeaponMaxPromoteLevelMap().getMap();
    }
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */
    @java.lang.Override

    public int getWeaponMaxPromoteLevelMapOrDefault(
        int key,
        int defaultValue) {
      
      java.util.Map<java.lang.Integer, java.lang.Integer> map =
          internalGetWeaponMaxPromoteLevelMap().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
     */
    @java.lang.Override

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

    public static final int TYPE_FIELD_NUMBER = 13;
    private int type_;
    /**
     * <code>.CodexType type = 13;</code>
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override public int getTypeValue() {
      return type_;
    }
    /**
     * <code>.CodexType type = 13;</code>
     * @return The type.
     */
    @java.lang.Override public emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType getType() {
      @SuppressWarnings("deprecation")
      emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType result = emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType.valueOf(type_);
      return result == null ? emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType.UNRECOGNIZED : result;
    }

    public static final int HAVE_VIEWED_LIST_FIELD_NUMBER = 5;
    private com.google.protobuf.Internal.BooleanList haveViewedList_;
    /**
     * <code>repeated bool have_viewed_list = 5;</code>
     * @return A list containing the haveViewedList.
     */
    @java.lang.Override
    public java.util.List<java.lang.Boolean>
        getHaveViewedListList() {
      return haveViewedList_;
    }
    /**
     * <code>repeated bool have_viewed_list = 5;</code>
     * @return The count of haveViewedList.
     */
    public int getHaveViewedListCount() {
      return haveViewedList_.size();
    }
    /**
     * <code>repeated bool have_viewed_list = 5;</code>
     * @param index The index of the element to return.
     * @return The haveViewedList at the given index.
     */
    public boolean getHaveViewedList(int index) {
      return haveViewedList_.getBoolean(index);
    }
    private int haveViewedListMemoizedSerializedSize = -1;

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      com.google.protobuf.GeneratedMessageV3
        .serializeIntegerMapTo(
          output,
          internalGetWeaponMaxPromoteLevelMap(),
          WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry,
          4);
      if (getHaveViewedListList().size() > 0) {
        output.writeUInt32NoTag(42);
        output.writeUInt32NoTag(haveViewedListMemoizedSerializedSize);
      }
      for (int i = 0; i < haveViewedList_.size(); i++) {
        output.writeBoolNoTag(haveViewedList_.getBoolean(i));
      }
      if (type_ != emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType.CODEX_TYPE_NONE.getNumber()) {
        output.writeEnum(13, type_);
      }
      if (getCodexIdListList().size() > 0) {
        output.writeUInt32NoTag(114);
        output.writeUInt32NoTag(codexIdListMemoizedSerializedSize);
      }
      for (int i = 0; i < codexIdList_.size(); i++) {
        output.writeUInt32NoTag(codexIdList_.getInt(i));
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      for (java.util.Map.Entry<java.lang.Integer, java.lang.Integer> entry
           : internalGetWeaponMaxPromoteLevelMap().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Integer>
        weaponMaxPromoteLevelMap__ = WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(4, weaponMaxPromoteLevelMap__);
      }
      {
        int dataSize = 0;
        dataSize = 1 * getHaveViewedListList().size();
        size += dataSize;
        if (!getHaveViewedListList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        haveViewedListMemoizedSerializedSize = dataSize;
      }
      if (type_ != emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType.CODEX_TYPE_NONE.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(13, type_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < codexIdList_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(codexIdList_.getInt(i));
        }
        size += dataSize;
        if (!getCodexIdListList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        codexIdListMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData)) {
        return super.equals(obj);
      }
      emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData other = (emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData) obj;

      if (!getCodexIdListList()
          .equals(other.getCodexIdListList())) return false;
      if (!internalGetWeaponMaxPromoteLevelMap().equals(
          other.internalGetWeaponMaxPromoteLevelMap())) return false;
      if (type_ != other.type_) return false;
      if (!getHaveViewedListList()
          .equals(other.getHaveViewedListList())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (getCodexIdListCount() > 0) {
        hash = (37 * hash) + CODEX_ID_LIST_FIELD_NUMBER;
        hash = (53 * hash) + getCodexIdListList().hashCode();
      }
      if (!internalGetWeaponMaxPromoteLevelMap().getMap().isEmpty()) {
        hash = (37 * hash) + WEAPON_MAX_PROMOTE_LEVEL_MAP_FIELD_NUMBER;
        hash = (53 * hash) + internalGetWeaponMaxPromoteLevelMap().hashCode();
      }
      hash = (37 * hash) + TYPE_FIELD_NUMBER;
      hash = (53 * hash) + type_;
      if (getHaveViewedListCount() > 0) {
        hash = (37 * hash) + HAVE_VIEWED_LIST_FIELD_NUMBER;
        hash = (53 * hash) + getHaveViewedListList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    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;
    }
    /**
     * Protobuf type {@code CodexTypeData}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:CodexTypeData)
        emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeDataOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return emu.grasscutter.net.proto.CodexTypeDataOuterClass.internal_static_CodexTypeData_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 4:
            return internalGetWeaponMaxPromoteLevelMap();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 4:
            return internalGetMutableWeaponMaxPromoteLevelMap();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return emu.grasscutter.net.proto.CodexTypeDataOuterClass.internal_static_CodexTypeData_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.class, emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.Builder.class);
      }

      // Construct using emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        codexIdList_ = emptyIntList();
        bitField0_ = (bitField0_ & ~0x00000001);
        internalGetMutableWeaponMaxPromoteLevelMap().clear();
        type_ = 0;

        haveViewedList_ = emptyBooleanList();
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return emu.grasscutter.net.proto.CodexTypeDataOuterClass.internal_static_CodexTypeData_descriptor;
      }

      @java.lang.Override
      public emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData getDefaultInstanceForType() {
        return emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.getDefaultInstance();
      }

      @java.lang.Override
      public emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData build() {
        emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData buildPartial() {
        emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData result = new emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData(this);
        int from_bitField0_ = bitField0_;
        if (((bitField0_ & 0x00000001) != 0)) {
          codexIdList_.makeImmutable();
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.codexIdList_ = codexIdList_;
        result.weaponMaxPromoteLevelMap_ = internalGetWeaponMaxPromoteLevelMap();
        result.weaponMaxPromoteLevelMap_.makeImmutable();
        result.type_ = type_;
        if (((bitField0_ & 0x00000004) != 0)) {
          haveViewedList_.makeImmutable();
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.haveViewedList_ = haveViewedList_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData other) {
        if (other == emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData.getDefaultInstance()) return this;
        if (!other.codexIdList_.isEmpty()) {
          if (codexIdList_.isEmpty()) {
            codexIdList_ = other.codexIdList_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureCodexIdListIsMutable();
            codexIdList_.addAll(other.codexIdList_);
          }
          onChanged();
        }
        internalGetMutableWeaponMaxPromoteLevelMap().mergeFrom(
            other.internalGetWeaponMaxPromoteLevelMap());
        if (other.type_ != 0) {
          setTypeValue(other.getTypeValue());
        }
        if (!other.haveViewedList_.isEmpty()) {
          if (haveViewedList_.isEmpty()) {
            haveViewedList_ = other.haveViewedList_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureHaveViewedListIsMutable();
            haveViewedList_.addAll(other.haveViewedList_);
          }
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.Internal.IntList codexIdList_ = emptyIntList();
      private void ensureCodexIdListIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          codexIdList_ = mutableCopy(codexIdList_);
          bitField0_ |= 0x00000001;
         }
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @return A list containing the codexIdList.
       */
      public java.util.List<java.lang.Integer>
          getCodexIdListList() {
        return ((bitField0_ & 0x00000001) != 0) ?
                 java.util.Collections.unmodifiableList(codexIdList_) : codexIdList_;
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @return The count of codexIdList.
       */
      public int getCodexIdListCount() {
        return codexIdList_.size();
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @param index The index of the element to return.
       * @return The codexIdList at the given index.
       */
      public int getCodexIdList(int index) {
        return codexIdList_.getInt(index);
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @param index The index to set the value at.
       * @param value The codexIdList to set.
       * @return This builder for chaining.
       */
      public Builder setCodexIdList(
          int index, int value) {
        ensureCodexIdListIsMutable();
        codexIdList_.setInt(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @param value The codexIdList to add.
       * @return This builder for chaining.
       */
      public Builder addCodexIdList(int value) {
        ensureCodexIdListIsMutable();
        codexIdList_.addInt(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @param values The codexIdList to add.
       * @return This builder for chaining.
       */
      public Builder addAllCodexIdList(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        ensureCodexIdListIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, codexIdList_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated uint32 codex_id_list = 14;</code>
       * @return This builder for chaining.
       */
      public Builder clearCodexIdList() {
        codexIdList_ = emptyIntList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }

      private com.google.protobuf.MapField<
          java.lang.Integer, java.lang.Integer> weaponMaxPromoteLevelMap_;
      private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
      internalGetWeaponMaxPromoteLevelMap() {
        if (weaponMaxPromoteLevelMap_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry);
        }
        return weaponMaxPromoteLevelMap_;
      }
      private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
      internalGetMutableWeaponMaxPromoteLevelMap() {
        onChanged();;
        if (weaponMaxPromoteLevelMap_ == null) {
          weaponMaxPromoteLevelMap_ = com.google.protobuf.MapField.newMapField(
              WeaponMaxPromoteLevelMapDefaultEntryHolder.defaultEntry);
        }
        if (!weaponMaxPromoteLevelMap_.isMutable()) {
          weaponMaxPromoteLevelMap_ = weaponMaxPromoteLevelMap_.copy();
        }
        return weaponMaxPromoteLevelMap_;
      }

      public int getWeaponMaxPromoteLevelMapCount() {
        return internalGetWeaponMaxPromoteLevelMap().getMap().size();
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */

      @java.lang.Override
      public boolean containsWeaponMaxPromoteLevelMap(
          int key) {
        
        return internalGetWeaponMaxPromoteLevelMap().getMap().containsKey(key);
      }
      /**
       * Use {@link #getWeaponMaxPromoteLevelMapMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.Integer, java.lang.Integer> getWeaponMaxPromoteLevelMap() {
        return getWeaponMaxPromoteLevelMapMap();
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */
      @java.lang.Override

      public java.util.Map<java.lang.Integer, java.lang.Integer> getWeaponMaxPromoteLevelMapMap() {
        return internalGetWeaponMaxPromoteLevelMap().getMap();
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */
      @java.lang.Override

      public int getWeaponMaxPromoteLevelMapOrDefault(
          int key,
          int defaultValue) {
        
        java.util.Map<java.lang.Integer, java.lang.Integer> map =
            internalGetWeaponMaxPromoteLevelMap().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */
      @java.lang.Override

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

      public Builder clearWeaponMaxPromoteLevelMap() {
        internalGetMutableWeaponMaxPromoteLevelMap().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */

      public Builder removeWeaponMaxPromoteLevelMap(
          int key) {
        
        internalGetMutableWeaponMaxPromoteLevelMap().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.Integer, java.lang.Integer>
      getMutableWeaponMaxPromoteLevelMap() {
        return internalGetMutableWeaponMaxPromoteLevelMap().getMutableMap();
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */
      public Builder putWeaponMaxPromoteLevelMap(
          int key,
          int value) {
        
        
        internalGetMutableWeaponMaxPromoteLevelMap().getMutableMap()
            .put(key, value);
        return this;
      }
      /**
       * <code>map&lt;uint32, uint32&gt; weapon_max_promote_level_map = 4;</code>
       */

      public Builder putAllWeaponMaxPromoteLevelMap(
          java.util.Map<java.lang.Integer, java.lang.Integer> values) {
        internalGetMutableWeaponMaxPromoteLevelMap().getMutableMap()
            .putAll(values);
        return this;
      }

      private int type_ = 0;
      /**
       * <code>.CodexType type = 13;</code>
       * @return The enum numeric value on the wire for type.
       */
      @java.lang.Override public int getTypeValue() {
        return type_;
      }
      /**
       * <code>.CodexType type = 13;</code>
       * @param value The enum numeric value on the wire for type to set.
       * @return This builder for chaining.
       */
      public Builder setTypeValue(int value) {
        
        type_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>.CodexType type = 13;</code>
       * @return The type.
       */
      @java.lang.Override
      public emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType getType() {
        @SuppressWarnings("deprecation")
        emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType result = emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType.valueOf(type_);
        return result == null ? emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType.UNRECOGNIZED : result;
      }
      /**
       * <code>.CodexType type = 13;</code>
       * @param value The type to set.
       * @return This builder for chaining.
       */
      public Builder setType(emu.grasscutter.net.proto.CodexTypeOuterClass.CodexType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        type_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>.CodexType type = 13;</code>
       * @return This builder for chaining.
       */
      public Builder clearType() {
        
        type_ = 0;
        onChanged();
        return this;
      }

      private com.google.protobuf.Internal.BooleanList haveViewedList_ = emptyBooleanList();
      private void ensureHaveViewedListIsMutable() {
        if (!((bitField0_ & 0x00000004) != 0)) {
          haveViewedList_ = mutableCopy(haveViewedList_);
          bitField0_ |= 0x00000004;
         }
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @return A list containing the haveViewedList.
       */
      public java.util.List<java.lang.Boolean>
          getHaveViewedListList() {
        return ((bitField0_ & 0x00000004) != 0) ?
                 java.util.Collections.unmodifiableList(haveViewedList_) : haveViewedList_;
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @return The count of haveViewedList.
       */
      public int getHaveViewedListCount() {
        return haveViewedList_.size();
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @param index The index of the element to return.
       * @return The haveViewedList at the given index.
       */
      public boolean getHaveViewedList(int index) {
        return haveViewedList_.getBoolean(index);
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @param index The index to set the value at.
       * @param value The haveViewedList to set.
       * @return This builder for chaining.
       */
      public Builder setHaveViewedList(
          int index, boolean value) {
        ensureHaveViewedListIsMutable();
        haveViewedList_.setBoolean(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @param value The haveViewedList to add.
       * @return This builder for chaining.
       */
      public Builder addHaveViewedList(boolean value) {
        ensureHaveViewedListIsMutable();
        haveViewedList_.addBoolean(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @param values The haveViewedList to add.
       * @return This builder for chaining.
       */
      public Builder addAllHaveViewedList(
          java.lang.Iterable<? extends java.lang.Boolean> values) {
        ensureHaveViewedListIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, haveViewedList_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bool have_viewed_list = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearHaveViewedList() {
        haveViewedList_ = emptyBooleanList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:CodexTypeData)
    }

    // @@protoc_insertion_point(class_scope:CodexTypeData)
    private static final emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData();
    }

    public static emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public emu.grasscutter.net.proto.CodexTypeDataOuterClass.CodexTypeData getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_CodexTypeData_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_CodexTypeData_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_CodexTypeData_WeaponMaxPromoteLevelMapEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_CodexTypeData_WeaponMaxPromoteLevelMapEntry_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\023CodexTypeData.proto\032\017CodexType.proto\"\357" +
      "\001\n\rCodexTypeData\022\025\n\rcodex_id_list\030\016 \003(\r\022" +
      "R\n\034weapon_max_promote_level_map\030\004 \003(\0132,." +
      "CodexTypeData.WeaponMaxPromoteLevelMapEn" +
      "try\022\030\n\004type\030\r \001(\0162\n.CodexType\022\030\n\020have_vi" +
      "ewed_list\030\005 \003(\010\032?\n\035WeaponMaxPromoteLevel" +
      "MapEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001" +
      "B\033\n\031emu.grasscutter.net.protob\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          emu.grasscutter.net.proto.CodexTypeOuterClass.getDescriptor(),
        });
    internal_static_CodexTypeData_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_CodexTypeData_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_CodexTypeData_descriptor,
        new java.lang.String[] { "CodexIdList", "WeaponMaxPromoteLevelMap", "Type", "HaveViewedList", });
    internal_static_CodexTypeData_WeaponMaxPromoteLevelMapEntry_descriptor =
      internal_static_CodexTypeData_descriptor.getNestedTypes().get(0);
    internal_static_CodexTypeData_WeaponMaxPromoteLevelMapEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_CodexTypeData_WeaponMaxPromoteLevelMapEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
    emu.grasscutter.net.proto.CodexTypeOuterClass.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
