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

Removes one or more tags from the specified load balancer.

 
 public class RemoveTagsRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the load balancer. You can specify a maximum of one load balancer name.
 
The list of tag keys to remove.

Constraints:
Length: 1 -

 
The name of the load balancer. You can specify a maximum of one load balancer name.

Returns:
The name of the load balancer. You can specify a maximum of one load balancer name.
 
     public java.util.List<StringgetLoadBalancerNames() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The name of the load balancer. You can specify a maximum of one load balancer name.

Parameters:
loadBalancerNames The name of the load balancer. You can specify a maximum of one load balancer name.
 
     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 name of the load balancer. You can specify a maximum of one load balancer name.

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 name of the load balancer. You can specify a maximum of one load balancer name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RemoveTagsRequest withLoadBalancerNames(String... loadBalancerNames) {
         if (getLoadBalancerNames() == nullsetLoadBalancerNames(new java.util.ArrayList<String>(loadBalancerNames.length));
         for (String value : loadBalancerNames) {
             getLoadBalancerNames().add(value);
         }
         return this;
    }
    
    
The name of the load balancer. You can specify a maximum of one load balancer name.

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

Parameters:
loadBalancerNames The name of the load balancer. You can specify a maximum of one load balancer name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RemoveTagsRequest withLoadBalancerNames(java.util.Collection<StringloadBalancerNames) {
        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 list of tag keys to remove.

Constraints:
Length: 1 -

Returns:
The list of tag keys to remove.
    public java.util.List<TagKeyOnlygetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<TagKeyOnly>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The list of tag keys to remove.

Constraints:
Length: 1 -

Parameters:
tags The list of tag keys to remove.
    public void setTags(java.util.Collection<TagKeyOnlytags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
The list of tag keys to remove.

NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(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.

Constraints:
Length: 1 -

Parameters:
tags The list of tag keys to remove.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RemoveTagsRequest withTags(TagKeyOnly... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<TagKeyOnly>(tags.length));
        for (TagKeyOnly value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
The list of tag keys to remove.

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

Constraints:
Length: 1 -

Parameters:
tags The list of tag keys to remove.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        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 (getTags() != nullsb.append("Tags: " + getTags() );
        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 + ((getTags() == null) ? 0 : getTags().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RemoveTagsRequest == falsereturn false;
        RemoveTagsRequest other = (RemoveTagsRequest)obj;
        
        if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == nullreturn false;
        if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == falsereturn false
        return true;
    }
    
    @Override
    public RemoveTagsRequest clone() {
        
            return (RemoveTagsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X