public Builder mergeFrom()

in amazon-kinesis-client/src/main/java/software/amazon/kinesis/retrieval/kpl/Messages.java [2147:2197]


      public Builder mergeFrom(Messages.AggregatedRecord other) {
        if (other == Messages.AggregatedRecord.getDefaultInstance()) return this;
        if (!other.partitionKeyTable_.isEmpty()) {
          if (partitionKeyTable_.isEmpty()) {
            partitionKeyTable_ = other.partitionKeyTable_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensurePartitionKeyTableIsMutable();
            partitionKeyTable_.addAll(other.partitionKeyTable_);
          }
          onChanged();
        }
        if (!other.explicitHashKeyTable_.isEmpty()) {
          if (explicitHashKeyTable_.isEmpty()) {
            explicitHashKeyTable_ = other.explicitHashKeyTable_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureExplicitHashKeyTableIsMutable();
            explicitHashKeyTable_.addAll(other.explicitHashKeyTable_);
          }
          onChanged();
        }
        if (recordsBuilder_ == null) {
          if (!other.records_.isEmpty()) {
            if (records_.isEmpty()) {
              records_ = other.records_;
              bitField0_ = (bitField0_ & ~0x00000004);
            } else {
              ensureRecordsIsMutable();
              records_.addAll(other.records_);
            }
            onChanged();
          }
        } else {
          if (!other.records_.isEmpty()) {
            if (recordsBuilder_.isEmpty()) {
              recordsBuilder_.dispose();
              recordsBuilder_ = null;
              records_ = other.records_;
              bitField0_ = (bitField0_ & ~0x00000004);
              recordsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getRecordsFieldBuilder() : null;
            } else {
              recordsBuilder_.addAllMessages(other.records_);
            }
          }
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }