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

Describes one or more of your clusters.

 
 public class DescribeClustersRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
 
A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.

Returns:
A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
 
     public java.util.List<StringgetClusters() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.

Parameters:
clusters A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
 
     public void setClusters(java.util.Collection<Stringclusters) {
         if (clusters == null) {
             this. = null;
             return;
         }
         clustersCopy.addAll(clusters);
         this. = clustersCopy;
     }
    
    
A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.

NOTE: This method appends the values to the existing list (if any). Use setClusters(java.util.Collection) or withClusters(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:
clusters A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeClustersRequest withClusters(String... clusters) {
         if (getClusters() == nullsetClusters(new java.util.ArrayList<String>(clusters.length));
         for (String value : clusters) {
             getClusters().add(value);
         }
         return this;
     }
    
    
A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.

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

Parameters:
clusters A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (clusters == null) {
            this. = null;
        } else {
            clustersCopy.addAll(clusters);
            this. = clustersCopy;
        }
        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 (getClusters() != nullsb.append("Clusters: " + getClusters() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getClusters() == null) ? 0 : getClusters().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeClustersRequest == falsereturn false;
        DescribeClustersRequest other = (DescribeClustersRequest)obj;
        
        if (other.getClusters() == null ^ this.getClusters() == nullreturn false;
        if (other.getClusters() != null && other.getClusters().equals(this.getClusters()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeClustersRequest clone() {
        
            return (DescribeClustersRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X