/* * 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.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 Amazon Web Services account ID. *
*/ private String awsAccountId; /** ** An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account. *
*/ private String dataSourceId; /** ** A display name for the data source. *
*/ private String name; /** *
* The type of the data source. To return a list of all data sources, use ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
*
* The parameters that Amazon QuickSight uses to connect to your underlying source. *
*/ private DataSourceParameters dataSourceParameters; /** ** The credentials Amazon 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* Use this parameter only when you want Amazon QuickSight to use a VPC connection when connecting to your * underlying source. *
*/ private VpcConnectionProperties vpcConnectionProperties; /** ** Secure Socket Layer (SSL) properties that apply when Amazon 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* The Amazon Web Services account ID. *
* * @param awsAccountId * The Amazon Web Services account ID. */ public void setAwsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; } /** ** The Amazon Web Services account ID. *
* * @return The Amazon Web Services account ID. */ public String getAwsAccountId() { return this.awsAccountId; } /** ** The Amazon Web Services account ID. *
* * @param awsAccountId * The Amazon Web Services 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 Amazon Web Services Region for each Amazon Web Services account. *
* * @param dataSourceId * An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services * account. */ public void setDataSourceId(String dataSourceId) { this.dataSourceId = dataSourceId; } /** ** An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account. *
* * @return An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services * account. */ public String getDataSourceId() { return this.dataSourceId; } /** ** An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account. *
* * @param dataSourceId * An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services * 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. To return a list of all data sources, use ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
*
ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
* @see DataSourceType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the data source. To return a list of all data sources, use ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
*
ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
* @see DataSourceType
*/
public String getType() {
return this.type;
}
/**
*
* The type of the data source. To return a list of all data sources, use ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
*
ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
* @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. To return a list of all data sources, use ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
*
ListDataSources
.
*
* Use AMAZON_ELASTICSEARCH
for Amazon OpenSearch Service.
* @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 Amazon QuickSight uses to connect to your underlying source. *
* * @param dataSourceParameters * The parameters that Amazon QuickSight uses to connect to your underlying source. */ public void setDataSourceParameters(DataSourceParameters dataSourceParameters) { this.dataSourceParameters = dataSourceParameters; } /** ** The parameters that Amazon QuickSight uses to connect to your underlying source. *
* * @return The parameters that Amazon QuickSight uses to connect to your underlying source. */ public DataSourceParameters getDataSourceParameters() { return this.dataSourceParameters; } /** ** The parameters that Amazon QuickSight uses to connect to your underlying source. *
* * @param dataSourceParameters * The parameters that Amazon 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 Amazon QuickSight that uses to connect to your underlying source. Currently, only credentials * based on user name and password are supported. *
* * @param credentials * The credentials Amazon 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 Amazon QuickSight that uses to connect to your underlying source. Currently, only credentials * based on user name and password are supported. *
* * @return The credentials Amazon 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 Amazon QuickSight that uses to connect to your underlying source. Currently, only credentials * based on user name and password are supported. *
* * @param credentials * The credentials Amazon 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* 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* 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* 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* Use this parameter only when you want Amazon QuickSight to use a VPC connection when connecting to your * underlying source. *
* * @param vpcConnectionProperties * Use this parameter only when you want Amazon 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 Amazon QuickSight to use a VPC connection when connecting to your * underlying source. *
* * @return Use this parameter only when you want Amazon 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 Amazon QuickSight to use a VPC connection when connecting to your * underlying source. *
* * @param vpcConnectionProperties * Use this parameter only when you want Amazon 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 Amazon QuickSight connects to your underlying source. *
* * @param sslProperties * Secure Socket Layer (SSL) properties that apply when Amazon QuickSight connects to your underlying source. */ public void setSslProperties(SslProperties sslProperties) { this.sslProperties = sslProperties; } /** ** Secure Socket Layer (SSL) properties that apply when Amazon QuickSight connects to your underlying source. *
* * @return Secure Socket Layer (SSL) properties that apply when Amazon QuickSight connects to your underlying * source. */ public SslProperties getSslProperties() { return this.sslProperties; } /** ** Secure Socket Layer (SSL) properties that apply when Amazon QuickSight connects to your underlying source. *
* * @param sslProperties * Secure Socket Layer (SSL) properties that apply when Amazon 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* 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* 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* 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