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.machinelearning.model;
 

The datasource details that are specific to Amazon RDS.

 
 public class RDSMetadata implements SerializableCloneable {

    
The database details required to connect to an Amazon RDS.
 
     private RDSDatabase database;

    
The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

Constraints:
Length: 1 - 128

 
     private String databaseUserName;

    
The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

Constraints:
Length: 1 - 16777216

 
     private String selectSqlQuery;

    
The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

Constraints:
Length: 1 - 64

 
     private String resourceRole;

    
The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

Constraints:
Length: 1 - 64

 
     private String serviceRole;

    
The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

Constraints:
Length: 1 - 1024

 
     private String dataPipelineId;

    
The database details required to connect to an Amazon RDS.

Returns:
The database details required to connect to an Amazon RDS.
 
     public RDSDatabase getDatabase() {
         return ;
     }
    
    
The database details required to connect to an Amazon RDS.

Parameters:
database The database details required to connect to an Amazon RDS.
 
     public void setDatabase(RDSDatabase database) {
        this. = database;
    }
    
    
The database details required to connect to an Amazon RDS.

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

Parameters:
database The database details required to connect to an Amazon RDS.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RDSMetadata withDatabase(RDSDatabase database) {
        this. = database;
        return this;
    }

    
The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

Constraints:
Length: 1 - 128

Returns:
The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.
    public String getDatabaseUserName() {
        return ;
    }
    
    
The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

Constraints:
Length: 1 - 128

Parameters:
databaseUserName The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.
    public void setDatabaseUserName(String databaseUserName) {
        this. = databaseUserName;
    }
    
    
The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

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

Constraints:
Length: 1 - 128

Parameters:
databaseUserName The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RDSMetadata withDatabaseUserName(String databaseUserName) {
        this. = databaseUserName;
        return this;
    }

    
The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

Constraints:
Length: 1 - 16777216

Returns:
The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.
    public String getSelectSqlQuery() {
        return ;
    }
    
    
The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

Constraints:
Length: 1 - 16777216

Parameters:
selectSqlQuery The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.
    public void setSelectSqlQuery(String selectSqlQuery) {
        this. = selectSqlQuery;
    }
    
    
The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

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

Constraints:
Length: 1 - 16777216

Parameters:
selectSqlQuery The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RDSMetadata withSelectSqlQuery(String selectSqlQuery) {
        this. = selectSqlQuery;
        return this;
    }

    
The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

Constraints:
Length: 1 - 64

Returns:
The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.
    public String getResourceRole() {
        return ;
    }
    
    
The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

Constraints:
Length: 1 - 64

Parameters:
resourceRole The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.
    public void setResourceRole(String resourceRole) {
        this. = resourceRole;
    }
    
    
The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

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

Constraints:
Length: 1 - 64

Parameters:
resourceRole The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RDSMetadata withResourceRole(String resourceRole) {
        this. = resourceRole;
        return this;
    }

    
The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

Constraints:
Length: 1 - 64

Returns:
The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.
    public String getServiceRole() {
        return ;
    }
    
    
The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

Constraints:
Length: 1 - 64

Parameters:
serviceRole The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.
    public void setServiceRole(String serviceRole) {
        this. = serviceRole;
    }
    
    
The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

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

Constraints:
Length: 1 - 64

Parameters:
serviceRole The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RDSMetadata withServiceRole(String serviceRole) {
        this. = serviceRole;
        return this;
    }

    
The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

Constraints:
Length: 1 - 1024

Returns:
The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.
    public String getDataPipelineId() {
        return ;
    }
    
    
The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

Constraints:
Length: 1 - 1024

Parameters:
dataPipelineId The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.
    public void setDataPipelineId(String dataPipelineId) {
        this. = dataPipelineId;
    }
    
    
The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

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

Constraints:
Length: 1 - 1024

Parameters:
dataPipelineId The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RDSMetadata withDataPipelineId(String dataPipelineId) {
        this. = dataPipelineId;
        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 (getDatabase() != nullsb.append("Database: " + getDatabase() + ",");
        if (getDatabaseUserName() != nullsb.append("DatabaseUserName: " + getDatabaseUserName() + ",");
        if (getSelectSqlQuery() != nullsb.append("SelectSqlQuery: " + getSelectSqlQuery() + ",");
        if (getResourceRole() != nullsb.append("ResourceRole: " + getResourceRole() + ",");
        if (getServiceRole() != nullsb.append("ServiceRole: " + getServiceRole() + ",");
        if (getDataPipelineId() != nullsb.append("DataPipelineId: " + getDataPipelineId() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDatabase() == null) ? 0 : getDatabase().hashCode()); 
        hashCode = prime * hashCode + ((getDatabaseUserName() == null) ? 0 : getDatabaseUserName().hashCode()); 
        hashCode = prime * hashCode + ((getSelectSqlQuery() == null) ? 0 : getSelectSqlQuery().hashCode()); 
        hashCode = prime * hashCode + ((getResourceRole() == null) ? 0 : getResourceRole().hashCode()); 
        hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode()); 
        hashCode = prime * hashCode + ((getDataPipelineId() == null) ? 0 : getDataPipelineId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RDSMetadata == falsereturn false;
        RDSMetadata other = (RDSMetadata)obj;
        
        if (other.getDatabase() == null ^ this.getDatabase() == nullreturn false;
        if (other.getDatabase() != null && other.getDatabase().equals(this.getDatabase()) == falsereturn false
        if (other.getDatabaseUserName() == null ^ this.getDatabaseUserName() == nullreturn false;
        if (other.getDatabaseUserName() != null && other.getDatabaseUserName().equals(this.getDatabaseUserName()) == falsereturn false
        if (other.getSelectSqlQuery() == null ^ this.getSelectSqlQuery() == nullreturn false;
        if (other.getSelectSqlQuery() != null && other.getSelectSqlQuery().equals(this.getSelectSqlQuery()) == falsereturn false
        if (other.getResourceRole() == null ^ this.getResourceRole() == nullreturn false;
        if (other.getResourceRole() != null && other.getResourceRole().equals(this.getResourceRole()) == falsereturn false
        if (other.getServiceRole() == null ^ this.getServiceRole() == nullreturn false;
        if (other.getServiceRole() != null && other.getServiceRole().equals(this.getServiceRole()) == falsereturn false
        if (other.getDataPipelineId() == null ^ this.getDataPipelineId() == nullreturn false;
        if (other.getDataPipelineId() != null && other.getDataPipelineId().equals(this.getDataPipelineId()) == falsereturn false
        return true;
    }
    
    @Override
    public RDSMetadata clone() {
        try {
            return (RDSMetadatasuper.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