// Path: scm-provider-api/src/main/java/com/itemis/maven/plugins/unleash/scm/merge/MergeClient.java
// public interface MergeClient {
// 
//   /**
//    * Merges conflicting local and remote changes and writes back the merge result into the output stream.
//    *
//    * @param local the local copy of the conflicting file as a stream. This stream will be closed
//    *          automatically afterwards.
//    * @param remote the remote copy of the conflicting file as a stream. This stream will be closed
//    *          automatically afterwards.
//    * @param base the base copy of the conflicting file (as a stream) which is the ancestor of both, the local and remote
//    *          file. This stream will be closed automatically afterwards.
//    * @param result an output stream to which the merge result can be written. This output stream will be closed
//    *          automatically afterwards.
//    * @throws ScmException if anything goes wrong during the merge operation.
//    */
//   void merge(InputStream local, InputStream remote, InputStream base, OutputStream result) throws ScmException;
// }
// 
// Path: scm-provider-api/src/main/java/com/itemis/maven/plugins/unleash/scm/merge/MergeStrategy.java
// public enum MergeStrategy {
//   /**
//    * No merge requested. The concrete outcome is unspecified but must not be a merge of the files.
//    */
//   DO_NOT_MERGE,
//   /**
//    * Automatically merge files by using the local changes in case of a conflict.
//    */
//   USE_LOCAL,
//   /**
//    * Automatically merge files by using the remote changes in case of a conflict.
//    */
//   USE_REMOTE,
//   /**
//    * Automatically merge files as far as possible but use a callback ({@link MergeClient}) for merge conflict
//    * resolution.
//    */
//   FULL_MERGE;
// }


import java.util.Set;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import com.itemis.maven.plugins.unleash.scm.merge.MergeClient;
import com.itemis.maven.plugins.unleash.scm.merge.MergeStrategy;
package com.itemis.maven.plugins.unleash.scm.requests;



/**
 * A Request for updating the local working copy from the remote repository.<br>
 * <b>USE {@link #builder()} TO CREATE A REQUEST!</b><br>
 * <br>
 * The following configuration options are possible:
 * <ol>
 * <li>Update the whole working directory.</li>
 * <li>Update only specific files of the working directory.</li>
 * <li>Specify a merge strategy and optionally a {@link MergeClient} for update conflicts.</li>
 * </ol>
 *
 * @author <a href="mailto:stanley.hillner@itemis.de">Stanley Hillner</a>
 * @since 0.1.0
 */
public class UpdateRequest {
  private Set<String> pathsToUpdate;
  private String targetRevision;
  private MergeStrategy mergeStrategy = MergeStrategy.DO_NOT_MERGE;
  private MergeClient mergeClient;

  private UpdateRequest() {
// Path: scm-provider-api/src/main/java/com/itemis/maven/plugins/unleash/scm/merge/MergeClient.java
// public interface MergeClient {
// 
//   /**
//    * Merges conflicting local and remote changes and writes back the merge result into the output stream.
//    *
//    * @param local the local copy of the conflicting file as a stream. This stream will be closed
//    *          automatically afterwards.
//    * @param remote the remote copy of the conflicting file as a stream. This stream will be closed
//    *          automatically afterwards.
//    * @param base the base copy of the conflicting file (as a stream) which is the ancestor of both, the local and remote
//    *          file. This stream will be closed automatically afterwards.
//    * @param result an output stream to which the merge result can be written. This output stream will be closed
//    *          automatically afterwards.
//    * @throws ScmException if anything goes wrong during the merge operation.
//    */
//   void merge(InputStream local, InputStream remote, InputStream base, OutputStream result) throws ScmException;
// }
// 
// Path: scm-provider-api/src/main/java/com/itemis/maven/plugins/unleash/scm/merge/MergeStrategy.java
// public enum MergeStrategy {
//   /**
//    * No merge requested. The concrete outcome is unspecified but must not be a merge of the files.
//    */
//   DO_NOT_MERGE,
//   /**
//    * Automatically merge files by using the local changes in case of a conflict.
//    */
//   USE_LOCAL,
//   /**
//    * Automatically merge files by using the remote changes in case of a conflict.
//    */
//   USE_REMOTE,
//   /**
//    * Automatically merge files as far as possible but use a callback ({@link MergeClient}) for merge conflict
//    * resolution.
//    */
//   FULL_MERGE;
// }


// Path: scm-provider-api/src/main/java/com/itemis/maven/plugins/unleash/scm/requests/UpdateRequest.java
import java.util.Set;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import com.itemis.maven.plugins.unleash.scm.merge.MergeClient;
import com.itemis.maven.plugins.unleash.scm.merge.MergeStrategy;

package com.itemis.maven.plugins.unleash.scm.requests;



/**
 * A Request for updating the local working copy from the remote repository.<br>
 * <b>USE {@link #builder()} TO CREATE A REQUEST!</b><br>
 * <br>
 * The following configuration options are possible:
 * <ol>
 * <li>Update the whole working directory.</li>
 * <li>Update only specific files of the working directory.</li>
 * <li>Specify a merge strategy and optionally a {@link MergeClient} for update conflicts.</li>
 * </ol>
 *
 * @author <a href="mailto:stanley.hillner@itemis.de">Stanley Hillner</a>
 * @since 0.1.0
 */
public class UpdateRequest {
  private Set<String> pathsToUpdate;
  private String targetRevision;
  private MergeStrategy mergeStrategy = MergeStrategy.DO_NOT_MERGE;
  private MergeClient mergeClient;

  private UpdateRequest() {
    this.pathsToUpdate = Sets.newHashSet();