// Path: core/src/main/java/com/liveperson/ephemerals/deploy/Deployment.java
// public final class Deployment {
// 
//     /*
//      * Deployment ID: composed by DeploymentUnit name + random string.
//      */
//     private final String id;
// 
//     private final DeploymentUnit deploymentUnit;
// 
//     private final DeploymentConfiguration deploymentConfiguration;
// 
//     public Deployment(Builder builder) {
//         this.deploymentUnit = builder.deploymentUnit;
//         this.deploymentConfiguration = builder.deploymentConfiguration;
//         this.id = DeploymentIdentifierGenerator.generate(builder.deploymentUnit.getName());
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public DeploymentUnit getDeploymentUnit() {
//         return deploymentUnit;
//     }
// 
//     public DeploymentConfiguration getDeploymentConfiguration() {
//         return deploymentConfiguration;
//     }
// 
//     /**
//      *
//      */
//     public static class DeploymentIdentifierGenerator {
// 
//         private final static SecureRandom random = new SecureRandom();
// 
//         public static String generate(String prefix) {
//             return prefix + "-" + new BigInteger(32, random).toString(32);
//         }
//     }
// 
//     public static class Builder {
// 
//         private DeploymentUnit deploymentUnit;
//         private DeploymentConfiguration deploymentConfiguration;
// 
//         public Builder (DeploymentUnit deploymentUnit, DeploymentConfiguration deploymentConfiguration) {
//             this.deploymentUnit = deploymentUnit;
//             this.deploymentConfiguration = deploymentConfiguration;
//         }
// 
//         public Deployment build() {
//             return new Deployment(this);
//         }
//     }
// 
// }
// 
// Path: core/src/main/java/com/liveperson/ephemerals/deploy/DeploymentStatus.java
// public enum DeploymentStatus {
// 
//         /**
//          * Deployment unit is in progress
//          */
//          IN_PROGRESS,
// 
//          /**
//          * Deployment unit has been deployed
//          */
//         FINISHED,
// 
//         /**
//          * Deployment unit has not been deployed
//          */
//         PARTIALLY,
// 
//         /**
//          * Deployment unit has failed
//          */
//         FAILED,
// 
//         /**
//          * Deployment unit status is unknown
//          */
//         UNKNOWN;
// 
// }


import com.liveperson.ephemerals.deploy.Deployment;
import com.liveperson.ephemerals.deploy.DeploymentStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package com.liveperson.ephemerals.deploy.wait;


/**
 * Created by waseemh on 9/16/16.
 */
public abstract class DeploymentStatusWaiter extends Waiter {

    protected Deployment deployment;

    protected DeploymentStatus desiredStatus;

    private final static Logger logger = LoggerFactory.getLogger(DeploymentStatusWaiter.class);

// Path: core/src/main/java/com/liveperson/ephemerals/deploy/Deployment.java
// public final class Deployment {
// 
//     /*
//      * Deployment ID: composed by DeploymentUnit name + random string.
//      */
//     private final String id;
// 
//     private final DeploymentUnit deploymentUnit;
// 
//     private final DeploymentConfiguration deploymentConfiguration;
// 
//     public Deployment(Builder builder) {
//         this.deploymentUnit = builder.deploymentUnit;
//         this.deploymentConfiguration = builder.deploymentConfiguration;
//         this.id = DeploymentIdentifierGenerator.generate(builder.deploymentUnit.getName());
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public DeploymentUnit getDeploymentUnit() {
//         return deploymentUnit;
//     }
// 
//     public DeploymentConfiguration getDeploymentConfiguration() {
//         return deploymentConfiguration;
//     }
// 
//     /**
//      *
//      */
//     public static class DeploymentIdentifierGenerator {
// 
//         private final static SecureRandom random = new SecureRandom();
// 
//         public static String generate(String prefix) {
//             return prefix + "-" + new BigInteger(32, random).toString(32);
//         }
//     }
// 
//     public static class Builder {
// 
//         private DeploymentUnit deploymentUnit;
//         private DeploymentConfiguration deploymentConfiguration;
// 
//         public Builder (DeploymentUnit deploymentUnit, DeploymentConfiguration deploymentConfiguration) {
//             this.deploymentUnit = deploymentUnit;
//             this.deploymentConfiguration = deploymentConfiguration;
//         }
// 
//         public Deployment build() {
//             return new Deployment(this);
//         }
//     }
// 
// }
// 
// Path: core/src/main/java/com/liveperson/ephemerals/deploy/DeploymentStatus.java
// public enum DeploymentStatus {
// 
//         /**
//          * Deployment unit is in progress
//          */
//          IN_PROGRESS,
// 
//          /**
//          * Deployment unit has been deployed
//          */
//         FINISHED,
// 
//         /**
//          * Deployment unit has not been deployed
//          */
//         PARTIALLY,
// 
//         /**
//          * Deployment unit has failed
//          */
//         FAILED,
// 
//         /**
//          * Deployment unit status is unknown
//          */
//         UNKNOWN;
// 
// }


// Path: core/src/main/java/com/liveperson/ephemerals/deploy/wait/DeploymentStatusWaiter.java
import com.liveperson.ephemerals.deploy.Deployment;
import com.liveperson.ephemerals.deploy.DeploymentStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

package com.liveperson.ephemerals.deploy.wait;


/**
 * Created by waseemh on 9/16/16.
 */
public abstract class DeploymentStatusWaiter extends Waiter {

    protected Deployment deployment;

    protected DeploymentStatus desiredStatus;

    private final static Logger logger = LoggerFactory.getLogger(DeploymentStatusWaiter.class);

    public DeploymentStatusWaiter(Deployment deployment, DeploymentStatus desiredStatus) {