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

package emu.grasscutter.net.proto;

public final class GivingRecordOuterClass {
  private GivingRecordOuterClass() {}
  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 GivingRecordOrBuilder extends
      // @@protoc_insertion_point(interface_extends:GivingRecord)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>uint32 config_id = 2;</code>
     * @return The configId.
     */
    int getConfigId();

    /**
     * <code>bool is_gadget_giving = 15;</code>
     * @return The isGadgetGiving.
     */
    boolean getIsGadgetGiving();

    /**
     * <code>uint32 last_group_id = 14;</code>
     * @return The lastGroupId.
     */
    int getLastGroupId();

    /**
     * <code>uint32 giving_id = 3;</code>
     * @return The givingId.
     */
    int getGivingId();

    /**
     * <code>bool is_finished = 6;</code>
     * @return The isFinished.
     */
    boolean getIsFinished();

    /**
     * <code>map&lt;uint32, uint32&gt; material_cnt_map = 4;</code>
     */
    int getMaterialCntMapCount();
    /**
     * <code>map&lt;uint32, uint32&gt; material_cnt_map = 4;</code>
     */
    boolean containsMaterialCntMap(
        int key);
    /**
     * Use {@link #getMaterialCntMapMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.Integer, java.lang.Integer>
    getMaterialCntMap();
    /**
     * <code>map&lt;uint32, uint32&gt; material_cnt_map = 4;</code>
     */
    java.util.Map<java.lang.Integer, java.lang.Integer>
    getMaterialCntMapMap();
    /**
     * <code>map&lt;uint32, uint32&gt; material_cnt_map = 4;</code>
     */

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

    int getMaterialCntMapOrThrow(
        int key);

    /**
     * <code>uint32 group_id = 5;</code>
     * @return The groupId.
     */
    int getGroupId();
  }
  /**
   * <pre>
   * Obf: JNJOKGNEKIK
   * </pre>
   *
   * Protobuf type {@code GivingRecord}
   */
  public static final class GivingRecord extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:GivingRecord)
      GivingRecordOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use GivingRecord.newBuilder() to construct.
    private GivingRecord(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private GivingRecord() {
    }

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

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

              configId_ = input.readUInt32();
              break;
            }
            case 24: {

              givingId_ = input.readUInt32();
              break;
            }
            case 34: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                materialCntMap_ = com.google.protobuf.MapField.newMapField(
                    MaterialCntMapDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000001;
              }
              com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Integer>
              materialCntMap__ = input.readMessage(
                  MaterialCntMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              materialCntMap_.getMutableMap().put(
                  materialCntMap__.getKey(), materialCntMap__.getValue());
              break;
            }
            case 40: {

              groupId_ = input.readUInt32();
              break;
            }
            case 48: {

              isFinished_ = input.readBool();
              break;
            }
            case 112: {

              lastGroupId_ = input.readUInt32();
              break;
            }
            case 120: {

              isGadgetGiving_ = input.readBool();
              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 emu.grasscutter.net.proto.GivingRecordOuterClass.internal_static_GivingRecord_descriptor;
    }

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

    public static final int CONFIG_ID_FIELD_NUMBER = 2;
    private int configId_;
    /**
     * <code>uint32 config_id = 2;</code>
     * @return The configId.
     */
    @java.lang.Override
    public int getConfigId() {
      return configId_;
    }

    public static final int IS_GADGET_GIVING_FIELD_NUMBER = 15;
    private boolean isGadgetGiving_;
    /**
     * <code>bool is_gadget_giving = 15;</code>
     * @return The isGadgetGiving.
     */
    @java.lang.Override
    public boolean getIsGadgetGiving() {
      return isGadgetGiving_;
    }

    public static final int LAST_GROUP_ID_FIELD_NUMBER = 14;
    private int lastGroupId_;
    /**
     * <code>uint32 last_group_id = 14;</code>
     * @return The lastGroupId.
     */
    @java.lang.Override
    public int getLastGroupId() {
      return lastGroupId_;
    }

    public static final int GIVING_ID_FIELD_NUMBER = 3;
    private int givingId_;
    /**
     * <code>uint32 giving_id = 3;</code>
     * @return The givingId.
     */
    @java.lang.Override
    public int getGivingId() {
      return givingId_;
    }

    public static final int IS_FINISHED_FIELD_NUMBER = 6;
    private boolean isFinished_;
    /**
     * <code>bool is_finished = 6;</code>
     * @return The isFinished.
     */
    @java.lang.Override
    public boolean getIsFinished() {
      return isFinished_;
    }

    public static final int MATERIAL_CNT_MAP_FIELD_NUMBER = 4;
    private static final class MaterialCntMapDefaultEntryHolder {
      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.GivingRecordOuterClass.internal_static_GivingRecord_MaterialCntMapEntry_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> materialCntMap_;
    private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
    internalGetMaterialCntMap() {
      if (materialCntMap_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            MaterialCntMapDefaultEntryHolder.defaultEntry);
      }
      return materialCntMap_;
    }

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

    @java.lang.Override
    public boolean containsMaterialCntMap(
        int key) {
      
      return internalGetMaterialCntMap().getMap().containsKey(key);
    }
    /**
     * Use {@link #getMaterialCntMapMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.Integer, java.lang.Integer> getMaterialCntMap() {
      return getMaterialCntMapMap();
    }
    /**
     * <code>map&lt;uint32, uint32&gt; material_cnt_map = 4;</code>
     */
    @java.lang.Override

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

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

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

    public static final int GROUP_ID_FIELD_NUMBER = 5;
    private int groupId_;
    /**
     * <code>uint32 group_id = 5;</code>
     * @return The groupId.
     */
    @java.lang.Override
    public int getGroupId() {
      return groupId_;
    }

    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 {
      if (configId_ != 0) {
        output.writeUInt32(2, configId_);
      }
      if (givingId_ != 0) {
        output.writeUInt32(3, givingId_);
      }
      com.google.protobuf.GeneratedMessageV3
        .serializeIntegerMapTo(
          output,
          internalGetMaterialCntMap(),
          MaterialCntMapDefaultEntryHolder.defaultEntry,
          4);
      if (groupId_ != 0) {
        output.writeUInt32(5, groupId_);
      }
      if (isFinished_ != false) {
        output.writeBool(6, isFinished_);
      }
      if (lastGroupId_ != 0) {
        output.writeUInt32(14, lastGroupId_);
      }
      if (isGadgetGiving_ != false) {
        output.writeBool(15, isGadgetGiving_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (configId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, configId_);
      }
      if (givingId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(3, givingId_);
      }
      for (java.util.Map.Entry<java.lang.Integer, java.lang.Integer> entry
           : internalGetMaterialCntMap().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Integer>
        materialCntMap__ = MaterialCntMapDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(4, materialCntMap__);
      }
      if (groupId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(5, groupId_);
      }
      if (isFinished_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(6, isFinished_);
      }
      if (lastGroupId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(14, lastGroupId_);
      }
      if (isGadgetGiving_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(15, isGadgetGiving_);
      }
      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.GivingRecordOuterClass.GivingRecord)) {
        return super.equals(obj);
      }
      emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord other = (emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord) obj;

      if (getConfigId()
          != other.getConfigId()) return false;
      if (getIsGadgetGiving()
          != other.getIsGadgetGiving()) return false;
      if (getLastGroupId()
          != other.getLastGroupId()) return false;
      if (getGivingId()
          != other.getGivingId()) return false;
      if (getIsFinished()
          != other.getIsFinished()) return false;
      if (!internalGetMaterialCntMap().equals(
          other.internalGetMaterialCntMap())) return false;
      if (getGroupId()
          != other.getGroupId()) 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();
      hash = (37 * hash) + CONFIG_ID_FIELD_NUMBER;
      hash = (53 * hash) + getConfigId();
      hash = (37 * hash) + IS_GADGET_GIVING_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getIsGadgetGiving());
      hash = (37 * hash) + LAST_GROUP_ID_FIELD_NUMBER;
      hash = (53 * hash) + getLastGroupId();
      hash = (37 * hash) + GIVING_ID_FIELD_NUMBER;
      hash = (53 * hash) + getGivingId();
      hash = (37 * hash) + IS_FINISHED_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getIsFinished());
      if (!internalGetMaterialCntMap().getMap().isEmpty()) {
        hash = (37 * hash) + MATERIAL_CNT_MAP_FIELD_NUMBER;
        hash = (53 * hash) + internalGetMaterialCntMap().hashCode();
      }
      hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
      hash = (53 * hash) + getGroupId();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord 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.GivingRecordOuterClass.GivingRecord parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord 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.GivingRecordOuterClass.GivingRecord parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord 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.GivingRecordOuterClass.GivingRecord parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord 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.GivingRecordOuterClass.GivingRecord parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord 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.GivingRecordOuterClass.GivingRecord 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;
    }
    /**
     * <pre>
     * Obf: JNJOKGNEKIK
     * </pre>
     *
     * Protobuf type {@code GivingRecord}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:GivingRecord)
        emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecordOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return emu.grasscutter.net.proto.GivingRecordOuterClass.internal_static_GivingRecord_descriptor;
      }

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

      // Construct using emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord.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();
        configId_ = 0;

        isGadgetGiving_ = false;

        lastGroupId_ = 0;

        givingId_ = 0;

        isFinished_ = false;

        internalGetMutableMaterialCntMap().clear();
        groupId_ = 0;

        return this;
      }

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

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

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

      @java.lang.Override
      public emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord buildPartial() {
        emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord result = new emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord(this);
        int from_bitField0_ = bitField0_;
        result.configId_ = configId_;
        result.isGadgetGiving_ = isGadgetGiving_;
        result.lastGroupId_ = lastGroupId_;
        result.givingId_ = givingId_;
        result.isFinished_ = isFinished_;
        result.materialCntMap_ = internalGetMaterialCntMap();
        result.materialCntMap_.makeImmutable();
        result.groupId_ = groupId_;
        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.GivingRecordOuterClass.GivingRecord) {
          return mergeFrom((emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord other) {
        if (other == emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord.getDefaultInstance()) return this;
        if (other.getConfigId() != 0) {
          setConfigId(other.getConfigId());
        }
        if (other.getIsGadgetGiving() != false) {
          setIsGadgetGiving(other.getIsGadgetGiving());
        }
        if (other.getLastGroupId() != 0) {
          setLastGroupId(other.getLastGroupId());
        }
        if (other.getGivingId() != 0) {
          setGivingId(other.getGivingId());
        }
        if (other.getIsFinished() != false) {
          setIsFinished(other.getIsFinished());
        }
        internalGetMutableMaterialCntMap().mergeFrom(
            other.internalGetMaterialCntMap());
        if (other.getGroupId() != 0) {
          setGroupId(other.getGroupId());
        }
        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.GivingRecordOuterClass.GivingRecord parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int configId_ ;
      /**
       * <code>uint32 config_id = 2;</code>
       * @return The configId.
       */
      @java.lang.Override
      public int getConfigId() {
        return configId_;
      }
      /**
       * <code>uint32 config_id = 2;</code>
       * @param value The configId to set.
       * @return This builder for chaining.
       */
      public Builder setConfigId(int value) {
        
        configId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint32 config_id = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearConfigId() {
        
        configId_ = 0;
        onChanged();
        return this;
      }

      private boolean isGadgetGiving_ ;
      /**
       * <code>bool is_gadget_giving = 15;</code>
       * @return The isGadgetGiving.
       */
      @java.lang.Override
      public boolean getIsGadgetGiving() {
        return isGadgetGiving_;
      }
      /**
       * <code>bool is_gadget_giving = 15;</code>
       * @param value The isGadgetGiving to set.
       * @return This builder for chaining.
       */
      public Builder setIsGadgetGiving(boolean value) {
        
        isGadgetGiving_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bool is_gadget_giving = 15;</code>
       * @return This builder for chaining.
       */
      public Builder clearIsGadgetGiving() {
        
        isGadgetGiving_ = false;
        onChanged();
        return this;
      }

      private int lastGroupId_ ;
      /**
       * <code>uint32 last_group_id = 14;</code>
       * @return The lastGroupId.
       */
      @java.lang.Override
      public int getLastGroupId() {
        return lastGroupId_;
      }
      /**
       * <code>uint32 last_group_id = 14;</code>
       * @param value The lastGroupId to set.
       * @return This builder for chaining.
       */
      public Builder setLastGroupId(int value) {
        
        lastGroupId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint32 last_group_id = 14;</code>
       * @return This builder for chaining.
       */
      public Builder clearLastGroupId() {
        
        lastGroupId_ = 0;
        onChanged();
        return this;
      }

      private int givingId_ ;
      /**
       * <code>uint32 giving_id = 3;</code>
       * @return The givingId.
       */
      @java.lang.Override
      public int getGivingId() {
        return givingId_;
      }
      /**
       * <code>uint32 giving_id = 3;</code>
       * @param value The givingId to set.
       * @return This builder for chaining.
       */
      public Builder setGivingId(int value) {
        
        givingId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint32 giving_id = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearGivingId() {
        
        givingId_ = 0;
        onChanged();
        return this;
      }

      private boolean isFinished_ ;
      /**
       * <code>bool is_finished = 6;</code>
       * @return The isFinished.
       */
      @java.lang.Override
      public boolean getIsFinished() {
        return isFinished_;
      }
      /**
       * <code>bool is_finished = 6;</code>
       * @param value The isFinished to set.
       * @return This builder for chaining.
       */
      public Builder setIsFinished(boolean value) {
        
        isFinished_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bool is_finished = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearIsFinished() {
        
        isFinished_ = false;
        onChanged();
        return this;
      }

      private com.google.protobuf.MapField<
          java.lang.Integer, java.lang.Integer> materialCntMap_;
      private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
      internalGetMaterialCntMap() {
        if (materialCntMap_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              MaterialCntMapDefaultEntryHolder.defaultEntry);
        }
        return materialCntMap_;
      }
      private com.google.protobuf.MapField<java.lang.Integer, java.lang.Integer>
      internalGetMutableMaterialCntMap() {
        onChanged();;
        if (materialCntMap_ == null) {
          materialCntMap_ = com.google.protobuf.MapField.newMapField(
              MaterialCntMapDefaultEntryHolder.defaultEntry);
        }
        if (!materialCntMap_.isMutable()) {
          materialCntMap_ = materialCntMap_.copy();
        }
        return materialCntMap_;
      }

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

      @java.lang.Override
      public boolean containsMaterialCntMap(
          int key) {
        
        return internalGetMaterialCntMap().getMap().containsKey(key);
      }
      /**
       * Use {@link #getMaterialCntMapMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.Integer, java.lang.Integer> getMaterialCntMap() {
        return getMaterialCntMapMap();
      }
      /**
       * <code>map&lt;uint32, uint32&gt; material_cnt_map = 4;</code>
       */
      @java.lang.Override

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

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

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

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

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

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

      private int groupId_ ;
      /**
       * <code>uint32 group_id = 5;</code>
       * @return The groupId.
       */
      @java.lang.Override
      public int getGroupId() {
        return groupId_;
      }
      /**
       * <code>uint32 group_id = 5;</code>
       * @param value The groupId to set.
       * @return This builder for chaining.
       */
      public Builder setGroupId(int value) {
        
        groupId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint32 group_id = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearGroupId() {
        
        groupId_ = 0;
        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:GivingRecord)
    }

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

    public static emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

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

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_GivingRecord_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_GivingRecord_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_GivingRecord_MaterialCntMapEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_GivingRecord_MaterialCntMapEntry_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\022GivingRecord.proto\"\200\002\n\014GivingRecord\022\021\n" +
      "\tconfig_id\030\002 \001(\r\022\030\n\020is_gadget_giving\030\017 \001" +
      "(\010\022\025\n\rlast_group_id\030\016 \001(\r\022\021\n\tgiving_id\030\003" +
      " \001(\r\022\023\n\013is_finished\030\006 \001(\010\022;\n\020material_cn" +
      "t_map\030\004 \003(\0132!.GivingRecord.MaterialCntMa" +
      "pEntry\022\020\n\010group_id\030\005 \001(\r\0325\n\023MaterialCntM" +
      "apEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001B" +
      "\033\n\031emu.grasscutter.net.protob\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_GivingRecord_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_GivingRecord_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_GivingRecord_descriptor,
        new java.lang.String[] { "ConfigId", "IsGadgetGiving", "LastGroupId", "GivingId", "IsFinished", "MaterialCntMap", "GroupId", });
    internal_static_GivingRecord_MaterialCntMapEntry_descriptor =
      internal_static_GivingRecord_descriptor.getNestedTypes().get(0);
    internal_static_GivingRecord_MaterialCntMapEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_GivingRecord_MaterialCntMapEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
