/* * 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.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDataSourceFromRDSRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
     * A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number
     * (ARN) becomes the ID for a DataSource.
     * 
     * A user-supplied name or description of the DataSource.
     * 
     * The data specification of an Amazon RDS DataSource:
     * 
* DatabaseInformation - *
*
     * DatabaseName - The name of the Amazon RDS database.
     * 
     * InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     * 
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon * RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy task * from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates for * data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     * SecurityInfo - The security information to use to access an RDS DB instance. You need to set up appropriate
     * ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [
     * SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.
     * 
     * SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     * 
     * S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using
     * SelectSqlQuery is stored in this location.
     * 
     * DataSchemaUri - The Amazon S3 location of the DataSchema.
     * 
     * DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     * specified.
     * 
     * DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     * Datasource.
     * 
     * Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     * 
     * The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user's
     * account and copy data using the SelectSqlQuery query from Amazon RDS to Amazon S3.
     * 
     * The compute statistics for a DataSource. The statistics are generated from the observation data
     * referenced by a DataSource. Amazon ML uses the statistics internally during MLModel
     * training. This parameter must be set to true if the
     * DataSource needs to be used for MLModel training.
     * 
     * A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number
     * (ARN) becomes the ID for a DataSource.
     * 
DataSource. Typically, an Amazon Resource
     *        Number (ARN) becomes the ID for a DataSource.
     */
    public void setDataSourceId(String dataSourceId) {
        this.dataSourceId = dataSourceId;
    }
    /**
     * 
     * A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number
     * (ARN) becomes the ID for a DataSource.
     * 
DataSource. Typically, an Amazon Resource
     *         Number (ARN) becomes the ID for a DataSource.
     */
    public String getDataSourceId() {
        return this.dataSourceId;
    }
    /**
     * 
     * A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number
     * (ARN) becomes the ID for a DataSource.
     * 
DataSource. Typically, an Amazon Resource
     *        Number (ARN) becomes the ID for a DataSource.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public CreateDataSourceFromRDSRequest withDataSourceId(String dataSourceId) {
        setDataSourceId(dataSourceId);
        return this;
    }
    /**
     * 
     * A user-supplied name or description of the DataSource.
     * 
DataSource.
     */
    public void setDataSourceName(String dataSourceName) {
        this.dataSourceName = dataSourceName;
    }
    /**
     * 
     * A user-supplied name or description of the DataSource.
     * 
DataSource.
     */
    public String getDataSourceName() {
        return this.dataSourceName;
    }
    /**
     * 
     * A user-supplied name or description of the DataSource.
     * 
DataSource.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public CreateDataSourceFromRDSRequest withDataSourceName(String dataSourceName) {
        setDataSourceName(dataSourceName);
        return this;
    }
    /**
     * 
     * The data specification of an Amazon RDS DataSource:
     * 
* DatabaseInformation - *
*
     * DatabaseName - The name of the Amazon RDS database.
     * 
     * InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     * 
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon * RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy task * from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates for * data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     * SecurityInfo - The security information to use to access an RDS DB instance. You need to set up appropriate
     * ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [
     * SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.
     * 
     * SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     * 
     * S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using
     * SelectSqlQuery is stored in this location.
     * 
     * DataSchemaUri - The Amazon S3 location of the DataSchema.
     * 
     * DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     * specified.
     * 
     * DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     * Datasource.
     * 
     * Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     * 
DataSource:
     *        * DatabaseInformation - *
*
     *        DatabaseName - The name of the Amazon RDS database.
     *        
     *        InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     *        
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the * Amazon RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy * task from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates * for data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     *        SecurityInfo - The security information to use to access an RDS DB instance. You need to set up
     *        appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance.
     *        Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.
     *        
     *        SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     *        
     *        S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS
     *        using SelectSqlQuery is stored in this location.
     *        
     *        DataSchemaUri - The Amazon S3 location of the DataSchema.
     *        
     *        DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     *        specified.
     *        
     *        DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     *        Datasource.
     *        
     *        Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     *        
     * The data specification of an Amazon RDS DataSource:
     * 
* DatabaseInformation - *
*
     * DatabaseName - The name of the Amazon RDS database.
     * 
     * InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     * 
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon * RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy task * from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates for * data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     * SecurityInfo - The security information to use to access an RDS DB instance. You need to set up appropriate
     * ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [
     * SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.
     * 
     * SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     * 
     * S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using
     * SelectSqlQuery is stored in this location.
     * 
     * DataSchemaUri - The Amazon S3 location of the DataSchema.
     * 
     * DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     * specified.
     * 
     * DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     * Datasource.
     * 
     * Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     * 
DataSource:
     *         * DatabaseInformation - *
*
     *         DatabaseName - The name of the Amazon RDS database.
     *         
     *         InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     *         
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to * the Amazon RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy * task from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role * templates for data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     *         SecurityInfo - The security information to use to access an RDS DB instance. You need to set up
     *         appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS
     *         instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB
     *         instance.
     *         
     *         SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     *         
     *         S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon
     *         RDS using SelectSqlQuery is stored in this location.
     *         
     *         DataSchemaUri - The Amazon S3 location of the DataSchema.
     *         
     *         DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     *         specified.
     *         
     *         DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     *         Datasource.
     *         
     *         Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     *         
     * The data specification of an Amazon RDS DataSource:
     * 
* DatabaseInformation - *
*
     * DatabaseName - The name of the Amazon RDS database.
     * 
     * InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     * 
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon * RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy task * from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates for * data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     * SecurityInfo - The security information to use to access an RDS DB instance. You need to set up appropriate
     * ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [
     * SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.
     * 
     * SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     * 
     * S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using
     * SelectSqlQuery is stored in this location.
     * 
     * DataSchemaUri - The Amazon S3 location of the DataSchema.
     * 
     * DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     * specified.
     * 
     * DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     * Datasource.
     * 
     * Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     * 
DataSource:
     *        * DatabaseInformation - *
*
     *        DatabaseName - The name of the Amazon RDS database.
     *        
     *        InstanceIdentifier  - A unique identifier for the Amazon RDS database instance.
     *        
* DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the * Amazon RDS database. *
** ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy * task from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates * for data pipelines. *
** ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS 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. *
*
     *        SecurityInfo - The security information to use to access an RDS DB instance. You need to set up
     *        appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance.
     *        Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.
     *        
     *        SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.
     *        
     *        S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS
     *        using SelectSqlQuery is stored in this location.
     *        
     *        DataSchemaUri - The Amazon S3 location of the DataSchema.
     *        
     *        DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is
     *        specified.
     *        
     *        DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the
     *        Datasource.
     *        
     *        Sample -  "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
     *        
     * The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user's
     * account and copy data using the SelectSqlQuery query from Amazon RDS to Amazon S3.
     * 
SelectSqlQuery query from Amazon RDS to Amazon S3.
     *        
     */
    public void setRoleARN(String roleARN) {
        this.roleARN = roleARN;
    }
    /**
     * 
     * The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user's
     * account and copy data using the SelectSqlQuery query from Amazon RDS to Amazon S3.
     * 
SelectSqlQuery query from Amazon RDS to Amazon S3.
     *         
     */
    public String getRoleARN() {
        return this.roleARN;
    }
    /**
     * 
     * The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user's
     * account and copy data using the SelectSqlQuery query from Amazon RDS to Amazon S3.
     * 
SelectSqlQuery query from Amazon RDS to Amazon S3.
     *        
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public CreateDataSourceFromRDSRequest withRoleARN(String roleARN) {
        setRoleARN(roleARN);
        return this;
    }
    /**
     * 
     * The compute statistics for a DataSource. The statistics are generated from the observation data
     * referenced by a DataSource. Amazon ML uses the statistics internally during MLModel
     * training. This parameter must be set to true if the
     * DataSource needs to be used for MLModel training.
     * 
DataSource. The statistics are generated from the observation
     *        data referenced by a DataSource. Amazon ML uses the statistics internally during
     *        MLModel training. This parameter must be set to true if the
     *        DataSource needs to be used for MLModel training.
     */
    public void setComputeStatistics(Boolean computeStatistics) {
        this.computeStatistics = computeStatistics;
    }
    /**
     * 
     * The compute statistics for a DataSource. The statistics are generated from the observation data
     * referenced by a DataSource. Amazon ML uses the statistics internally during MLModel
     * training. This parameter must be set to true if the
     * DataSource needs to be used for MLModel training.
     * 
DataSource. The statistics are generated from the observation
     *         data referenced by a DataSource. Amazon ML uses the statistics internally during
     *         MLModel training. This parameter must be set to true if the
     *         DataSource needs to be used for MLModel training.
     */
    public Boolean getComputeStatistics() {
        return this.computeStatistics;
    }
    /**
     * 
     * The compute statistics for a DataSource. The statistics are generated from the observation data
     * referenced by a DataSource. Amazon ML uses the statistics internally during MLModel
     * training. This parameter must be set to true if the
     * DataSource needs to be used for MLModel training.
     * 
DataSource. The statistics are generated from the observation
     *        data referenced by a DataSource. Amazon ML uses the statistics internally during
     *        MLModel training. This parameter must be set to true if the
     *        DataSource needs to be used for MLModel training.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public CreateDataSourceFromRDSRequest withComputeStatistics(Boolean computeStatistics) {
        setComputeStatistics(computeStatistics);
        return this;
    }
    /**
     * 
     * The compute statistics for a DataSource. The statistics are generated from the observation data
     * referenced by a DataSource. Amazon ML uses the statistics internally during MLModel
     * training. This parameter must be set to true if the
     * DataSource needs to be used for MLModel training.
     * 
DataSource. The statistics are generated from the observation
     *         data referenced by a DataSource. Amazon ML uses the statistics internally during
     *         MLModel training. This parameter must be set to true if the
     *         DataSource needs to be used for MLModel training.
     */
    public Boolean isComputeStatistics() {
        return this.computeStatistics;
    }
    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDataSourceId() != null)
            sb.append("DataSourceId: ").append(getDataSourceId()).append(",");
        if (getDataSourceName() != null)
            sb.append("DataSourceName: ").append(getDataSourceName()).append(",");
        if (getRDSData() != null)
            sb.append("RDSData: ").append(getRDSData()).append(",");
        if (getRoleARN() != null)
            sb.append("RoleARN: ").append(getRoleARN()).append(",");
        if (getComputeStatistics() != null)
            sb.append("ComputeStatistics: ").append(getComputeStatistics());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof CreateDataSourceFromRDSRequest == false)
            return false;
        CreateDataSourceFromRDSRequest other = (CreateDataSourceFromRDSRequest) obj;
        if (other.getDataSourceId() == null ^ this.getDataSourceId() == null)
            return false;
        if (other.getDataSourceId() != null && other.getDataSourceId().equals(this.getDataSourceId()) == false)
            return false;
        if (other.getDataSourceName() == null ^ this.getDataSourceName() == null)
            return false;
        if (other.getDataSourceName() != null && other.getDataSourceName().equals(this.getDataSourceName()) == false)
            return false;
        if (other.getRDSData() == null ^ this.getRDSData() == null)
            return false;
        if (other.getRDSData() != null && other.getRDSData().equals(this.getRDSData()) == false)
            return false;
        if (other.getRoleARN() == null ^ this.getRoleARN() == null)
            return false;
        if (other.getRoleARN() != null && other.getRoleARN().equals(this.getRoleARN()) == false)
            return false;
        if (other.getComputeStatistics() == null ^ this.getComputeStatistics() == null)
            return false;
        if (other.getComputeStatistics() != null && other.getComputeStatistics().equals(this.getComputeStatistics()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime * hashCode + ((getDataSourceId() == null) ? 0 : getDataSourceId().hashCode());
        hashCode = prime * hashCode + ((getDataSourceName() == null) ? 0 : getDataSourceName().hashCode());
        hashCode = prime * hashCode + ((getRDSData() == null) ? 0 : getRDSData().hashCode());
        hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode());
        hashCode = prime * hashCode + ((getComputeStatistics() == null) ? 0 : getComputeStatistics().hashCode());
        return hashCode;
    }
    @Override
    public CreateDataSourceFromRDSRequest clone() {
        return (CreateDataSourceFromRDSRequest) super.clone();
    }
}