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

Describes Amazon RDS instances.

Required Permissions : To use this action, an IAM user must have a Show, Deploy, or 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 DescribeRdsDbInstancesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.
 
     private String stackId;

    
An array containing the ARNs of the instances to be described.
 
The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.

Returns:
The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.
 
     public String getStackId() {
         return ;
     }
    
    
The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.

Parameters:
stackId The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.
 
     public void setStackId(String stackId) {
         this. = stackId;
     }
    
    
The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.

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

Parameters:
stackId The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeRdsDbInstancesRequest withStackId(String stackId) {
         this. = stackId;
         return this;
     }

    
An array containing the ARNs of the instances to be described.

Returns:
An array containing the ARNs of the instances to be described.
 
     public java.util.List<StringgetRdsDbInstanceArns() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
    }
    
    
An array containing the ARNs of the instances to be described.

Parameters:
rdsDbInstanceArns An array containing the ARNs of the instances to be described.
    public void setRdsDbInstanceArns(java.util.Collection<StringrdsDbInstanceArns) {
        if (rdsDbInstanceArns == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringrdsDbInstanceArnsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(rdsDbInstanceArns.size());
        rdsDbInstanceArnsCopy.addAll(rdsDbInstanceArns);
        this. = rdsDbInstanceArnsCopy;
    }
    
    
An array containing the ARNs of the instances to be described.

NOTE: This method appends the values to the existing list (if any). Use setRdsDbInstanceArns(java.util.Collection) or withRdsDbInstanceArns(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:
rdsDbInstanceArns An array containing the ARNs of the instances to be described.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeRdsDbInstancesRequest withRdsDbInstanceArns(String... rdsDbInstanceArns) {
        if (getRdsDbInstanceArns() == nullsetRdsDbInstanceArns(new java.util.ArrayList<String>(rdsDbInstanceArns.length));
        for (String value : rdsDbInstanceArns) {
            getRdsDbInstanceArns().add(value);
        }
        return this;
    }
    
    
An array containing the ARNs of the instances to be described.

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

Parameters:
rdsDbInstanceArns An array containing the ARNs of the instances to be described.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (rdsDbInstanceArns == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringrdsDbInstanceArnsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(rdsDbInstanceArns.size());
            rdsDbInstanceArnsCopy.addAll(rdsDbInstanceArns);
            this. = rdsDbInstanceArnsCopy;
        }
        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 (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (getRdsDbInstanceArns() != nullsb.append("RdsDbInstanceArns: " + getRdsDbInstanceArns() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); 
        hashCode = prime * hashCode + ((getRdsDbInstanceArns() == null) ? 0 : getRdsDbInstanceArns().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeRdsDbInstancesRequest == falsereturn false;
        
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getRdsDbInstanceArns() == null ^ this.getRdsDbInstanceArns() == nullreturn false;
        if (other.getRdsDbInstanceArns() != null && other.getRdsDbInstanceArns().equals(this.getRdsDbInstanceArns()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DescribeRdsDbInstancesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X