com.amazonaws.services.quicksight.model.CreateDataSourceRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-quicksight Show documentation
/*
* Copyright 2014-2019 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.quicksight.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDataSourceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The AWS account ID.
*
*/
private String awsAccountId;
/**
*
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
*
*/
private String dataSourceId;
/**
*
* A display name for the data source.
*
*/
private String name;
/**
*
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
*
*/
private String type;
/**
*
* The parameters that QuickSight uses to connect to your underlying source.
*
*/
private DataSourceParameters dataSourceParameters;
/**
*
* The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials based on
* user name and password are supported.
*
*/
private DataSourceCredentials credentials;
/**
*
* A list of resource permissions on the data source.
*
*/
private java.util.List permissions;
/**
*
* Use this parameter only when you want QuickSight to use a VPC connection when connecting to your underlying
* source.
*
*/
private VpcConnectionProperties vpcConnectionProperties;
/**
*
* Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
*
*/
private SslProperties sslProperties;
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*
*/
private java.util.List tags;
/**
*
* The AWS account ID.
*
*
* @param awsAccountId
* The AWS account ID.
*/
public void setAwsAccountId(String awsAccountId) {
this.awsAccountId = awsAccountId;
}
/**
*
* The AWS account ID.
*
*
* @return The AWS account ID.
*/
public String getAwsAccountId() {
return this.awsAccountId;
}
/**
*
* The AWS account ID.
*
*
* @param awsAccountId
* The AWS account ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withAwsAccountId(String awsAccountId) {
setAwsAccountId(awsAccountId);
return this;
}
/**
*
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
*
*
* @param dataSourceId
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
*/
public void setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
}
/**
*
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
*
*
* @return An ID for the data source. This ID is unique per AWS Region for each AWS account.
*/
public String getDataSourceId() {
return this.dataSourceId;
}
/**
*
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
*
*
* @param dataSourceId
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withDataSourceId(String dataSourceId) {
setDataSourceId(dataSourceId);
return this;
}
/**
*
* A display name for the data source.
*
*
* @param name
* A display name for the data source.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* A display name for the data source.
*
*
* @return A display name for the data source.
*/
public String getName() {
return this.name;
}
/**
*
* A display name for the data source.
*
*
* @param name
* A display name for the data source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
*
*
* @param type
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
* @see DataSourceType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
*
*
* @return The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
* @see DataSourceType
*/
public String getType() {
return this.type;
}
/**
*
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
*
*
* @param type
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataSourceType
*/
public CreateDataSourceRequest withType(String type) {
setType(type);
return this;
}
/**
*
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
*
*
* @param type
* The type of the data source. Currently, the supported types for this operation are:
* ATHENA, AURORA, AURORA_POSTGRESQL, MARIADB, MYSQL, POSTGRESQL, PRESTO, REDSHIFT, S3, SNOWFLAKE, SPARK, SQLSERVER, TERADATA
* . Use ListDataSources
to return a list of all data sources.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataSourceType
*/
public CreateDataSourceRequest withType(DataSourceType type) {
this.type = type.toString();
return this;
}
/**
*
* The parameters that QuickSight uses to connect to your underlying source.
*
*
* @param dataSourceParameters
* The parameters that QuickSight uses to connect to your underlying source.
*/
public void setDataSourceParameters(DataSourceParameters dataSourceParameters) {
this.dataSourceParameters = dataSourceParameters;
}
/**
*
* The parameters that QuickSight uses to connect to your underlying source.
*
*
* @return The parameters that QuickSight uses to connect to your underlying source.
*/
public DataSourceParameters getDataSourceParameters() {
return this.dataSourceParameters;
}
/**
*
* The parameters that QuickSight uses to connect to your underlying source.
*
*
* @param dataSourceParameters
* The parameters that QuickSight uses to connect to your underlying source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withDataSourceParameters(DataSourceParameters dataSourceParameters) {
setDataSourceParameters(dataSourceParameters);
return this;
}
/**
*
* The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials based on
* user name and password are supported.
*
*
* @param credentials
* The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials
* based on user name and password are supported.
*/
public void setCredentials(DataSourceCredentials credentials) {
this.credentials = credentials;
}
/**
*
* The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials based on
* user name and password are supported.
*
*
* @return The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials
* based on user name and password are supported.
*/
public DataSourceCredentials getCredentials() {
return this.credentials;
}
/**
*
* The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials based on
* user name and password are supported.
*
*
* @param credentials
* The credentials QuickSight that uses to connect to your underlying source. Currently, only credentials
* based on user name and password are supported.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withCredentials(DataSourceCredentials credentials) {
setCredentials(credentials);
return this;
}
/**
*
* A list of resource permissions on the data source.
*
*
* @return A list of resource permissions on the data source.
*/
public java.util.List getPermissions() {
return permissions;
}
/**
*
* A list of resource permissions on the data source.
*
*
* @param permissions
* A list of resource permissions on the data source.
*/
public void setPermissions(java.util.Collection permissions) {
if (permissions == null) {
this.permissions = null;
return;
}
this.permissions = new java.util.ArrayList(permissions);
}
/**
*
* A list of resource permissions on the data source.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPermissions(java.util.Collection)} or {@link #withPermissions(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param permissions
* A list of resource permissions on the data source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withPermissions(ResourcePermission... permissions) {
if (this.permissions == null) {
setPermissions(new java.util.ArrayList(permissions.length));
}
for (ResourcePermission ele : permissions) {
this.permissions.add(ele);
}
return this;
}
/**
*
* A list of resource permissions on the data source.
*
*
* @param permissions
* A list of resource permissions on the data source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withPermissions(java.util.Collection permissions) {
setPermissions(permissions);
return this;
}
/**
*
* Use this parameter only when you want QuickSight to use a VPC connection when connecting to your underlying
* source.
*
*
* @param vpcConnectionProperties
* Use this parameter only when you want QuickSight to use a VPC connection when connecting to your
* underlying source.
*/
public void setVpcConnectionProperties(VpcConnectionProperties vpcConnectionProperties) {
this.vpcConnectionProperties = vpcConnectionProperties;
}
/**
*
* Use this parameter only when you want QuickSight to use a VPC connection when connecting to your underlying
* source.
*
*
* @return Use this parameter only when you want QuickSight to use a VPC connection when connecting to your
* underlying source.
*/
public VpcConnectionProperties getVpcConnectionProperties() {
return this.vpcConnectionProperties;
}
/**
*
* Use this parameter only when you want QuickSight to use a VPC connection when connecting to your underlying
* source.
*
*
* @param vpcConnectionProperties
* Use this parameter only when you want QuickSight to use a VPC connection when connecting to your
* underlying source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withVpcConnectionProperties(VpcConnectionProperties vpcConnectionProperties) {
setVpcConnectionProperties(vpcConnectionProperties);
return this;
}
/**
*
* Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
*
*
* @param sslProperties
* Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
*/
public void setSslProperties(SslProperties sslProperties) {
this.sslProperties = sslProperties;
}
/**
*
* Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
*
*
* @return Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
*/
public SslProperties getSslProperties() {
return this.sslProperties;
}
/**
*
* Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
*
*
* @param sslProperties
* Secure Socket Layer (SSL) properties that apply when QuickSight connects to your underlying source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withSslProperties(SslProperties sslProperties) {
setSslProperties(sslProperties);
return this;
}
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*
*
* @return Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*
*
* @param tags
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*
*
* @param tags
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSourceRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
* 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 (getAwsAccountId() != null)
sb.append("AwsAccountId: ").append(getAwsAccountId()).append(",");
if (getDataSourceId() != null)
sb.append("DataSourceId: ").append(getDataSourceId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getDataSourceParameters() != null)
sb.append("DataSourceParameters: ").append(getDataSourceParameters()).append(",");
if (getCredentials() != null)
sb.append("Credentials: ").append("***Sensitive Data Redacted***").append(",");
if (getPermissions() != null)
sb.append("Permissions: ").append(getPermissions()).append(",");
if (getVpcConnectionProperties() != null)
sb.append("VpcConnectionProperties: ").append(getVpcConnectionProperties()).append(",");
if (getSslProperties() != null)
sb.append("SslProperties: ").append(getSslProperties()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDataSourceRequest == false)
return false;
CreateDataSourceRequest other = (CreateDataSourceRequest) obj;
if (other.getAwsAccountId() == null ^ this.getAwsAccountId() == null)
return false;
if (other.getAwsAccountId() != null && other.getAwsAccountId().equals(this.getAwsAccountId()) == false)
return false;
if (other.getDataSourceId() == null ^ this.getDataSourceId() == null)
return false;
if (other.getDataSourceId() != null && other.getDataSourceId().equals(this.getDataSourceId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getDataSourceParameters() == null ^ this.getDataSourceParameters() == null)
return false;
if (other.getDataSourceParameters() != null && other.getDataSourceParameters().equals(this.getDataSourceParameters()) == false)
return false;
if (other.getCredentials() == null ^ this.getCredentials() == null)
return false;
if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == false)
return false;
if (other.getPermissions() == null ^ this.getPermissions() == null)
return false;
if (other.getPermissions() != null && other.getPermissions().equals(this.getPermissions()) == false)
return false;
if (other.getVpcConnectionProperties() == null ^ this.getVpcConnectionProperties() == null)
return false;
if (other.getVpcConnectionProperties() != null && other.getVpcConnectionProperties().equals(this.getVpcConnectionProperties()) == false)
return false;
if (other.getSslProperties() == null ^ this.getSslProperties() == null)
return false;
if (other.getSslProperties() != null && other.getSslProperties().equals(this.getSslProperties()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAwsAccountId() == null) ? 0 : getAwsAccountId().hashCode());
hashCode = prime * hashCode + ((getDataSourceId() == null) ? 0 : getDataSourceId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getDataSourceParameters() == null) ? 0 : getDataSourceParameters().hashCode());
hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().hashCode());
hashCode = prime * hashCode + ((getPermissions() == null) ? 0 : getPermissions().hashCode());
hashCode = prime * hashCode + ((getVpcConnectionProperties() == null) ? 0 : getVpcConnectionProperties().hashCode());
hashCode = prime * hashCode + ((getSslProperties() == null) ? 0 : getSslProperties().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateDataSourceRequest clone() {
return (CreateDataSourceRequest) super.clone();
}
}