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 DescribeServices operation.

Describes the specified services running in your cluster.

 
 public class DescribeServicesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the cluster that hosts the service you want to describe.
 
     private String cluster;

    
A list of services you want to describe.
 
The name of the cluster that hosts the service you want to describe.

Returns:
The name of the cluster that hosts the service you want to describe.
 
     public String getCluster() {
         return ;
     }
    
    
The name of the cluster that hosts the service you want to describe.

Parameters:
cluster The name of the cluster that hosts the service you want to describe.
 
     public void setCluster(String cluster) {
         this. = cluster;
     }
    
    
The name of the cluster that hosts the service you want to describe.

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

Parameters:
cluster The name of the cluster that hosts the service you want to describe.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeServicesRequest withCluster(String cluster) {
         this. = cluster;
         return this;
     }

    
A list of services you want to describe.

Returns:
A list of services you want to describe.
 
     public java.util.List<StringgetServices() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of services you want to describe.

Parameters:
services A list of services you want to describe.
 
     public void setServices(java.util.Collection<Stringservices) {
         if (services == null) {
             this. = null;
             return;
         }
         servicesCopy.addAll(services);
         this. = servicesCopy;
    }
    
    
A list of services you want to describe.

NOTE: This method appends the values to the existing list (if any). Use setServices(java.util.Collection) or withServices(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:
services A list of services you want to describe.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeServicesRequest withServices(String... services) {
        if (getServices() == nullsetServices(new java.util.ArrayList<String>(services.length));
        for (String value : services) {
            getServices().add(value);
        }
        return this;
    }
    
    
A list of services you want to describe.

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

Parameters:
services A list of services you want to describe.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (services == null) {
            this. = null;
        } else {
            servicesCopy.addAll(services);
            this. = servicesCopy;
        }
        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 (getCluster() != nullsb.append("Cluster: " + getCluster() + ",");
        if (getServices() != nullsb.append("Services: " + getServices() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCluster() == null) ? 0 : getCluster().hashCode()); 
        hashCode = prime * hashCode + ((getServices() == null) ? 0 : getServices().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeServicesRequest == falsereturn false;
        DescribeServicesRequest other = (DescribeServicesRequest)obj;
        
        if (other.getCluster() == null ^ this.getCluster() == nullreturn false;
        if (other.getCluster() != null && other.getCluster().equals(this.getCluster()) == falsereturn false
        if (other.getServices() == null ^ this.getServices() == nullreturn false;
        if (other.getServices() != null && other.getServices().equals(this.getServices()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeServicesRequest clone() {
        
            return (DescribeServicesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X