class SyncStateAdapter {

    @NonNull
    public SyncState get(@NonNull SyncState syncState, @NonNull DatabaseOperationMetadata databaseOperationMetadata) {
        if (databaseOperationMetadata.getOperationFamilyType() == OperationFamilyType.Sync) {
            return syncState;
        } else {
            final Identifier driveIdentifier = syncState.getSyncId(SyncProvider.GoogleDrive);
            final IdentifierMap identifierMap;
            if (driveIdentifier != null) {
                identifierMap = new IdentifierMap(Collections.singletonMap(SyncProvider.GoogleDrive, driveIdentifier));
            } else {
                identifierMap = null;
            }
            final SyncStatusMap syncStatusMap = new SyncStatusMap(Collections.singletonMap(SyncProvider.GoogleDrive, false));
            final MarkedForDeletionMap markedForDeletionMap = new MarkedForDeletionMap(Collections.singletonMap(SyncProvider.GoogleDrive, syncState.isMarkedForDeletion(SyncProvider.GoogleDrive)));
            return new DefaultSyncState(identifierMap, syncStatusMap, markedForDeletionMap, syncState.getLastLocalModificationTime());
        }
    }

    @Inject public  SyncStateAdapter();

}