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

Attaches an Elastic Load Balancing load balancer to a specified layer. For more information, see Elastic Load Balancing .

NOTE: You must create the Elastic Load Balancing instance separately, by using the Elastic Load Balancing console, API, or CLI. For more information, see Elastic Load Balancing Developer Guide.

Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .

 
 public class AttachElasticLoadBalancerRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The Elastic Load Balancing instance's name.
 
     private String elasticLoadBalancerName;

    
The ID of the layer that the Elastic Load Balancing instance is to be attached to.
 
     private String layerId;

    
The Elastic Load Balancing instance's name.

Returns:
The Elastic Load Balancing instance's name.
 
     public String getElasticLoadBalancerName() {
         return ;
     }
    
    
The Elastic Load Balancing instance's name.

Parameters:
elasticLoadBalancerName The Elastic Load Balancing instance's name.
 
     public void setElasticLoadBalancerName(String elasticLoadBalancerName) {
         this. = elasticLoadBalancerName;
     }
    
    
The Elastic Load Balancing instance's name.

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

Parameters:
elasticLoadBalancerName The Elastic Load Balancing instance's name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AttachElasticLoadBalancerRequest withElasticLoadBalancerName(String elasticLoadBalancerName) {
         this. = elasticLoadBalancerName;
         return this;
     }

    
The ID of the layer that the Elastic Load Balancing instance is to be attached to.

Returns:
The ID of the layer that the Elastic Load Balancing instance is to be attached to.
 
     public String getLayerId() {
         return ;
    }
    
    
The ID of the layer that the Elastic Load Balancing instance is to be attached to.

Parameters:
layerId The ID of the layer that the Elastic Load Balancing instance is to be attached to.
    public void setLayerId(String layerId) {
        this. = layerId;
    }
    
    
The ID of the layer that the Elastic Load Balancing instance is to be attached to.

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

Parameters:
layerId The ID of the layer that the Elastic Load Balancing instance is to be attached to.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = layerId;
        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 (getElasticLoadBalancerName() != nullsb.append("ElasticLoadBalancerName: " + getElasticLoadBalancerName() + ",");
        if (getLayerId() != nullsb.append("LayerId: " + getLayerId() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getElasticLoadBalancerName() == null) ? 0 : getElasticLoadBalancerName().hashCode()); 
        hashCode = prime * hashCode + ((getLayerId() == null) ? 0 : getLayerId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof AttachElasticLoadBalancerRequest == falsereturn false;
        
        if (other.getElasticLoadBalancerName() == null ^ this.getElasticLoadBalancerName() == nullreturn false;
        if (other.getElasticLoadBalancerName() != null && other.getElasticLoadBalancerName().equals(this.getElasticLoadBalancerName()) == falsereturn false
        if (other.getLayerId() == null ^ this.getLayerId() == nullreturn false;
        if (other.getLayerId() != null && other.getLayerId().equals(this.getLayerId()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (AttachElasticLoadBalancerRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X