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;
 

Describes the DataSource details specific to Amazon Redshift.

 
 public class RedshiftMetadata implements SerializableCloneable {

    
Describes the database details required to connect to an Amazon Redshift database.
 
     private RedshiftDatabase redshiftDatabase;

    
A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

Constraints:
Length: 1 - 128

 
     private String databaseUserName;

    
The SQL query that is specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.

Constraints:
Length: 1 - 16777216

 
     private String selectSqlQuery;

    
Describes the database details required to connect to an Amazon Redshift database.

Returns:
Describes the database details required to connect to an Amazon Redshift database.
 
     public RedshiftDatabase getRedshiftDatabase() {
         return ;
     }
    
    
Describes the database details required to connect to an Amazon Redshift database.

Parameters:
redshiftDatabase Describes the database details required to connect to an Amazon Redshift database.
 
     public void setRedshiftDatabase(RedshiftDatabase redshiftDatabase) {
         this. = redshiftDatabase;
     }
    
    
Describes the database details required to connect to an Amazon Redshift database.

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

Parameters:
redshiftDatabase Describes the database details required to connect to an Amazon Redshift database.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public RedshiftMetadata withRedshiftDatabase(RedshiftDatabase redshiftDatabase) {
         this. = redshiftDatabase;
         return this;
     }

    
A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

Constraints:
Length: 1 - 128

Returns:
A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.
    public String getDatabaseUserName() {
        return ;
    }
    
    
A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

Constraints:
Length: 1 - 128

Parameters:
databaseUserName A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.
    public void setDatabaseUserName(String databaseUserName) {
        this. = databaseUserName;
    }
    
    
A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

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

Constraints:
Length: 1 - 128

Parameters:
databaseUserName A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftMetadata withDatabaseUserName(String databaseUserName) {
        this. = databaseUserName;
        return this;
    }

    
The SQL query that is specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.

Constraints:
Length: 1 - 16777216

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

Constraints:
Length: 1 - 16777216

Parameters:
selectSqlQuery The SQL query that is specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.
    public void setSelectSqlQuery(String selectSqlQuery) {
        this. = selectSqlQuery;
    }
    
    
The SQL query that is specified during CreateDataSourceFromRedshift. 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 specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftMetadata withSelectSqlQuery(String selectSqlQuery) {
        this. = selectSqlQuery;
        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 (getRedshiftDatabase() != nullsb.append("RedshiftDatabase: " + getRedshiftDatabase() + ",");
        if (getDatabaseUserName() != nullsb.append("DatabaseUserName: " + getDatabaseUserName() + ",");
        if (getSelectSqlQuery() != nullsb.append("SelectSqlQuery: " + getSelectSqlQuery() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getRedshiftDatabase() == null) ? 0 : getRedshiftDatabase().hashCode()); 
        hashCode = prime * hashCode + ((getDatabaseUserName() == null) ? 0 : getDatabaseUserName().hashCode()); 
        hashCode = prime * hashCode + ((getSelectSqlQuery() == null) ? 0 : getSelectSqlQuery().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RedshiftMetadata == falsereturn false;
        RedshiftMetadata other = (RedshiftMetadata)obj;
        
        if (other.getRedshiftDatabase() == null ^ this.getRedshiftDatabase() == nullreturn false;
        if (other.getRedshiftDatabase() != null && other.getRedshiftDatabase().equals(this.getRedshiftDatabase()) == 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
        return true;
    }
    
    @Override
    public RedshiftMetadata clone() {
        try {
            return (RedshiftMetadatasuper.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