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.cloudformation.model;
 
 
Container for the parameters to the ListStacks operation.

Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).

 
 public class ListStacksRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

Constraints:
Length: 1 - 1024

 
     private String nextToken;

    
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
 
String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

Constraints:
Length: 1 - 1024

Returns:
String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

 
     public String getNextToken() {
         return ;
     }
    
    
String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

Constraints:
Length: 1 - 1024

Parameters:
nextToken String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

 
     public void setNextToken(String nextToken) {
         this. = nextToken;
     }
    
    
String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

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

Constraints:
Length: 1 - 1024

Parameters:
nextToken String that identifies the start of the next list of stacks, if there is one.

Default: There is no default value.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ListStacksRequest withNextToken(String nextToken) {
         this. = nextToken;
         return this;
     }

    
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

Returns:
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

Parameters:
stackStatusFilters Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
    public void setStackStatusFilters(java.util.Collection<StringstackStatusFilters) {
        if (stackStatusFilters == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringstackStatusFiltersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(stackStatusFilters.size());
        stackStatusFiltersCopy.addAll(stackStatusFilters);
        this. = stackStatusFiltersCopy;
    }
    
    
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

NOTE: This method appends the values to the existing list (if any). Use setStackStatusFilters(java.util.Collection) or withStackStatusFilters(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:
stackStatusFilters Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListStacksRequest withStackStatusFilters(String... stackStatusFilters) {
        if (getStackStatusFilters() == nullsetStackStatusFilters(new java.util.ArrayList<String>(stackStatusFilters.length));
        for (String value : stackStatusFilters) {
            getStackStatusFilters().add(value);
        }
        return this;
    }
    
    
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

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

Parameters:
stackStatusFilters Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListStacksRequest withStackStatusFilters(java.util.Collection<StringstackStatusFilters) {
        if (stackStatusFilters == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringstackStatusFiltersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(stackStatusFilters.size());
            stackStatusFiltersCopy.addAll(stackStatusFilters);
            this. = stackStatusFiltersCopy;
        }
        return this;
    }

    
Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

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

Parameters:
stackStatusFilters Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListStacksRequest withStackStatusFilters(StackStatus... stackStatusFilters) {
        java.util.ArrayList<StringstackStatusFiltersCopy = new java.util.ArrayList<String>(stackStatusFilters.length);
        for (StackStatus member : stackStatusFilters) {
            stackStatusFiltersCopy.add(member.toString());
        }
        if (getStackStatusFilters() == null) {
            setStackStatusFilters(stackStatusFiltersCopy);
        } else {
            getStackStatusFilters().addAll(stackStatusFiltersCopy);
        }
        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 (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (getStackStatusFilters() != nullsb.append("StackStatusFilters: " + getStackStatusFilters() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((getStackStatusFilters() == null) ? 0 : getStackStatusFilters().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListStacksRequest == falsereturn false;
        ListStacksRequest other = (ListStacksRequest)obj;
        
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        if (other.getStackStatusFilters() == null ^ this.getStackStatusFilters() == nullreturn false;
        if (other.getStackStatusFilters() != null && other.getStackStatusFilters().equals(this.getStackStatusFilters()) == falsereturn false
        return true;
    }
    
    @Override
    public ListStacksRequest clone() {
        
            return (ListStacksRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X