@Override
    public int hashCode() {
        return Objects.hash(remoteLogSegmentId, startOffset, endOffset, brokerId(), maxTimestampMs,
                eventTimestampMs(), segmentLeaderEpochs, segmentSizeInBytes, customMetadata, state);
    }
Creates a new RemoteLogSegmentMetadata applying the given {@code rlsmUpdate} on this instance. This method will
not update this instance.

@param rlsmUpdate update to be applied.
@return a new instance created by applying the given update on this instance.
storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogSegmentMetadata.java