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

The ModifyCacheSubnetGroup action modifies an existing cache subnet group.

 
 public class ModifyCacheSubnetGroupRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

 
     private String cacheSubnetGroupName;

    
A description for the cache subnet group.
 
     private String cacheSubnetGroupDescription;

    
The EC2 subnet IDs for the cache subnet group.
 
The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

Returns:
The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

 
     public String getCacheSubnetGroupName() {
         return ;
     }
    
    
The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

Parameters:
cacheSubnetGroupName The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

 
     public void setCacheSubnetGroupName(String cacheSubnetGroupName) {
         this. = cacheSubnetGroupName;
     }
    
    
The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

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

Parameters:
cacheSubnetGroupName The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyCacheSubnetGroupRequest withCacheSubnetGroupName(String cacheSubnetGroupName) {
         this. = cacheSubnetGroupName;
         return this;
     }

    
A description for the cache subnet group.

Returns:
A description for the cache subnet group.
        return ;
    }
    
    
A description for the cache subnet group.

Parameters:
cacheSubnetGroupDescription A description for the cache subnet group.
    public void setCacheSubnetGroupDescription(String cacheSubnetGroupDescription) {
        this. = cacheSubnetGroupDescription;
    }
    
    
A description for the cache subnet group.

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

Parameters:
cacheSubnetGroupDescription A description for the cache subnet group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyCacheSubnetGroupRequest withCacheSubnetGroupDescription(String cacheSubnetGroupDescription) {
        this. = cacheSubnetGroupDescription;
        return this;
    }

    
The EC2 subnet IDs for the cache subnet group.

Returns:
The EC2 subnet IDs for the cache subnet group.
    public java.util.List<StringgetSubnetIds() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The EC2 subnet IDs for the cache subnet group.

Parameters:
subnetIds The EC2 subnet IDs for the cache subnet group.
    public void setSubnetIds(java.util.Collection<StringsubnetIds) {
        if (subnetIds == null) {
            this. = null;
            return;
        }
        subnetIdsCopy.addAll(subnetIds);
        this. = subnetIdsCopy;
    }
    
    
The EC2 subnet IDs for the cache subnet group.

NOTE: This method appends the values to the existing list (if any). Use setSubnetIds(java.util.Collection) or withSubnetIds(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:
subnetIds The EC2 subnet IDs for the cache subnet group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyCacheSubnetGroupRequest withSubnetIds(String... subnetIds) {
        if (getSubnetIds() == nullsetSubnetIds(new java.util.ArrayList<String>(subnetIds.length));
        for (String value : subnetIds) {
            getSubnetIds().add(value);
        }
        return this;
    }
    
    
The EC2 subnet IDs for the cache subnet group.

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

Parameters:
subnetIds The EC2 subnet IDs for the cache subnet group.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (subnetIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringsubnetIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(subnetIds.size());
            subnetIdsCopy.addAll(subnetIds);
            this. = subnetIdsCopy;
        }
        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 (getCacheSubnetGroupName() != nullsb.append("CacheSubnetGroupName: " + getCacheSubnetGroupName() + ",");
        if (getCacheSubnetGroupDescription() != nullsb.append("CacheSubnetGroupDescription: " + getCacheSubnetGroupDescription() + ",");
        if (getSubnetIds() != nullsb.append("SubnetIds: " + getSubnetIds() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCacheSubnetGroupName() == null) ? 0 : getCacheSubnetGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getCacheSubnetGroupDescription() == null) ? 0 : getCacheSubnetGroupDescription().hashCode()); 
        hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ModifyCacheSubnetGroupRequest == falsereturn false;
        
        if (other.getCacheSubnetGroupName() == null ^ this.getCacheSubnetGroupName() == nullreturn false;
        if (other.getCacheSubnetGroupName() != null && other.getCacheSubnetGroupName().equals(this.getCacheSubnetGroupName()) == falsereturn false
        if (other.getCacheSubnetGroupDescription() == null ^ this.getCacheSubnetGroupDescription() == nullreturn false;
        if (other.getCacheSubnetGroupDescription() != null && other.getCacheSubnetGroupDescription().equals(this.getCacheSubnetGroupDescription()) == falsereturn false
        if (other.getSubnetIds() == null ^ this.getSubnetIds() == nullreturn false;
        if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (ModifyCacheSubnetGroupRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X