Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010 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;

The LoadBalancerDescription data type.

 
 public class LoadBalancerDescription {

    
Specifies the name associated with the LoadBalancer.
 
     private String loadBalancerName;

    
Specifies the external DNS name associated with the LoadBalancer.
 
     private String dNSName;

    
LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.
 
Provides a list of policies defined for the LoadBalancer.
 
     private Policies policies;

    
Specifies a list of Availability Zones.
 
     private java.util.List<StringavailabilityZones;

    
Provides a list of EC2 instance IDs for the LoadBalancer.
 
     private java.util.List<Instanceinstances;

    
Specifies information regarding the various health probes conducted on the LoadBalancer.
 
     private HealthCheck healthCheck;

    
Provides the date and time the LoadBalancer was created.
 
     private java.util.Date createdTime;

    
Default constructor for a new LoadBalancerDescription object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public LoadBalancerDescription() {}
    
    
Specifies the name associated with the LoadBalancer.

Returns:
Specifies the name associated with the LoadBalancer.
 
     public String getLoadBalancerName() {
         return ;
     }
    
    
Specifies the name associated with the LoadBalancer.

Parameters:
loadBalancerName Specifies the name associated with the LoadBalancer.
 
     public void setLoadBalancerName(String loadBalancerName) {
         this. = loadBalancerName;
     }
    
    
Specifies the name associated with the LoadBalancer.

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

Parameters:
loadBalancerName Specifies the name associated with the LoadBalancer.
Returns:
A reference to this updated object so that method calls can be chained together.
 
    public LoadBalancerDescription withLoadBalancerName(String loadBalancerName) {
        this. = loadBalancerName;
        return this;
    }
    
    
    
Specifies the external DNS name associated with the LoadBalancer.

Returns:
Specifies the external DNS name associated with the LoadBalancer.
    public String getDNSName() {
        return ;
    }
    
    
Specifies the external DNS name associated with the LoadBalancer.

Parameters:
dNSName Specifies the external DNS name associated with the LoadBalancer.
    public void setDNSName(String dNSName) {
        this. = dNSName;
    }
    
    
Specifies the external DNS name associated with the LoadBalancer.

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

Parameters:
dNSName Specifies the external DNS name associated with the LoadBalancer.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withDNSName(String dNSName) {
        this. = dNSName;
        return this;
    }
    
    
    
LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.

Returns:
LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.
        if ( == null) {
             = new java.util.ArrayList<ListenerDescription>();
        }
        return ;
    }
    
    
LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.

Parameters:
listenerDescriptions LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.
    public void setListenerDescriptions(java.util.Collection<ListenerDescriptionlistenerDescriptions) {
        java.util.List<ListenerDescriptionlistenerDescriptionsCopy = new java.util.ArrayList<ListenerDescription>();
        if (listenerDescriptions != null) {
            listenerDescriptionsCopy.addAll(listenerDescriptions);
        }
        this. = listenerDescriptionsCopy;
    }
    
    
LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.

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

Parameters:
listenerDescriptions LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withListenerDescriptions(ListenerDescription... listenerDescriptions) {
        for (ListenerDescription value : listenerDescriptions) {
            getListenerDescriptions().add(value);
        }
        return this;
    }
    
    
LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.

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

Parameters:
listenerDescriptions LoadBalancerPort, InstancePort, Protocol, and PolicyNames are returned in a list of tuples in the ListenerDescriptions element.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.List<ListenerDescriptionlistenerDescriptionsCopy = new java.util.ArrayList<ListenerDescription>();
        if (listenerDescriptions != null) {
            listenerDescriptionsCopy.addAll(listenerDescriptions);
        }
        this. = listenerDescriptionsCopy;
        return this;
    }
    
    
Provides a list of policies defined for the LoadBalancer.

Returns:
Provides a list of policies defined for the LoadBalancer.
    public Policies getPolicies() {
        return ;
    }
    
    
Provides a list of policies defined for the LoadBalancer.

Parameters:
policies Provides a list of policies defined for the LoadBalancer.
    public void setPolicies(Policies policies) {
        this. = policies;
    }
    
    
Provides a list of policies defined for the LoadBalancer.

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

Parameters:
policies Provides a list of policies defined for the LoadBalancer.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withPolicies(Policies policies) {
        this. = policies;
        return this;
    }
    
    
    
Specifies a list of Availability Zones.

Returns:
Specifies a list of Availability Zones.
        if ( == null) {
             = new java.util.ArrayList<String>();
        }
        return ;
    }
    
    
Specifies a list of Availability Zones.

Parameters:
availabilityZones Specifies a list of Availability Zones.
    public void setAvailabilityZones(java.util.Collection<StringavailabilityZones) {
        java.util.List<StringavailabilityZonesCopy = new java.util.ArrayList<String>();
        if (availabilityZones != null) {
            availabilityZonesCopy.addAll(availabilityZones);
        }
        this. = availabilityZonesCopy;
    }
    
    
Specifies a list of Availability Zones.

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

Parameters:
availabilityZones Specifies a list of Availability Zones.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withAvailabilityZones(String... availabilityZones) {
        for (String value : availabilityZones) {
            getAvailabilityZones().add(value);
        }
        return this;
    }
    
    
Specifies a list of Availability Zones.

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

Parameters:
availabilityZones Specifies a list of Availability Zones.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.List<StringavailabilityZonesCopy = new java.util.ArrayList<String>();
        if (availabilityZones != null) {
            availabilityZonesCopy.addAll(availabilityZones);
        }
        this. = availabilityZonesCopy;
        return this;
    }
    
    
Provides a list of EC2 instance IDs for the LoadBalancer.

Returns:
Provides a list of EC2 instance IDs for the LoadBalancer.
    public java.util.List<InstancegetInstances() {
        if ( == null) {
             = new java.util.ArrayList<Instance>();
        }
        return ;
    }
    
    
Provides a list of EC2 instance IDs for the LoadBalancer.

Parameters:
instances Provides a list of EC2 instance IDs for the LoadBalancer.
    public void setInstances(java.util.Collection<Instanceinstances) {
        java.util.List<InstanceinstancesCopy = new java.util.ArrayList<Instance>();
        if (instances != null) {
            instancesCopy.addAll(instances);
        }
        this. = instancesCopy;
    }
    
    
Provides a list of EC2 instance IDs for the LoadBalancer.

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

Parameters:
instances Provides a list of EC2 instance IDs for the LoadBalancer.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withInstances(Instance... instances) {
        for (Instance value : instances) {
            getInstances().add(value);
        }
        return this;
    }
    
    
Provides a list of EC2 instance IDs for the LoadBalancer.

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

Parameters:
instances Provides a list of EC2 instance IDs for the LoadBalancer.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.List<InstanceinstancesCopy = new java.util.ArrayList<Instance>();
        if (instances != null) {
            instancesCopy.addAll(instances);
        }
        this. = instancesCopy;
        return this;
    }
    
    
Specifies information regarding the various health probes conducted on the LoadBalancer.

Returns:
Specifies information regarding the various health probes conducted on the LoadBalancer.
    public HealthCheck getHealthCheck() {
        return ;
    }
    
    
Specifies information regarding the various health probes conducted on the LoadBalancer.

Parameters:
healthCheck Specifies information regarding the various health probes conducted on the LoadBalancer.
    public void setHealthCheck(HealthCheck healthCheck) {
        this. = healthCheck;
    }
    
    
Specifies information regarding the various health probes conducted on the LoadBalancer.

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

Parameters:
healthCheck Specifies information regarding the various health probes conducted on the LoadBalancer.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withHealthCheck(HealthCheck healthCheck) {
        this. = healthCheck;
        return this;
    }
    
    
    
Provides the date and time the LoadBalancer was created.

Returns:
Provides the date and time the LoadBalancer was created.
    public java.util.Date getCreatedTime() {
        return ;
    }
    
    
Provides the date and time the LoadBalancer was created.

Parameters:
createdTime Provides the date and time the LoadBalancer was created.
    public void setCreatedTime(java.util.Date createdTime) {
        this. = createdTime;
    }
    
    
Provides the date and time the LoadBalancer was created.

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

Parameters:
createdTime Provides the date and time the LoadBalancer was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerDescription withCreatedTime(java.util.Date createdTime) {
        this. = createdTime;
        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("{");
        sb.append("LoadBalancerName: " +  + ", ");
        sb.append("DNSName: " +  + ", ");
        sb.append("ListenerDescriptions: " +  + ", ");
        sb.append("Policies: " +  + ", ");
        sb.append("AvailabilityZones: " +  + ", ");
        sb.append("Instances: " +  + ", ");
        sb.append("HealthCheck: " +  + ", ");
        sb.append("CreatedTime: " +  + ", ");
        sb.append("}");
        return sb.toString();
    }
    
}
    
New to GrepCode? Check out our FAQ X