class LocalBuildConfigExecutor implements BiFunctionConfigExecutor<LocalModule, LocalBuildConfig, BuildConfig> {

    @Override
    public Optional<BuildConfig> apply(LocalModule localModule, LocalBuildConfig localBuildConfig) {
        Optional<BuildConfig> result = Optional.empty();
        LocalBuildConfig.BuildType buildType = decodeBuildType(localBuildConfig.getBuildType());
        switch (buildType) {
            case FULL_BUILD:
                result = Optional.of(new LocalBuildConfigInternal(localModule.getModule()));
                break;
            case INCREMENTAL_ADD_RESOURCE:
            case INCREMENTAL_DELETE_RESOURCE:
            case INCREMENTAL_UPDATE_RESOURCE:
                result = Optional.of(new LocalBuildConfigInternal(localModule.getModule(), buildType,
                                                                  decodePath(localBuildConfig.getResource())));
                break;
            case INCREMENTAL_BATCH_CHANGES:
                result = Optional.of(new LocalBuildConfigInternal(localModule.getModule(),
                                                                  getResourceChanges(localBuildConfig.getResourceChanges())));
                break;
            case FULL_BUILD_AND_DEPLOY:
                result = Optional.of(new LocalBuildConfigInternal(localModule.getModule(),
                                                                  decodeDeploymentType(localBuildConfig.getDeploymentType()),
                                                                  decodeSuppressHandlers(localBuildConfig.getSuppressHandlers())));
        }
        return result;
    }

    public  LocalBuildConfigExecutor();

}