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;
 

Describes an Amazon RDS instance.

 
 public class RdsDbInstance implements SerializableCloneable {

    
The instance's ARN.
 
     private String rdsDbInstanceArn;

    
The DB instance identifier.
 
     private String dbInstanceIdentifier;

    
The master user name.
 
     private String dbUser;

    
The database password.
 
     private String dbPassword;

    
The instance's AWS region.
 
     private String region;

    
The instance's address.
 
     private String address;

    
The instance's database engine.
 
     private String engine;

    
The ID of the stack that the instance is registered with.
 
     private String stackId;

    
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.
 
     private Boolean missingOnRds;

    
The instance's ARN.

Returns:
The instance's ARN.
 
     public String getRdsDbInstanceArn() {
         return ;
     }
    
    
The instance's ARN.

Parameters:
rdsDbInstanceArn The instance's ARN.
 
     public void setRdsDbInstanceArn(String rdsDbInstanceArn) {
         this. = rdsDbInstanceArn;
     }
    
    
The instance's ARN.

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

Parameters:
rdsDbInstanceArn The instance's ARN.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withRdsDbInstanceArn(String rdsDbInstanceArn) {
        this. = rdsDbInstanceArn;
        return this;
    }

    
The DB instance identifier.

Returns:
The DB instance identifier.
    public String getDbInstanceIdentifier() {
        return ;
    }
    
    
The DB instance identifier.

Parameters:
dbInstanceIdentifier The DB instance identifier.
    public void setDbInstanceIdentifier(String dbInstanceIdentifier) {
        this. = dbInstanceIdentifier;
    }
    
    
The DB instance identifier.

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

Parameters:
dbInstanceIdentifier The DB instance identifier.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withDbInstanceIdentifier(String dbInstanceIdentifier) {
        this. = dbInstanceIdentifier;
        return this;
    }

    
The master user name.

Returns:
The master user name.
    public String getDbUser() {
        return ;
    }
    
    
The master user name.

Parameters:
dbUser The master user name.
    public void setDbUser(String dbUser) {
        this. = dbUser;
    }
    
    
The master user name.

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

Parameters:
dbUser The master user name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withDbUser(String dbUser) {
        this. = dbUser;
        return this;
    }

    
The database password.

Returns:
The database password.
    public String getDbPassword() {
        return ;
    }
    
    
The database password.

Parameters:
dbPassword The database password.
    public void setDbPassword(String dbPassword) {
        this. = dbPassword;
    }
    
    
The database password.

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

Parameters:
dbPassword The database password.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withDbPassword(String dbPassword) {
        this. = dbPassword;
        return this;
    }

    
The instance's AWS region.

Returns:
The instance's AWS region.
    public String getRegion() {
        return ;
    }
    
    
The instance's AWS region.

Parameters:
region The instance's AWS region.
    public void setRegion(String region) {
        this. = region;
    }
    
    
The instance's AWS region.

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

Parameters:
region The instance's AWS region.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withRegion(String region) {
        this. = region;
        return this;
    }

    
The instance's address.

Returns:
The instance's address.
    public String getAddress() {
        return ;
    }
    
    
The instance's address.

Parameters:
address The instance's address.
    public void setAddress(String address) {
        this. = address;
    }
    
    
The instance's address.

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

Parameters:
address The instance's address.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withAddress(String address) {
        this. = address;
        return this;
    }

    
The instance's database engine.

Returns:
The instance's database engine.
    public String getEngine() {
        return ;
    }
    
    
The instance's database engine.

Parameters:
engine The instance's database engine.
    public void setEngine(String engine) {
        this. = engine;
    }
    
    
The instance's database engine.

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

Parameters:
engine The instance's database engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withEngine(String engine) {
        this. = engine;
        return this;
    }

    
The ID of the stack that the instance is registered with.

Returns:
The ID of the stack that the instance is registered with.
    public String getStackId() {
        return ;
    }
    
    
The ID of the stack that the instance is registered with.

Parameters:
stackId The ID of the stack that the instance is registered with.
    public void setStackId(String stackId) {
        this. = stackId;
    }
    
    
The ID of the stack that the instance is registered with.

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

Parameters:
stackId The ID of the stack that the instance is registered with.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withStackId(String stackId) {
        this. = stackId;
        return this;
    }

    
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.

Returns:
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.
    public Boolean isMissingOnRds() {
        return ;
    }
    
    
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.

Parameters:
missingOnRds Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.
    public void setMissingOnRds(Boolean missingOnRds) {
        this. = missingOnRds;
    }
    
    
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.

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

Parameters:
missingOnRds Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RdsDbInstance withMissingOnRds(Boolean missingOnRds) {
        this. = missingOnRds;
        return this;
    }

    
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.

Returns:
Set to true if AWS OpsWorks was unable to discover the Amazon RDS instance. AWS OpsWorks attempts to discover the instance only once. If this value is set to true, you must deregister the instance and then register it again.
    public Boolean getMissingOnRds() {
        return ;
    }

    
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 (getRdsDbInstanceArn() != nullsb.append("RdsDbInstanceArn: " + getRdsDbInstanceArn() + ",");
        if (getDbInstanceIdentifier() != nullsb.append("DbInstanceIdentifier: " + getDbInstanceIdentifier() + ",");
        if (getDbUser() != nullsb.append("DbUser: " + getDbUser() + ",");
        if (getDbPassword() != nullsb.append("DbPassword: " + getDbPassword() + ",");
        if (getRegion() != nullsb.append("Region: " + getRegion() + ",");
        if (getAddress() != nullsb.append("Address: " + getAddress() + ",");
        if (getEngine() != nullsb.append("Engine: " + getEngine() + ",");
        if (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (isMissingOnRds() != nullsb.append("MissingOnRds: " + isMissingOnRds() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getRdsDbInstanceArn() == null) ? 0 : getRdsDbInstanceArn().hashCode()); 
        hashCode = prime * hashCode + ((getDbInstanceIdentifier() == null) ? 0 : getDbInstanceIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getDbUser() == null) ? 0 : getDbUser().hashCode()); 
        hashCode = prime * hashCode + ((getDbPassword() == null) ? 0 : getDbPassword().hashCode()); 
        hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); 
        hashCode = prime * hashCode + ((getAddress() == null) ? 0 : getAddress().hashCode()); 
        hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); 
        hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); 
        hashCode = prime * hashCode + ((isMissingOnRds() == null) ? 0 : isMissingOnRds().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RdsDbInstance == falsereturn false;
        RdsDbInstance other = (RdsDbInstance)obj;
        
        if (other.getRdsDbInstanceArn() == null ^ this.getRdsDbInstanceArn() == nullreturn false;
        if (other.getRdsDbInstanceArn() != null && other.getRdsDbInstanceArn().equals(this.getRdsDbInstanceArn()) == falsereturn false
        if (other.getDbInstanceIdentifier() == null ^ this.getDbInstanceIdentifier() == nullreturn false;
        if (other.getDbInstanceIdentifier() != null && other.getDbInstanceIdentifier().equals(this.getDbInstanceIdentifier()) == falsereturn false
        if (other.getDbUser() == null ^ this.getDbUser() == nullreturn false;
        if (other.getDbUser() != null && other.getDbUser().equals(this.getDbUser()) == falsereturn false
        if (other.getDbPassword() == null ^ this.getDbPassword() == nullreturn false;
        if (other.getDbPassword() != null && other.getDbPassword().equals(this.getDbPassword()) == falsereturn false
        if (other.getRegion() == null ^ this.getRegion() == nullreturn false;
        if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == falsereturn false
        if (other.getAddress() == null ^ this.getAddress() == nullreturn false;
        if (other.getAddress() != null && other.getAddress().equals(this.getAddress()) == falsereturn false
        if (other.getEngine() == null ^ this.getEngine() == nullreturn false;
        if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == falsereturn false
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.isMissingOnRds() == null ^ this.isMissingOnRds() == nullreturn false;
        if (other.isMissingOnRds() != null && other.isMissingOnRds().equals(this.isMissingOnRds()) == falsereturn false
        return true;
    }
    
    @Override
    public RdsDbInstance clone() {
        try {
            return (RdsDbInstancesuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X