Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.codedeploy.model;
 
 
Container for the parameters to the ListDeploymentInstances operation.

Lists the instances for a deployment associated with the applicable IAM user or AWS account.

 
 public class ListDeploymentInstancesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The unique ID of a deployment.
 
     private String deploymentId;

    
An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.
 
     private String nextToken;

    
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.
 
The unique ID of a deployment.

Returns:
The unique ID of a deployment.
 
     public String getDeploymentId() {
         return ;
     }
    
    
The unique ID of a deployment.

Parameters:
deploymentId The unique ID of a deployment.
 
     public void setDeploymentId(String deploymentId) {
         this. = deploymentId;
     }
    
    
The unique ID of a deployment.

Returns a reference to this object so that method calls can be chained together.

Parameters:
deploymentId The unique ID of a deployment.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ListDeploymentInstancesRequest withDeploymentId(String deploymentId) {
         this. = deploymentId;
         return this;
     }

    
An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.

Returns:
An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.
 
    public String getNextToken() {
        return ;
    }
    
    
An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.

Parameters:
nextToken An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.

Returns a reference to this object so that method calls can be chained together.

Parameters:
nextToken An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = nextToken;
        return this;
    }

    
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.

Returns:
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.

Parameters:
instanceStatusFilter A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.
    public void setInstanceStatusFilter(java.util.Collection<StringinstanceStatusFilter) {
        if (instanceStatusFilter == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringinstanceStatusFilterCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(instanceStatusFilter.size());
        instanceStatusFilterCopy.addAll(instanceStatusFilter);
        this. = instanceStatusFilterCopy;
    }
    
    
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.

NOTE: This method appends the values to the existing list (if any). Use setInstanceStatusFilter(java.util.Collection) or withInstanceStatusFilter(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceStatusFilter A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListDeploymentInstancesRequest withInstanceStatusFilter(String... instanceStatusFilter) {
        if (getInstanceStatusFilter() == nullsetInstanceStatusFilter(new java.util.ArrayList<String>(instanceStatusFilter.length));
        for (String value : instanceStatusFilter) {
            getInstanceStatusFilter().add(value);
        }
        return this;
    }
    
    
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceStatusFilter A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (instanceStatusFilter == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringinstanceStatusFilterCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(instanceStatusFilter.size());
            instanceStatusFilterCopy.addAll(instanceStatusFilter);
            this. = instanceStatusFilterCopy;
        }
        return this;
    }

    
A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceStatusFilter A subset of instances to list, by status:
  • Pending: Include in the resulting list those instances with pending deployments.
  • InProgress: Include in the resulting list those instances with in-progress deployments.
  • Succeeded: Include in the resulting list those instances with succeeded deployments.
  • Failed: Include in the resulting list those instances with failed deployments.
  • Skipped: Include in the resulting list those instances with skipped deployments.
  • Unknown: Include in the resulting list those instances with deployments in an unknown state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListDeploymentInstancesRequest withInstanceStatusFilter(InstanceStatus... instanceStatusFilter) {
        java.util.ArrayList<StringinstanceStatusFilterCopy = new java.util.ArrayList<String>(instanceStatusFilter.length);
        for (InstanceStatus member : instanceStatusFilter) {
            instanceStatusFilterCopy.add(member.toString());
        }
        if (getInstanceStatusFilter() == null) {
            setInstanceStatusFilter(instanceStatusFilterCopy);
        } else {
            getInstanceStatusFilter().addAll(instanceStatusFilterCopy);
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDeploymentId() != nullsb.append("DeploymentId: " + getDeploymentId() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (getInstanceStatusFilter() != nullsb.append("InstanceStatusFilter: " + getInstanceStatusFilter() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDeploymentId() == null) ? 0 : getDeploymentId().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceStatusFilter() == null) ? 0 : getInstanceStatusFilter().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListDeploymentInstancesRequest == falsereturn false;
        
        if (other.getDeploymentId() == null ^ this.getDeploymentId() == nullreturn false;
        if (other.getDeploymentId() != null && other.getDeploymentId().equals(this.getDeploymentId()) == falsereturn false
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        if (other.getInstanceStatusFilter() == null ^ this.getInstanceStatusFilter() == nullreturn false;
        if (other.getInstanceStatusFilter() != null && other.getInstanceStatusFilter().equals(this.getInstanceStatusFilter()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (ListDeploymentInstancesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X