All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elasticloadbalancing.model.CreateLoadBalancerRequest Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 */
public class CreateLoadBalancerRequest extends AmazonWebServiceRequest
        implements Serializable, Cloneable {

    /**
     * 

* The name of the load balancer. *

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. *

*/ private String loadBalancerName; /** *

* The listeners. *

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing * Developer Guide. *

*/ private com.amazonaws.internal.SdkInternalList listeners; /** *

* One or more Availability Zones from the same region as the load balancer. * Traffic is equally distributed across all specified Availability Zones. *

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load balancer * using EnableAvailabilityZonesForLoadBalancer. *

*/ private com.amazonaws.internal.SdkInternalList availabilityZones; /** *

* The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. *

*/ private com.amazonaws.internal.SdkInternalList subnets; /** *

* The IDs of the security groups to assign to the load balancer. *

*/ private com.amazonaws.internal.SdkInternalList securityGroups; /** *

* The type of a load balancer. Valid only for load balancers in a VPC. *

*

* By default, Elastic Load Balancing creates an Internet-facing load * balancer with a publicly resolvable DNS name, which resolves to public IP * addresses. For more information about Internet-facing and Internal load * balancers, see Internet-facing and Internal Load Balancers in the Elastic Load * Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer with a * DNS name that resolves to private IP addresses. *

*/ private String scheme; /** *

* A list of tags to assign to the load balancer. *

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** * Default constructor for CreateLoadBalancerRequest object. Callers should * use the setter or fluent setter (with...) methods to initialize the * object after creating it. */ public CreateLoadBalancerRequest() { } /** * Constructs a new CreateLoadBalancerRequest object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param loadBalancerName * The name of the load balancer.

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. */ public CreateLoadBalancerRequest(String loadBalancerName) { setLoadBalancerName(loadBalancerName); } /** * Constructs a new CreateLoadBalancerRequest object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param loadBalancerName * The name of the load balancer.

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. * @param listeners * The listeners. *

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load * Balancing Developer Guide. * @param availabilityZones * One or more Availability Zones from the same region as the load * balancer. Traffic is equally distributed across all specified * Availability Zones. *

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load * balancer using EnableAvailabilityZonesForLoadBalancer. */ public CreateLoadBalancerRequest(String loadBalancerName, java.util.List listeners, java.util.List availabilityZones) { setLoadBalancerName(loadBalancerName); setListeners(listeners); setAvailabilityZones(availabilityZones); } /** *

* The name of the load balancer. *

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. *

* * @param loadBalancerName * The name of the load balancer.

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. */ public void setLoadBalancerName(String loadBalancerName) { this.loadBalancerName = loadBalancerName; } /** *

* The name of the load balancer. *

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. *

* * @return The name of the load balancer.

*

* This name must be unique within your set of load balancers for * the region, must have a maximum of 32 characters, must contain * only alphanumeric characters or hyphens, and cannot begin or end * with a hyphen. */ public String getLoadBalancerName() { return this.loadBalancerName; } /** *

* The name of the load balancer. *

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. *

* * @param loadBalancerName * The name of the load balancer.

*

* This name must be unique within your set of load balancers for the * region, must have a maximum of 32 characters, must contain only * alphanumeric characters or hyphens, and cannot begin or end with a * hyphen. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withLoadBalancerName( String loadBalancerName) { setLoadBalancerName(loadBalancerName); return this; } /** *

* The listeners. *

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing * Developer Guide. *

* * @return The listeners.

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load * Balancing Developer Guide. */ public java.util.List getListeners() { if (listeners == null) { listeners = new com.amazonaws.internal.SdkInternalList(); } return listeners; } /** *

* The listeners. *

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing * Developer Guide. *

* * @param listeners * The listeners.

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load * Balancing Developer Guide. */ public void setListeners(java.util.Collection listeners) { if (listeners == null) { this.listeners = null; return; } this.listeners = new com.amazonaws.internal.SdkInternalList( listeners); } /** *

* The listeners. *

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing * Developer Guide. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setListeners(java.util.Collection)} or * {@link #withListeners(java.util.Collection)} if you want to override the * existing values. *

* * @param listeners * The listeners.

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load * Balancing Developer Guide. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withListeners(Listener... listeners) { if (this.listeners == null) { setListeners(new com.amazonaws.internal.SdkInternalList( listeners.length)); } for (Listener ele : listeners) { this.listeners.add(ele); } return this; } /** *

* The listeners. *

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing * Developer Guide. *

* * @param listeners * The listeners.

*

* For more information, see Listeners for Your Load Balancer in the Elastic Load * Balancing Developer Guide. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withListeners( java.util.Collection listeners) { setListeners(listeners); return this; } /** *

* One or more Availability Zones from the same region as the load balancer. * Traffic is equally distributed across all specified Availability Zones. *

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load balancer * using EnableAvailabilityZonesForLoadBalancer. *

* * @return One or more Availability Zones from the same region as the load * balancer. Traffic is equally distributed across all specified * Availability Zones.

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load * balancer using EnableAvailabilityZonesForLoadBalancer. */ public java.util.List getAvailabilityZones() { if (availabilityZones == null) { availabilityZones = new com.amazonaws.internal.SdkInternalList(); } return availabilityZones; } /** *

* One or more Availability Zones from the same region as the load balancer. * Traffic is equally distributed across all specified Availability Zones. *

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load balancer * using EnableAvailabilityZonesForLoadBalancer. *

* * @param availabilityZones * One or more Availability Zones from the same region as the load * balancer. Traffic is equally distributed across all specified * Availability Zones.

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load * balancer using EnableAvailabilityZonesForLoadBalancer. */ public void setAvailabilityZones( java.util.Collection availabilityZones) { if (availabilityZones == null) { this.availabilityZones = null; return; } this.availabilityZones = new com.amazonaws.internal.SdkInternalList( availabilityZones); } /** *

* One or more Availability Zones from the same region as the load balancer. * Traffic is equally distributed across all specified Availability Zones. *

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load balancer * using EnableAvailabilityZonesForLoadBalancer. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setAvailabilityZones(java.util.Collection)} or * {@link #withAvailabilityZones(java.util.Collection)} if you want to * override the existing values. *

* * @param availabilityZones * One or more Availability Zones from the same region as the load * balancer. Traffic is equally distributed across all specified * Availability Zones.

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load * balancer using EnableAvailabilityZonesForLoadBalancer. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withAvailabilityZones( String... availabilityZones) { if (this.availabilityZones == null) { setAvailabilityZones(new com.amazonaws.internal.SdkInternalList( availabilityZones.length)); } for (String ele : availabilityZones) { this.availabilityZones.add(ele); } return this; } /** *

* One or more Availability Zones from the same region as the load balancer. * Traffic is equally distributed across all specified Availability Zones. *

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load balancer * using EnableAvailabilityZonesForLoadBalancer. *

* * @param availabilityZones * One or more Availability Zones from the same region as the load * balancer. Traffic is equally distributed across all specified * Availability Zones.

*

* You must specify at least one Availability Zone. *

*

* You can add more Availability Zones after you create the load * balancer using EnableAvailabilityZonesForLoadBalancer. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withAvailabilityZones( java.util.Collection availabilityZones) { setAvailabilityZones(availabilityZones); return this; } /** *

* The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. *

* * @return The IDs of the subnets in your VPC to attach to the load * balancer. Specify one subnet per Availability Zone specified in * AvailabilityZones. */ public java.util.List getSubnets() { if (subnets == null) { subnets = new com.amazonaws.internal.SdkInternalList(); } return subnets; } /** *

* The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. *

* * @param subnets * The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. */ public void setSubnets(java.util.Collection subnets) { if (subnets == null) { this.subnets = null; return; } this.subnets = new com.amazonaws.internal.SdkInternalList( subnets); } /** *

* The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setSubnets(java.util.Collection)} or * {@link #withSubnets(java.util.Collection)} if you want to override the * existing values. *

* * @param subnets * The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withSubnets(String... subnets) { if (this.subnets == null) { setSubnets(new com.amazonaws.internal.SdkInternalList( subnets.length)); } for (String ele : subnets) { this.subnets.add(ele); } return this; } /** *

* The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. *

* * @param subnets * The IDs of the subnets in your VPC to attach to the load balancer. * Specify one subnet per Availability Zone specified in * AvailabilityZones. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withSubnets( java.util.Collection subnets) { setSubnets(subnets); return this; } /** *

* The IDs of the security groups to assign to the load balancer. *

* * @return The IDs of the security groups to assign to the load balancer. */ public java.util.List getSecurityGroups() { if (securityGroups == null) { securityGroups = new com.amazonaws.internal.SdkInternalList(); } return securityGroups; } /** *

* The IDs of the security groups to assign to the load balancer. *

* * @param securityGroups * The IDs of the security groups to assign to the load balancer. */ public void setSecurityGroups(java.util.Collection securityGroups) { if (securityGroups == null) { this.securityGroups = null; return; } this.securityGroups = new com.amazonaws.internal.SdkInternalList( securityGroups); } /** *

* The IDs of the security groups to assign to the load balancer. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setSecurityGroups(java.util.Collection)} or * {@link #withSecurityGroups(java.util.Collection)} if you want to override * the existing values. *

* * @param securityGroups * The IDs of the security groups to assign to the load balancer. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withSecurityGroups( String... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new com.amazonaws.internal.SdkInternalList( securityGroups.length)); } for (String ele : securityGroups) { this.securityGroups.add(ele); } return this; } /** *

* The IDs of the security groups to assign to the load balancer. *

* * @param securityGroups * The IDs of the security groups to assign to the load balancer. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withSecurityGroups( java.util.Collection securityGroups) { setSecurityGroups(securityGroups); return this; } /** *

* The type of a load balancer. Valid only for load balancers in a VPC. *

*

* By default, Elastic Load Balancing creates an Internet-facing load * balancer with a publicly resolvable DNS name, which resolves to public IP * addresses. For more information about Internet-facing and Internal load * balancers, see Internet-facing and Internal Load Balancers in the Elastic Load * Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer with a * DNS name that resolves to private IP addresses. *

* * @param scheme * The type of a load balancer. Valid only for load balancers in a * VPC.

*

* By default, Elastic Load Balancing creates an Internet-facing load * balancer with a publicly resolvable DNS name, which resolves to * public IP addresses. For more information about Internet-facing * and Internal load balancers, see Internet-facing and Internal Load Balancers in the Elastic * Load Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer * with a DNS name that resolves to private IP addresses. */ public void setScheme(String scheme) { this.scheme = scheme; } /** *

* The type of a load balancer. Valid only for load balancers in a VPC. *

*

* By default, Elastic Load Balancing creates an Internet-facing load * balancer with a publicly resolvable DNS name, which resolves to public IP * addresses. For more information about Internet-facing and Internal load * balancers, see Internet-facing and Internal Load Balancers in the Elastic Load * Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer with a * DNS name that resolves to private IP addresses. *

* * @return The type of a load balancer. Valid only for load balancers in a * VPC.

*

* By default, Elastic Load Balancing creates an Internet-facing * load balancer with a publicly resolvable DNS name, which resolves * to public IP addresses. For more information about * Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers in the * Elastic Load Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer * with a DNS name that resolves to private IP addresses. */ public String getScheme() { return this.scheme; } /** *

* The type of a load balancer. Valid only for load balancers in a VPC. *

*

* By default, Elastic Load Balancing creates an Internet-facing load * balancer with a publicly resolvable DNS name, which resolves to public IP * addresses. For more information about Internet-facing and Internal load * balancers, see Internet-facing and Internal Load Balancers in the Elastic Load * Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer with a * DNS name that resolves to private IP addresses. *

* * @param scheme * The type of a load balancer. Valid only for load balancers in a * VPC.

*

* By default, Elastic Load Balancing creates an Internet-facing load * balancer with a publicly resolvable DNS name, which resolves to * public IP addresses. For more information about Internet-facing * and Internal load balancers, see Internet-facing and Internal Load Balancers in the Elastic * Load Balancing Developer Guide. *

*

* Specify internal to create an internal load balancer * with a DNS name that resolves to private IP addresses. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withScheme(String scheme) { setScheme(scheme); return this; } /** *

* A list of tags to assign to the load balancer. *

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. *

* * @return A list of tags to assign to the load balancer.

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer * Guide. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* A list of tags to assign to the load balancer. *

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. *

* * @param tags * A list of tags to assign to the load balancer.

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* A list of tags to assign to the load balancer. *

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setTags(java.util.Collection)} or * {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * A list of tags to assign to the load balancer.

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of tags to assign to the load balancer. *

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. *

* * @param tags * A list of tags to assign to the load balancer.

*

* For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateLoadBalancerRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerName() != null) sb.append("LoadBalancerName: " + getLoadBalancerName() + ","); if (getListeners() != null) sb.append("Listeners: " + getListeners() + ","); if (getAvailabilityZones() != null) sb.append("AvailabilityZones: " + getAvailabilityZones() + ","); if (getSubnets() != null) sb.append("Subnets: " + getSubnets() + ","); if (getSecurityGroups() != null) sb.append("SecurityGroups: " + getSecurityGroups() + ","); if (getScheme() != null) sb.append("Scheme: " + getScheme() + ","); if (getTags() != null) sb.append("Tags: " + getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateLoadBalancerRequest == false) return false; CreateLoadBalancerRequest other = (CreateLoadBalancerRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals( this.getLoadBalancerName()) == false) return false; if (other.getListeners() == null ^ this.getListeners() == null) return false; if (other.getListeners() != null && other.getListeners().equals(this.getListeners()) == false) return false; if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null) return false; if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals( this.getAvailabilityZones()) == false) return false; if (other.getSubnets() == null ^ this.getSubnets() == null) return false; if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == false) return false; if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == null) return false; if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == false) return false; if (other.getScheme() == null ^ this.getScheme() == null) return false; if (other.getScheme() != null && other.getScheme().equals(this.getScheme()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName() .hashCode()); hashCode = prime * hashCode + ((getListeners() == null) ? 0 : getListeners().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups() .hashCode()); hashCode = prime * hashCode + ((getScheme() == null) ? 0 : getScheme().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateLoadBalancerRequest clone() { return (CreateLoadBalancerRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy