public ApiMessageAndVersion toRecord(AutoMQVersion version) {
        S3ObjectRecord record = new S3ObjectRecord()
            .setObjectId(objectId)
            .setObjectSize(objectSize)
            .setObjectState(s3ObjectState.toByte());
        if (version.isHugeClusterSupported()) {
            record.setTimestamp(timestamp);
        } else {
            switch (S3ObjectState.fromByte(record.objectState())) {
                case PREPARED:
                    record.setExpiredTimeInMs(timestamp);
                    break;
                case MARK_DESTROYED:
                    record.setMarkDestroyedTimeInMs(timestamp);
                    break;
                case COMMITTED:
                    record.setCommittedTimeInMs(timestamp);
                    break;
                default:
                    LOGGER.error("Invalid S3ObjectState: {}", S3ObjectState.fromByte(record.objectState()));
            }
        }
        if (version.isObjectAttributesSupported()) {
            record.setAttributes(attributes);
        }
        return new ApiMessageAndVersion(record, version.objectRecordVersion());
    }
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