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 data specification of an Amazon Redshift DataSource .

 
 public class RedshiftDataSpec implements SerializableCloneable {

    
Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.
 
     private RedshiftDatabase databaseInformation;

    
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.

Constraints:
Length: 1 - 16777216

 
     private String selectSqlQuery;

    
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
 
Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

 
     private String s3StagingLocation;

    
Describes the splitting specifications for a DataSource.
 
     private String dataRearrangement;

    
Describes the schema for an Amazon Redshift DataSource.

Constraints:
Length: 0 - 131071

 
     private String dataSchema;

    
Describes the schema location for an Amazon Redshift DataSource.

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

 
     private String dataSchemaUri;

    
Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.

Returns:
Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.
 
         return ;
     }
    
    
Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.

Parameters:
databaseInformation Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.
    public void setDatabaseInformation(RedshiftDatabase databaseInformation) {
        this. = databaseInformation;
    }
    
    
Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.

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

Parameters:
databaseInformation Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftDataSpec withDatabaseInformation(RedshiftDatabase databaseInformation) {
        this. = databaseInformation;
        return this;
    }

    
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.

Constraints:
Length: 1 - 16777216

Returns:
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.
    public String getSelectSqlQuery() {
        return ;
    }
    
    
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.

Constraints:
Length: 1 - 16777216

Parameters:
selectSqlQuery Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.
    public void setSelectSqlQuery(String selectSqlQuery) {
        this. = selectSqlQuery;
    }
    
    
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.

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

Constraints:
Length: 1 - 16777216

Parameters:
selectSqlQuery Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftDataSpec withSelectSqlQuery(String selectSqlQuery) {
        this. = selectSqlQuery;
        return this;
    }

    
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.

Returns:
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
        return ;
    }
    
    
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.

Parameters:
databaseCredentials Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
    public void setDatabaseCredentials(RedshiftDatabaseCredentials databaseCredentials) {
        this. = databaseCredentials;
    }
    
    
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.

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

Parameters:
databaseCredentials Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = databaseCredentials;
        return this;
    }

    
Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

Returns:
Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.
    public String getS3StagingLocation() {
        return ;
    }
    
    
Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

Parameters:
s3StagingLocation Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.
    public void setS3StagingLocation(String s3StagingLocation) {
        this. = s3StagingLocation;
    }
    
    
Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.

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

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

Parameters:
s3StagingLocation Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftDataSpec withS3StagingLocation(String s3StagingLocation) {
        this. = s3StagingLocation;
        return this;
    }

    
Describes the splitting specifications for a DataSource.

Returns:
Describes the splitting specifications for a DataSource.
    public String getDataRearrangement() {
        return ;
    }
    
    
Describes the splitting specifications for a DataSource.

Parameters:
dataRearrangement Describes the splitting specifications for a DataSource.
    public void setDataRearrangement(String dataRearrangement) {
        this. = dataRearrangement;
    }
    
    
Describes the splitting specifications for a DataSource.

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

Parameters:
dataRearrangement Describes the splitting specifications for a DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftDataSpec withDataRearrangement(String dataRearrangement) {
        this. = dataRearrangement;
        return this;
    }

    
Describes the schema for an Amazon Redshift DataSource.

Constraints:
Length: 0 - 131071

Returns:
Describes the schema for an Amazon Redshift DataSource.
    public String getDataSchema() {
        return ;
    }
    
    
Describes the schema for an Amazon Redshift DataSource.

Constraints:
Length: 0 - 131071

Parameters:
dataSchema Describes the schema for an Amazon Redshift DataSource.
    public void setDataSchema(String dataSchema) {
        this. = dataSchema;
    }
    
    
Describes the schema for an Amazon Redshift DataSource.

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

Constraints:
Length: 0 - 131071

Parameters:
dataSchema Describes the schema for an Amazon Redshift DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftDataSpec withDataSchema(String dataSchema) {
        this. = dataSchema;
        return this;
    }

    
Describes the schema location for an Amazon Redshift DataSource.

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

Returns:
Describes the schema location for an Amazon Redshift DataSource.
    public String getDataSchemaUri() {
        return ;
    }
    
    
Describes the schema location for an Amazon Redshift DataSource.

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

Parameters:
dataSchemaUri Describes the schema location for an Amazon Redshift DataSource.
    public void setDataSchemaUri(String dataSchemaUri) {
        this. = dataSchemaUri;
    }
    
    
Describes the schema location for an Amazon Redshift DataSource.

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

Constraints:
Length: 0 - 2048
Pattern: s3://([^/]+)(/.*)?

Parameters:
dataSchemaUri Describes the schema location for an Amazon Redshift DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RedshiftDataSpec withDataSchemaUri(String dataSchemaUri) {
        this. = dataSchemaUri;
        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 (getDatabaseInformation() != nullsb.append("DatabaseInformation: " + getDatabaseInformation() + ",");
        if (getSelectSqlQuery() != nullsb.append("SelectSqlQuery: " + getSelectSqlQuery() + ",");
        if (getDatabaseCredentials() != nullsb.append("DatabaseCredentials: " + getDatabaseCredentials() + ",");
        if (getS3StagingLocation() != nullsb.append("S3StagingLocation: " + getS3StagingLocation() + ",");
        if (getDataRearrangement() != nullsb.append("DataRearrangement: " + getDataRearrangement() + ",");
        if (getDataSchema() != nullsb.append("DataSchema: " + getDataSchema() + ",");
        if (getDataSchemaUri() != nullsb.append("DataSchemaUri: " + getDataSchemaUri() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDatabaseInformation() == null) ? 0 : getDatabaseInformation().hashCode()); 
        hashCode = prime * hashCode + ((getSelectSqlQuery() == null) ? 0 : getSelectSqlQuery().hashCode()); 
        hashCode = prime * hashCode + ((getDatabaseCredentials() == null) ? 0 : getDatabaseCredentials().hashCode()); 
        hashCode = prime * hashCode + ((getS3StagingLocation() == null) ? 0 : getS3StagingLocation().hashCode()); 
        hashCode = prime * hashCode + ((getDataRearrangement() == null) ? 0 : getDataRearrangement().hashCode()); 
        hashCode = prime * hashCode + ((getDataSchema() == null) ? 0 : getDataSchema().hashCode()); 
        hashCode = prime * hashCode + ((getDataSchemaUri() == null) ? 0 : getDataSchemaUri().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RedshiftDataSpec == falsereturn false;
        RedshiftDataSpec other = (RedshiftDataSpec)obj;
        
        if (other.getDatabaseInformation() == null ^ this.getDatabaseInformation() == nullreturn false;
        if (other.getDatabaseInformation() != null && other.getDatabaseInformation().equals(this.getDatabaseInformation()) == falsereturn false
        if (other.getSelectSqlQuery() == null ^ this.getSelectSqlQuery() == nullreturn false;
        if (other.getSelectSqlQuery() != null && other.getSelectSqlQuery().equals(this.getSelectSqlQuery()) == falsereturn false
        if (other.getDatabaseCredentials() == null ^ this.getDatabaseCredentials() == nullreturn false;
        if (other.getDatabaseCredentials() != null && other.getDatabaseCredentials().equals(this.getDatabaseCredentials()) == falsereturn false
        if (other.getS3StagingLocation() == null ^ this.getS3StagingLocation() == nullreturn false;
        if (other.getS3StagingLocation() != null && other.getS3StagingLocation().equals(this.getS3StagingLocation()) == falsereturn false
        if (other.getDataRearrangement() == null ^ this.getDataRearrangement() == nullreturn false;
        if (other.getDataRearrangement() != null && other.getDataRearrangement().equals(this.getDataRearrangement()) == falsereturn false
        if (other.getDataSchema() == null ^ this.getDataSchema() == nullreturn false;
        if (other.getDataSchema() != null && other.getDataSchema().equals(this.getDataSchema()) == falsereturn false
        if (other.getDataSchemaUri() == null ^ this.getDataSchemaUri() == nullreturn false;
        if (other.getDataSchemaUri() != null && other.getDataSchemaUri().equals(this.getDataSchemaUri()) == falsereturn false
        return true;
    }
    
    @Override
    public RedshiftDataSpec clone() {
        try {
            return (RedshiftDataSpecsuper.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