@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof RemoteLogSegmentMetadataSnapshot)) return false;
        RemoteLogSegmentMetadataSnapshot that = (RemoteLogSegmentMetadataSnapshot) o;
        return startOffset == that.startOffset
                && endOffset == that.endOffset
                && maxTimestampMs == that.maxTimestampMs
                && segmentSizeInBytes == that.segmentSizeInBytes
                && Objects.equals(customMetadata, that.customMetadata)
                && Objects.equals(segmentId, that.segmentId)
                && Objects.equals(segmentLeaderEpochs, that.segmentLeaderEpochs)
                && state == that.state;
    }
Returns the current state of this remote log segment. It can be any of the below
<ul>
    {@link RemoteLogSegmentState#COPY_SEGMENT_STARTED}
    {@link RemoteLogSegmentState#COPY_SEGMENT_FINISHED}
    {@link RemoteLogSegmentState#DELETE_SEGMENT_STARTED}
    {@link RemoteLogSegmentState#DELETE_SEGMENT_FINISHED}
</ul>
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/RemoteLogSegmentMetadataSnapshot.java