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

Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

 
 public class DescribeLoadBalancersRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The names of the load balancers.
 
The marker for the next set of results. (You received this marker from a previous call.)
 
     private String marker;

    
The maximum number of results to return with this call (a number from 1 to 400). The default is 400.

Constraints:
Range: 1 - 400

 
     private Integer pageSize;

    
Default constructor for a new DescribeLoadBalancersRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public DescribeLoadBalancersRequest() {}
    
    
Constructs a new DescribeLoadBalancersRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
loadBalancerNames The names of the load balancers.
 
     public DescribeLoadBalancersRequest(java.util.List<StringloadBalancerNames) {
         setLoadBalancerNames(loadBalancerNames);
     }

    
The names of the load balancers.

Returns:
The names of the load balancers.
 
     public java.util.List<StringgetLoadBalancerNames() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The names of the load balancers.

Parameters:
loadBalancerNames The names of the load balancers.
 
     public void setLoadBalancerNames(java.util.Collection<StringloadBalancerNames) {
         if (loadBalancerNames == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringloadBalancerNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(loadBalancerNames.size());
         loadBalancerNamesCopy.addAll(loadBalancerNames);
         this. = loadBalancerNamesCopy;
     }
    
    
The names of the load balancers.

NOTE: This method appends the values to the existing list (if any). Use setLoadBalancerNames(java.util.Collection) or withLoadBalancerNames(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:
loadBalancerNames The names of the load balancers.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeLoadBalancersRequest withLoadBalancerNames(String... loadBalancerNames) {
        if (getLoadBalancerNames() == nullsetLoadBalancerNames(new java.util.ArrayList<String>(loadBalancerNames.length));
        for (String value : loadBalancerNames) {
            getLoadBalancerNames().add(value);
        }
        return this;
    }
    
    
The names of the load balancers.

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

Parameters:
loadBalancerNames The names of the load balancers.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (loadBalancerNames == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringloadBalancerNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(loadBalancerNames.size());
            loadBalancerNamesCopy.addAll(loadBalancerNames);
            this. = loadBalancerNamesCopy;
        }
        return this;
    }

    
The marker for the next set of results. (You received this marker from a previous call.)

Returns:
The marker for the next set of results. (You received this marker from a previous call.)
    public String getMarker() {
        return ;
    }
    
    
The marker for the next set of results. (You received this marker from a previous call.)

Parameters:
marker The marker for the next set of results. (You received this marker from a previous call.)
    public void setMarker(String marker) {
        this. = marker;
    }
    
    
The marker for the next set of results. (You received this marker from a previous call.)

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

Parameters:
marker The marker for the next set of results. (You received this marker from a previous call.)
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = marker;
        return this;
    }

    
The maximum number of results to return with this call (a number from 1 to 400). The default is 400.

Constraints:
Range: 1 - 400

Returns:
The maximum number of results to return with this call (a number from 1 to 400). The default is 400.
    public Integer getPageSize() {
        return ;
    }
    
    
The maximum number of results to return with this call (a number from 1 to 400). The default is 400.

Constraints:
Range: 1 - 400

Parameters:
pageSize The maximum number of results to return with this call (a number from 1 to 400). The default is 400.
    public void setPageSize(Integer pageSize) {
        this. = pageSize;
    }
    
    
The maximum number of results to return with this call (a number from 1 to 400). The default is 400.

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

Constraints:
Range: 1 - 400

Parameters:
pageSize The maximum number of results to return with this call (a number from 1 to 400). The default is 400.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = pageSize;
        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 (getLoadBalancerNames() != nullsb.append("LoadBalancerNames: " + getLoadBalancerNames() + ",");
        if (getMarker() != nullsb.append("Marker: " + getMarker() + ",");
        if (getPageSize() != nullsb.append("PageSize: " + getPageSize() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); 
        hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); 
        hashCode = prime * hashCode + ((getPageSize() == null) ? 0 : getPageSize().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeLoadBalancersRequest == falsereturn false;
        
        if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == nullreturn false;
        if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == falsereturn false
        if (other.getMarker() == null ^ this.getMarker() == nullreturn false;
        if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == falsereturn false
        if (other.getPageSize() == null ^ this.getPageSize() == nullreturn false;
        if (other.getPageSize() != null && other.getPageSize().equals(this.getPageSize()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DescribeLoadBalancersRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X