com.amazonaws.services.quicksight.model.CreateDataSetRequest 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 CreateDataSetRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The AWS Account ID.
*
*/
private String awsAccountId;
/**
*
* An ID for the dataset that you want to create. This ID is unique per AWS Region for each AWS account.
*
*/
private String dataSetId;
/**
*
* The display name for the dataset.
*
*/
private String name;
/**
*
* Declares the physical tables that are available in the underlying data sources.
*
*/
private java.util.Map physicalTableMap;
/**
*
* Configures the combination and transformation of the data from the physical tables.
*
*/
private java.util.Map logicalTableMap;
/**
*
* Indicates whether or not you want to import the data into SPICE.
*
*/
private String importMode;
/**
*
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial hierarchy is
* supported.
*
*/
private java.util.List columnGroups;
/**
*
* A list of resource permissions on the dataset.
*
*/
private java.util.List permissions;
/**
*
* Row-level security configuration on the data you want to create.
*
*/
private RowLevelPermissionDataSet rowLevelPermissionDataSet;
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
*
*/
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 CreateDataSetRequest withAwsAccountId(String awsAccountId) {
setAwsAccountId(awsAccountId);
return this;
}
/**
*
* An ID for the dataset that you want to create. This ID is unique per AWS Region for each AWS account.
*
*
* @param dataSetId
* An ID for the dataset that you want to create. This ID is unique per AWS Region for each AWS account.
*/
public void setDataSetId(String dataSetId) {
this.dataSetId = dataSetId;
}
/**
*
* An ID for the dataset that you want to create. This ID is unique per AWS Region for each AWS account.
*
*
* @return An ID for the dataset that you want to create. This ID is unique per AWS Region for each AWS account.
*/
public String getDataSetId() {
return this.dataSetId;
}
/**
*
* An ID for the dataset that you want to create. This ID is unique per AWS Region for each AWS account.
*
*
* @param dataSetId
* An ID for the dataset that you want to create. 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 CreateDataSetRequest withDataSetId(String dataSetId) {
setDataSetId(dataSetId);
return this;
}
/**
*
* The display name for the dataset.
*
*
* @param name
* The display name for the dataset.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The display name for the dataset.
*
*
* @return The display name for the dataset.
*/
public String getName() {
return this.name;
}
/**
*
* The display name for the dataset.
*
*
* @param name
* The display name for the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withName(String name) {
setName(name);
return this;
}
/**
*
* Declares the physical tables that are available in the underlying data sources.
*
*
* @return Declares the physical tables that are available in the underlying data sources.
*/
public java.util.Map getPhysicalTableMap() {
return physicalTableMap;
}
/**
*
* Declares the physical tables that are available in the underlying data sources.
*
*
* @param physicalTableMap
* Declares the physical tables that are available in the underlying data sources.
*/
public void setPhysicalTableMap(java.util.Map physicalTableMap) {
this.physicalTableMap = physicalTableMap;
}
/**
*
* Declares the physical tables that are available in the underlying data sources.
*
*
* @param physicalTableMap
* Declares the physical tables that are available in the underlying data sources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withPhysicalTableMap(java.util.Map physicalTableMap) {
setPhysicalTableMap(physicalTableMap);
return this;
}
public CreateDataSetRequest addPhysicalTableMapEntry(String key, PhysicalTable value) {
if (null == this.physicalTableMap) {
this.physicalTableMap = new java.util.HashMap();
}
if (this.physicalTableMap.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.physicalTableMap.put(key, value);
return this;
}
/**
* Removes all the entries added into PhysicalTableMap.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest clearPhysicalTableMapEntries() {
this.physicalTableMap = null;
return this;
}
/**
*
* Configures the combination and transformation of the data from the physical tables.
*
*
* @return Configures the combination and transformation of the data from the physical tables.
*/
public java.util.Map getLogicalTableMap() {
return logicalTableMap;
}
/**
*
* Configures the combination and transformation of the data from the physical tables.
*
*
* @param logicalTableMap
* Configures the combination and transformation of the data from the physical tables.
*/
public void setLogicalTableMap(java.util.Map logicalTableMap) {
this.logicalTableMap = logicalTableMap;
}
/**
*
* Configures the combination and transformation of the data from the physical tables.
*
*
* @param logicalTableMap
* Configures the combination and transformation of the data from the physical tables.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withLogicalTableMap(java.util.Map logicalTableMap) {
setLogicalTableMap(logicalTableMap);
return this;
}
public CreateDataSetRequest addLogicalTableMapEntry(String key, LogicalTable value) {
if (null == this.logicalTableMap) {
this.logicalTableMap = new java.util.HashMap();
}
if (this.logicalTableMap.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.logicalTableMap.put(key, value);
return this;
}
/**
* Removes all the entries added into LogicalTableMap.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest clearLogicalTableMapEntries() {
this.logicalTableMap = null;
return this;
}
/**
*
* Indicates whether or not you want to import the data into SPICE.
*
*
* @param importMode
* Indicates whether or not you want to import the data into SPICE.
* @see DataSetImportMode
*/
public void setImportMode(String importMode) {
this.importMode = importMode;
}
/**
*
* Indicates whether or not you want to import the data into SPICE.
*
*
* @return Indicates whether or not you want to import the data into SPICE.
* @see DataSetImportMode
*/
public String getImportMode() {
return this.importMode;
}
/**
*
* Indicates whether or not you want to import the data into SPICE.
*
*
* @param importMode
* Indicates whether or not you want to import the data into SPICE.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataSetImportMode
*/
public CreateDataSetRequest withImportMode(String importMode) {
setImportMode(importMode);
return this;
}
/**
*
* Indicates whether or not you want to import the data into SPICE.
*
*
* @param importMode
* Indicates whether or not you want to import the data into SPICE.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataSetImportMode
*/
public CreateDataSetRequest withImportMode(DataSetImportMode importMode) {
this.importMode = importMode.toString();
return this;
}
/**
*
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial hierarchy is
* supported.
*
*
* @return Groupings of columns that work together in certain QuickSight features. Currently, only geospatial
* hierarchy is supported.
*/
public java.util.List getColumnGroups() {
return columnGroups;
}
/**
*
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial hierarchy is
* supported.
*
*
* @param columnGroups
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial
* hierarchy is supported.
*/
public void setColumnGroups(java.util.Collection columnGroups) {
if (columnGroups == null) {
this.columnGroups = null;
return;
}
this.columnGroups = new java.util.ArrayList(columnGroups);
}
/**
*
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial hierarchy is
* supported.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setColumnGroups(java.util.Collection)} or {@link #withColumnGroups(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param columnGroups
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial
* hierarchy is supported.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withColumnGroups(ColumnGroup... columnGroups) {
if (this.columnGroups == null) {
setColumnGroups(new java.util.ArrayList(columnGroups.length));
}
for (ColumnGroup ele : columnGroups) {
this.columnGroups.add(ele);
}
return this;
}
/**
*
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial hierarchy is
* supported.
*
*
* @param columnGroups
* Groupings of columns that work together in certain QuickSight features. Currently, only geospatial
* hierarchy is supported.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withColumnGroups(java.util.Collection columnGroups) {
setColumnGroups(columnGroups);
return this;
}
/**
*
* A list of resource permissions on the dataset.
*
*
* @return A list of resource permissions on the dataset.
*/
public java.util.List getPermissions() {
return permissions;
}
/**
*
* A list of resource permissions on the dataset.
*
*
* @param permissions
* A list of resource permissions on the dataset.
*/
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 dataset.
*
*
* 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 dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest 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 dataset.
*
*
* @param permissions
* A list of resource permissions on the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withPermissions(java.util.Collection permissions) {
setPermissions(permissions);
return this;
}
/**
*
* Row-level security configuration on the data you want to create.
*
*
* @param rowLevelPermissionDataSet
* Row-level security configuration on the data you want to create.
*/
public void setRowLevelPermissionDataSet(RowLevelPermissionDataSet rowLevelPermissionDataSet) {
this.rowLevelPermissionDataSet = rowLevelPermissionDataSet;
}
/**
*
* Row-level security configuration on the data you want to create.
*
*
* @return Row-level security configuration on the data you want to create.
*/
public RowLevelPermissionDataSet getRowLevelPermissionDataSet() {
return this.rowLevelPermissionDataSet;
}
/**
*
* Row-level security configuration on the data you want to create.
*
*
* @param rowLevelPermissionDataSet
* Row-level security configuration on the data you want to create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest withRowLevelPermissionDataSet(RowLevelPermissionDataSet rowLevelPermissionDataSet) {
setRowLevelPermissionDataSet(rowLevelPermissionDataSet);
return this;
}
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
*
*
* @return Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
*
*
* @param tags
* Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
*/
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 dataset.
*
*
* 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 dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest 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 dataset.
*
*
* @param tags
* Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataSetRequest 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 (getDataSetId() != null)
sb.append("DataSetId: ").append(getDataSetId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPhysicalTableMap() != null)
sb.append("PhysicalTableMap: ").append(getPhysicalTableMap()).append(",");
if (getLogicalTableMap() != null)
sb.append("LogicalTableMap: ").append(getLogicalTableMap()).append(",");
if (getImportMode() != null)
sb.append("ImportMode: ").append(getImportMode()).append(",");
if (getColumnGroups() != null)
sb.append("ColumnGroups: ").append(getColumnGroups()).append(",");
if (getPermissions() != null)
sb.append("Permissions: ").append(getPermissions()).append(",");
if (getRowLevelPermissionDataSet() != null)
sb.append("RowLevelPermissionDataSet: ").append(getRowLevelPermissionDataSet()).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 CreateDataSetRequest == false)
return false;
CreateDataSetRequest other = (CreateDataSetRequest) obj;
if (other.getAwsAccountId() == null ^ this.getAwsAccountId() == null)
return false;
if (other.getAwsAccountId() != null && other.getAwsAccountId().equals(this.getAwsAccountId()) == false)
return false;
if (other.getDataSetId() == null ^ this.getDataSetId() == null)
return false;
if (other.getDataSetId() != null && other.getDataSetId().equals(this.getDataSetId()) == 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.getPhysicalTableMap() == null ^ this.getPhysicalTableMap() == null)
return false;
if (other.getPhysicalTableMap() != null && other.getPhysicalTableMap().equals(this.getPhysicalTableMap()) == false)
return false;
if (other.getLogicalTableMap() == null ^ this.getLogicalTableMap() == null)
return false;
if (other.getLogicalTableMap() != null && other.getLogicalTableMap().equals(this.getLogicalTableMap()) == false)
return false;
if (other.getImportMode() == null ^ this.getImportMode() == null)
return false;
if (other.getImportMode() != null && other.getImportMode().equals(this.getImportMode()) == false)
return false;
if (other.getColumnGroups() == null ^ this.getColumnGroups() == null)
return false;
if (other.getColumnGroups() != null && other.getColumnGroups().equals(this.getColumnGroups()) == 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.getRowLevelPermissionDataSet() == null ^ this.getRowLevelPermissionDataSet() == null)
return false;
if (other.getRowLevelPermissionDataSet() != null && other.getRowLevelPermissionDataSet().equals(this.getRowLevelPermissionDataSet()) == 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 + ((getDataSetId() == null) ? 0 : getDataSetId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPhysicalTableMap() == null) ? 0 : getPhysicalTableMap().hashCode());
hashCode = prime * hashCode + ((getLogicalTableMap() == null) ? 0 : getLogicalTableMap().hashCode());
hashCode = prime * hashCode + ((getImportMode() == null) ? 0 : getImportMode().hashCode());
hashCode = prime * hashCode + ((getColumnGroups() == null) ? 0 : getColumnGroups().hashCode());
hashCode = prime * hashCode + ((getPermissions() == null) ? 0 : getPermissions().hashCode());
hashCode = prime * hashCode + ((getRowLevelPermissionDataSet() == null) ? 0 : getRowLevelPermissionDataSet().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateDataSetRequest clone() {
return (CreateDataSetRequest) super.clone();
}
}