public static S3Object of(S3ObjectRecord record) {
        long timestamp = 0;
        if (record.timestamp() != 0) {
            timestamp = record.timestamp();
        } else {
            switch (S3ObjectState.fromByte(record.objectState())) {
                case PREPARED:
                    timestamp = record.expiredTimeInMs();
                    break;
                case MARK_DESTROYED:
                    timestamp = record.markDestroyedTimeInMs();
                    break;
                case COMMITTED:
                    timestamp = record.committedTimeInMs();
                    break;
                default:
                    LOGGER.error("Invalid S3ObjectState: {}", S3ObjectState.fromByte(record.objectState()));
            }
        }
        return new S3Object(
            record.objectId(),
            record.objectSize(),
            timestamp,
            S3ObjectState.fromByte(record.objectState()),
            record.attributes()
        );
    }
The timestamp of the object:
- If state = PREPARED, it's the deadline timestamp.
- If state = MARK_DESTROYED, it's the mark destroyed timestamp.
metadata/src/main/java/org/apache/kafka/metadata/stream/S3Object.java