@Override
    public String toString() {
        return "RemoteLogSegmentMetadata{" +
               "remoteLogSegmentId=" + remoteLogSegmentId +
               ", startOffset=" + startOffset +
               ", endOffset=" + endOffset +
               ", brokerId=" + brokerId() +
               ", maxTimestampMs=" + maxTimestampMs +
               ", eventTimestampMs=" + eventTimestampMs() +
               ", segmentLeaderEpochs=" + segmentLeaderEpochs +
               ", segmentSizeInBytes=" + segmentSizeInBytes +
               ", customMetadata=" + customMetadata +
               ", state=" + 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