/* * Copyright 2018-2023 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; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Describes the data specification of an Amazon Redshift DataSource. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RedshiftDataSpec implements Serializable, Cloneable, StructuredPojo { /** *

* 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. *

*/ private String selectSqlQuery; /** *

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

*/ private RedshiftDatabaseCredentials databaseCredentials; /** *

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

*/ private String s3StagingLocation; /** *

* A JSON string that represents the splitting and rearrangement processing to be applied to a * DataSource. If the DataRearrangement parameter is not provided, all of the input data * is used to create the Datasource. *

*

* There are multiple parameters that control what data is used to create a datasource: *

* */ private String dataRearrangement; /** *

* A JSON string that represents the schema for an Amazon Redshift DataSource. The * DataSchema defines the structure of the observation data in the data file(s) referenced in the * DataSource. *

*

* A DataSchema is not required if you specify a DataSchemaUri. *

*

* Define your DataSchema as a series of key-value pairs. attributes and * excludedVariableNames have an array of key-value pairs for their value. Use the following format to * define your DataSchema. *

*

* { "version": "1.0", *

*

* "recordAnnotationFieldName": "F1", *

*

* "recordWeightFieldName": "F2", *

*

* "targetFieldName": "F3", *

*

* "dataFormat": "CSV", *

*

* "dataFileContainsHeader": true, *

*

* "attributes": [ *

*

* { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType": "NUMERIC" }, { "fieldName": "F3", * "fieldType": "CATEGORICAL" }, { "fieldName": "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": * "CATEGORICAL" }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType": * "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE" } ], *

*

* "excludedVariableNames": [ "F6" ] } *

*/ private String dataSchema; /** *

* Describes the schema location for an Amazon Redshift DataSource. *

*/ private String dataSchemaUri; /** *

* Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift * DataSource. *

* * @param databaseInformation * Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift * DataSource. */ public void setDatabaseInformation(RedshiftDatabase databaseInformation) { this.databaseInformation = databaseInformation; } /** *

* Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift * DataSource. *

* * @return Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift * DataSource. */ public RedshiftDatabase getDatabaseInformation() { return this.databaseInformation; } /** *

* Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift * DataSource. *

* * @param databaseInformation * Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift * DataSource. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataSpec withDatabaseInformation(RedshiftDatabase databaseInformation) { setDatabaseInformation(databaseInformation); return this; } /** *

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

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

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

* * @return Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift * DataSource. */ public String getSelectSqlQuery() { return this.selectSqlQuery; } /** *

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

* * @param selectSqlQuery * Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift * DataSource. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataSpec withSelectSqlQuery(String selectSqlQuery) { setSelectSqlQuery(selectSqlQuery); return this; } /** *

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

* * @param 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 = databaseCredentials; } /** *

* 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. */ public RedshiftDatabaseCredentials getDatabaseCredentials() { return this.databaseCredentials; } /** *

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

* * @param databaseCredentials * Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon * Redshift database. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataSpec withDatabaseCredentials(RedshiftDatabaseCredentials databaseCredentials) { setDatabaseCredentials(databaseCredentials); return this; } /** *

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

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

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

* * @return Describes an Amazon S3 location to store the result set of the SelectSqlQuery query. */ public String getS3StagingLocation() { return this.s3StagingLocation; } /** *

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

* * @param s3StagingLocation * Describes an Amazon S3 location to store the result set of the SelectSqlQuery query. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataSpec withS3StagingLocation(String s3StagingLocation) { setS3StagingLocation(s3StagingLocation); return this; } /** *

* A JSON string that represents the splitting and rearrangement processing to be applied to a * DataSource. If the DataRearrangement parameter is not provided, all of the input data * is used to create the Datasource. *

*

* There are multiple parameters that control what data is used to create a datasource: *

* * * @param dataRearrangement * A JSON string that represents the splitting and rearrangement processing to be applied to a * DataSource. If the DataRearrangement parameter is not provided, all of the input * data is used to create the Datasource.

*

* There are multiple parameters that control what data is used to create a datasource: *

*