Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.quicksight.model.DataSet Maven / Gradle / Ivy
/*
* Copyright 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 software.amazon.awssdk.services.quicksight.model;
import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.CollectionUtils;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Dataset.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DataSet implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn")
.getter(getter(DataSet::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build();
private static final SdkField DATA_SET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DataSetId").getter(getter(DataSet::dataSetId)).setter(setter(Builder::dataSetId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataSetId").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
.getter(getter(DataSet::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();
private static final SdkField CREATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreatedTime").getter(getter(DataSet::createdTime)).setter(setter(Builder::createdTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedTime").build()).build();
private static final SdkField LAST_UPDATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("LastUpdatedTime").getter(getter(DataSet::lastUpdatedTime)).setter(setter(Builder::lastUpdatedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastUpdatedTime").build()).build();
private static final SdkField> PHYSICAL_TABLE_MAP_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("PhysicalTableMap")
.getter(getter(DataSet::physicalTableMap))
.setter(setter(Builder::physicalTableMap))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PhysicalTableMap").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(PhysicalTable::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> LOGICAL_TABLE_MAP_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("LogicalTableMap")
.getter(getter(DataSet::logicalTableMap))
.setter(setter(Builder::logicalTableMap))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogicalTableMap").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(LogicalTable::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> OUTPUT_COLUMNS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("OutputColumns")
.getter(getter(DataSet::outputColumns))
.setter(setter(Builder::outputColumns))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputColumns").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(OutputColumn::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField IMPORT_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ImportMode").getter(getter(DataSet::importModeAsString)).setter(setter(Builder::importMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImportMode").build()).build();
private static final SdkField CONSUMED_SPICE_CAPACITY_IN_BYTES_FIELD = SdkField
. builder(MarshallingType.LONG)
.memberName("ConsumedSpiceCapacityInBytes")
.getter(getter(DataSet::consumedSpiceCapacityInBytes))
.setter(setter(Builder::consumedSpiceCapacityInBytes))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConsumedSpiceCapacityInBytes")
.build()).build();
private static final SdkField> COLUMN_GROUPS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("ColumnGroups")
.getter(getter(DataSet::columnGroups))
.setter(setter(Builder::columnGroups))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ColumnGroups").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(ColumnGroup::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> FIELD_FOLDERS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("FieldFolders")
.getter(getter(DataSet::fieldFolders))
.setter(setter(Builder::fieldFolders))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FieldFolders").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(FieldFolder::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField ROW_LEVEL_PERMISSION_DATA_SET_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RowLevelPermissionDataSet")
.getter(getter(DataSet::rowLevelPermissionDataSet)).setter(setter(Builder::rowLevelPermissionDataSet))
.constructor(RowLevelPermissionDataSet::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RowLevelPermissionDataSet").build())
.build();
private static final SdkField> COLUMN_LEVEL_PERMISSION_RULES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("ColumnLevelPermissionRules")
.getter(getter(DataSet::columnLevelPermissionRules))
.setter(setter(Builder::columnLevelPermissionRules))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ColumnLevelPermissionRules").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(ColumnLevelPermissionRule::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, DATA_SET_ID_FIELD,
NAME_FIELD, CREATED_TIME_FIELD, LAST_UPDATED_TIME_FIELD, PHYSICAL_TABLE_MAP_FIELD, LOGICAL_TABLE_MAP_FIELD,
OUTPUT_COLUMNS_FIELD, IMPORT_MODE_FIELD, CONSUMED_SPICE_CAPACITY_IN_BYTES_FIELD, COLUMN_GROUPS_FIELD,
FIELD_FOLDERS_FIELD, ROW_LEVEL_PERMISSION_DATA_SET_FIELD, COLUMN_LEVEL_PERMISSION_RULES_FIELD));
private static final long serialVersionUID = 1L;
private final String arn;
private final String dataSetId;
private final String name;
private final Instant createdTime;
private final Instant lastUpdatedTime;
private final Map physicalTableMap;
private final Map logicalTableMap;
private final List outputColumns;
private final String importMode;
private final Long consumedSpiceCapacityInBytes;
private final List columnGroups;
private final Map fieldFolders;
private final RowLevelPermissionDataSet rowLevelPermissionDataSet;
private final List columnLevelPermissionRules;
private DataSet(BuilderImpl builder) {
this.arn = builder.arn;
this.dataSetId = builder.dataSetId;
this.name = builder.name;
this.createdTime = builder.createdTime;
this.lastUpdatedTime = builder.lastUpdatedTime;
this.physicalTableMap = builder.physicalTableMap;
this.logicalTableMap = builder.logicalTableMap;
this.outputColumns = builder.outputColumns;
this.importMode = builder.importMode;
this.consumedSpiceCapacityInBytes = builder.consumedSpiceCapacityInBytes;
this.columnGroups = builder.columnGroups;
this.fieldFolders = builder.fieldFolders;
this.rowLevelPermissionDataSet = builder.rowLevelPermissionDataSet;
this.columnLevelPermissionRules = builder.columnLevelPermissionRules;
}
/**
*
* The Amazon Resource Name (ARN) of the resource.
*
*
* @return The Amazon Resource Name (ARN) of the resource.
*/
public final String arn() {
return arn;
}
/**
*
* The ID of the dataset.
*
*
* @return The ID of the dataset.
*/
public final String dataSetId() {
return dataSetId;
}
/**
*
* A display name for the dataset.
*
*
* @return A display name for the dataset.
*/
public final String name() {
return name;
}
/**
*
* The time that this dataset was created.
*
*
* @return The time that this dataset was created.
*/
public final Instant createdTime() {
return createdTime;
}
/**
*
* The last time that this dataset was updated.
*
*
* @return The last time that this dataset was updated.
*/
public final Instant lastUpdatedTime() {
return lastUpdatedTime;
}
/**
* Returns true if the PhysicalTableMap property was specified by the sender (it may be empty), or false if the
* sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/
public final boolean hasPhysicalTableMap() {
return physicalTableMap != null && !(physicalTableMap instanceof SdkAutoConstructMap);
}
/**
*
* Declares the physical tables that are available in the underlying data sources.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasPhysicalTableMap()} to see if a value was sent in this field.
*
*
* @return Declares the physical tables that are available in the underlying data sources.
*/
public final Map physicalTableMap() {
return physicalTableMap;
}
/**
* Returns true if the LogicalTableMap property was specified by the sender (it may be empty), or false if the
* sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/
public final boolean hasLogicalTableMap() {
return logicalTableMap != null && !(logicalTableMap instanceof SdkAutoConstructMap);
}
/**
*
* Configures the combination and transformation of the data from the physical tables.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasLogicalTableMap()} to see if a value was sent in this field.
*
*
* @return Configures the combination and transformation of the data from the physical tables.
*/
public final Map logicalTableMap() {
return logicalTableMap;
}
/**
* Returns true if the OutputColumns property was specified by the sender (it may be empty), or false if the sender
* did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public final boolean hasOutputColumns() {
return outputColumns != null && !(outputColumns instanceof SdkAutoConstructList);
}
/**
*
* The list of columns after all transforms. These columns are available in templates, analyses, and dashboards.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasOutputColumns()} to see if a value was sent in this field.
*
*
* @return The list of columns after all transforms. These columns are available in templates, analyses, and
* dashboards.
*/
public final List outputColumns() {
return outputColumns;
}
/**
*
* A value that indicates whether you want to import the data into SPICE.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #importMode} will
* return {@link DataSetImportMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #importModeAsString}.
*
*
* @return A value that indicates whether you want to import the data into SPICE.
* @see DataSetImportMode
*/
public final DataSetImportMode importMode() {
return DataSetImportMode.fromValue(importMode);
}
/**
*
* A value that indicates whether you want to import the data into SPICE.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #importMode} will
* return {@link DataSetImportMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #importModeAsString}.
*
*
* @return A value that indicates whether you want to import the data into SPICE.
* @see DataSetImportMode
*/
public final String importModeAsString() {
return importMode;
}
/**
*
* The amount of SPICE capacity used by this dataset. This is 0 if the dataset isn't imported into SPICE.
*
*
* @return The amount of SPICE capacity used by this dataset. This is 0 if the dataset isn't imported into SPICE.
*/
public final Long consumedSpiceCapacityInBytes() {
return consumedSpiceCapacityInBytes;
}
/**
* Returns true if the ColumnGroups property was specified by the sender (it may be empty), or false if the sender
* did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public final boolean hasColumnGroups() {
return columnGroups != null && !(columnGroups instanceof SdkAutoConstructList);
}
/**
*
* Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial
* hierarchy is supported.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasColumnGroups()} to see if a value was sent in this field.
*
*
* @return Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial
* hierarchy is supported.
*/
public final List columnGroups() {
return columnGroups;
}
/**
* Returns true if the FieldFolders property was specified by the sender (it may be empty), or false if the sender
* did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public final boolean hasFieldFolders() {
return fieldFolders != null && !(fieldFolders instanceof SdkAutoConstructMap);
}
/**
*
* The folder that contains fields and nested subfolders for your dataset.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasFieldFolders()} to see if a value was sent in this field.
*
*
* @return The folder that contains fields and nested subfolders for your dataset.
*/
public final Map fieldFolders() {
return fieldFolders;
}
/**
*
* The row-level security configuration for the dataset.
*
*
* @return The row-level security configuration for the dataset.
*/
public final RowLevelPermissionDataSet rowLevelPermissionDataSet() {
return rowLevelPermissionDataSet;
}
/**
* Returns true if the ColumnLevelPermissionRules property was specified by the sender (it may be empty), or false
* if the sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the
* AWS service.
*/
public final boolean hasColumnLevelPermissionRules() {
return columnLevelPermissionRules != null && !(columnLevelPermissionRules instanceof SdkAutoConstructList);
}
/**
*
* A set of one or more definitions of a ColumnLevelPermissionRule
.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasColumnLevelPermissionRules()} to see if a value was sent in this field.
*
*
* @return A set of one or more definitions of a ColumnLevelPermissionRule
.
*/
public final List columnLevelPermissionRules() {
return columnLevelPermissionRules;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(arn());
hashCode = 31 * hashCode + Objects.hashCode(dataSetId());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(createdTime());
hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedTime());
hashCode = 31 * hashCode + Objects.hashCode(hasPhysicalTableMap() ? physicalTableMap() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasLogicalTableMap() ? logicalTableMap() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasOutputColumns() ? outputColumns() : null);
hashCode = 31 * hashCode + Objects.hashCode(importModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(consumedSpiceCapacityInBytes());
hashCode = 31 * hashCode + Objects.hashCode(hasColumnGroups() ? columnGroups() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasFieldFolders() ? fieldFolders() : null);
hashCode = 31 * hashCode + Objects.hashCode(rowLevelPermissionDataSet());
hashCode = 31 * hashCode + Objects.hashCode(hasColumnLevelPermissionRules() ? columnLevelPermissionRules() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof DataSet)) {
return false;
}
DataSet other = (DataSet) obj;
return Objects.equals(arn(), other.arn()) && Objects.equals(dataSetId(), other.dataSetId())
&& Objects.equals(name(), other.name()) && Objects.equals(createdTime(), other.createdTime())
&& Objects.equals(lastUpdatedTime(), other.lastUpdatedTime())
&& hasPhysicalTableMap() == other.hasPhysicalTableMap()
&& Objects.equals(physicalTableMap(), other.physicalTableMap())
&& hasLogicalTableMap() == other.hasLogicalTableMap()
&& Objects.equals(logicalTableMap(), other.logicalTableMap()) && hasOutputColumns() == other.hasOutputColumns()
&& Objects.equals(outputColumns(), other.outputColumns())
&& Objects.equals(importModeAsString(), other.importModeAsString())
&& Objects.equals(consumedSpiceCapacityInBytes(), other.consumedSpiceCapacityInBytes())
&& hasColumnGroups() == other.hasColumnGroups() && Objects.equals(columnGroups(), other.columnGroups())
&& hasFieldFolders() == other.hasFieldFolders() && Objects.equals(fieldFolders(), other.fieldFolders())
&& Objects.equals(rowLevelPermissionDataSet(), other.rowLevelPermissionDataSet())
&& hasColumnLevelPermissionRules() == other.hasColumnLevelPermissionRules()
&& Objects.equals(columnLevelPermissionRules(), other.columnLevelPermissionRules());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("DataSet").add("Arn", arn()).add("DataSetId", dataSetId()).add("Name", name())
.add("CreatedTime", createdTime()).add("LastUpdatedTime", lastUpdatedTime())
.add("PhysicalTableMap", hasPhysicalTableMap() ? physicalTableMap() : null)
.add("LogicalTableMap", hasLogicalTableMap() ? logicalTableMap() : null)
.add("OutputColumns", hasOutputColumns() ? outputColumns() : null).add("ImportMode", importModeAsString())
.add("ConsumedSpiceCapacityInBytes", consumedSpiceCapacityInBytes())
.add("ColumnGroups", hasColumnGroups() ? columnGroups() : null)
.add("FieldFolders", hasFieldFolders() ? fieldFolders() : null)
.add("RowLevelPermissionDataSet", rowLevelPermissionDataSet())
.add("ColumnLevelPermissionRules", hasColumnLevelPermissionRules() ? columnLevelPermissionRules() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Arn":
return Optional.ofNullable(clazz.cast(arn()));
case "DataSetId":
return Optional.ofNullable(clazz.cast(dataSetId()));
case "Name":
return Optional.ofNullable(clazz.cast(name()));
case "CreatedTime":
return Optional.ofNullable(clazz.cast(createdTime()));
case "LastUpdatedTime":
return Optional.ofNullable(clazz.cast(lastUpdatedTime()));
case "PhysicalTableMap":
return Optional.ofNullable(clazz.cast(physicalTableMap()));
case "LogicalTableMap":
return Optional.ofNullable(clazz.cast(logicalTableMap()));
case "OutputColumns":
return Optional.ofNullable(clazz.cast(outputColumns()));
case "ImportMode":
return Optional.ofNullable(clazz.cast(importModeAsString()));
case "ConsumedSpiceCapacityInBytes":
return Optional.ofNullable(clazz.cast(consumedSpiceCapacityInBytes()));
case "ColumnGroups":
return Optional.ofNullable(clazz.cast(columnGroups()));
case "FieldFolders":
return Optional.ofNullable(clazz.cast(fieldFolders()));
case "RowLevelPermissionDataSet":
return Optional.ofNullable(clazz.cast(rowLevelPermissionDataSet()));
case "ColumnLevelPermissionRules":
return Optional.ofNullable(clazz.cast(columnLevelPermissionRules()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((DataSet) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* The Amazon Resource Name (ARN) of the resource.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder arn(String arn);
/**
*
* The ID of the dataset.
*
*
* @param dataSetId
* The ID of the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dataSetId(String dataSetId);
/**
*
* A display name for the dataset.
*
*
* @param name
* A display name for the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The time that this dataset was created.
*
*
* @param createdTime
* The time that this dataset was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createdTime(Instant createdTime);
/**
*
* The last time that this dataset was updated.
*
*
* @param lastUpdatedTime
* The last time that this dataset was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lastUpdatedTime(Instant lastUpdatedTime);
/**
*
* 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.
*/
Builder physicalTableMap(Map physicalTableMap);
/**
*
* 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.
*/
Builder logicalTableMap(Map logicalTableMap);
/**
*
* The list of columns after all transforms. These columns are available in templates, analyses, and dashboards.
*
*
* @param outputColumns
* The list of columns after all transforms. These columns are available in templates, analyses, and
* dashboards.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputColumns(Collection outputColumns);
/**
*
* The list of columns after all transforms. These columns are available in templates, analyses, and dashboards.
*
*
* @param outputColumns
* The list of columns after all transforms. These columns are available in templates, analyses, and
* dashboards.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputColumns(OutputColumn... outputColumns);
/**
*
* The list of columns after all transforms. These columns are available in templates, analyses, and dashboards.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to
* create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its
* result is passed to {@link #outputColumns(List)}.
*
* @param outputColumns
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #outputColumns(List)
*/
Builder outputColumns(Consumer... outputColumns);
/**
*
* A value that indicates whether you want to import the data into SPICE.
*
*
* @param importMode
* A value that indicates whether you want to import the data into SPICE.
* @see DataSetImportMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataSetImportMode
*/
Builder importMode(String importMode);
/**
*
* A value that indicates whether you want to import the data into SPICE.
*
*
* @param importMode
* A value that indicates whether you want to import the data into SPICE.
* @see DataSetImportMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataSetImportMode
*/
Builder importMode(DataSetImportMode importMode);
/**
*
* The amount of SPICE capacity used by this dataset. This is 0 if the dataset isn't imported into SPICE.
*
*
* @param consumedSpiceCapacityInBytes
* The amount of SPICE capacity used by this dataset. This is 0 if the dataset isn't imported into SPICE.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder consumedSpiceCapacityInBytes(Long consumedSpiceCapacityInBytes);
/**
*
* Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial
* hierarchy is supported.
*
*
* @param columnGroups
* Groupings of columns that work together in certain Amazon QuickSight features. Currently, only
* geospatial hierarchy is supported.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder columnGroups(Collection columnGroups);
/**
*
* Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial
* hierarchy is supported.
*
*
* @param columnGroups
* Groupings of columns that work together in certain Amazon QuickSight features. Currently, only
* geospatial hierarchy is supported.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder columnGroups(ColumnGroup... columnGroups);
/**
*
* Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial
* hierarchy is supported.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to
* create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its
* result is passed to {@link #columnGroups(List)}.
*
* @param columnGroups
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #columnGroups(List)
*/
Builder columnGroups(Consumer... columnGroups);
/**
*
* The folder that contains fields and nested subfolders for your dataset.
*
*
* @param fieldFolders
* The folder that contains fields and nested subfolders for your dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder fieldFolders(Map fieldFolders);
/**
*
* The row-level security configuration for the dataset.
*
*
* @param rowLevelPermissionDataSet
* The row-level security configuration for the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder rowLevelPermissionDataSet(RowLevelPermissionDataSet rowLevelPermissionDataSet);
/**
*
* The row-level security configuration for the dataset.
*
* This is a convenience that creates an instance of the {@link RowLevelPermissionDataSet.Builder} avoiding the
* need to create one manually via {@link RowLevelPermissionDataSet#builder()}.
*
* When the {@link Consumer} completes, {@link RowLevelPermissionDataSet.Builder#build()} is called immediately
* and its result is passed to {@link #rowLevelPermissionDataSet(RowLevelPermissionDataSet)}.
*
* @param rowLevelPermissionDataSet
* a consumer that will call methods on {@link RowLevelPermissionDataSet.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #rowLevelPermissionDataSet(RowLevelPermissionDataSet)
*/
default Builder rowLevelPermissionDataSet(Consumer rowLevelPermissionDataSet) {
return rowLevelPermissionDataSet(RowLevelPermissionDataSet.builder().applyMutation(rowLevelPermissionDataSet).build());
}
/**
*
* A set of one or more definitions of a ColumnLevelPermissionRule
.
*
*
* @param columnLevelPermissionRules
* A set of one or more definitions of a ColumnLevelPermissionRule
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder columnLevelPermissionRules(Collection columnLevelPermissionRules);
/**
*
* A set of one or more definitions of a ColumnLevelPermissionRule
.
*
*
* @param columnLevelPermissionRules
* A set of one or more definitions of a ColumnLevelPermissionRule
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder columnLevelPermissionRules(ColumnLevelPermissionRule... columnLevelPermissionRules);
/**
*
* A set of one or more definitions of a ColumnLevelPermissionRule
.
*
* This is a convenience that creates an instance of the {@link List.Builder}
* avoiding the need to create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called
* immediately and its result is passed to {@link #columnLevelPermissionRules(List)}.
*
* @param columnLevelPermissionRules
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #columnLevelPermissionRules(List)
*/
Builder columnLevelPermissionRules(Consumer... columnLevelPermissionRules);
}
static final class BuilderImpl implements Builder {
private String arn;
private String dataSetId;
private String name;
private Instant createdTime;
private Instant lastUpdatedTime;
private Map physicalTableMap = DefaultSdkAutoConstructMap.getInstance();
private Map logicalTableMap = DefaultSdkAutoConstructMap.getInstance();
private List outputColumns = DefaultSdkAutoConstructList.getInstance();
private String importMode;
private Long consumedSpiceCapacityInBytes;
private List columnGroups = DefaultSdkAutoConstructList.getInstance();
private Map fieldFolders = DefaultSdkAutoConstructMap.getInstance();
private RowLevelPermissionDataSet rowLevelPermissionDataSet;
private List columnLevelPermissionRules = DefaultSdkAutoConstructList.getInstance();
private BuilderImpl() {
}
private BuilderImpl(DataSet model) {
arn(model.arn);
dataSetId(model.dataSetId);
name(model.name);
createdTime(model.createdTime);
lastUpdatedTime(model.lastUpdatedTime);
physicalTableMap(model.physicalTableMap);
logicalTableMap(model.logicalTableMap);
outputColumns(model.outputColumns);
importMode(model.importMode);
consumedSpiceCapacityInBytes(model.consumedSpiceCapacityInBytes);
columnGroups(model.columnGroups);
fieldFolders(model.fieldFolders);
rowLevelPermissionDataSet(model.rowLevelPermissionDataSet);
columnLevelPermissionRules(model.columnLevelPermissionRules);
}
public final String getArn() {
return arn;
}
@Override
public final Builder arn(String arn) {
this.arn = arn;
return this;
}
public final void setArn(String arn) {
this.arn = arn;
}
public final String getDataSetId() {
return dataSetId;
}
@Override
public final Builder dataSetId(String dataSetId) {
this.dataSetId = dataSetId;
return this;
}
public final void setDataSetId(String dataSetId) {
this.dataSetId = dataSetId;
}
public final String getName() {
return name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final void setName(String name) {
this.name = name;
}
public final Instant getCreatedTime() {
return createdTime;
}
@Override
public final Builder createdTime(Instant createdTime) {
this.createdTime = createdTime;
return this;
}
public final void setCreatedTime(Instant createdTime) {
this.createdTime = createdTime;
}
public final Instant getLastUpdatedTime() {
return lastUpdatedTime;
}
@Override
public final Builder lastUpdatedTime(Instant lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
return this;
}
public final void setLastUpdatedTime(Instant lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
public final Map getPhysicalTableMap() {
if (physicalTableMap instanceof SdkAutoConstructMap) {
return null;
}
return physicalTableMap != null ? CollectionUtils.mapValues(physicalTableMap, PhysicalTable::toBuilder) : null;
}
@Override
public final Builder physicalTableMap(Map physicalTableMap) {
this.physicalTableMap = PhysicalTableMapCopier.copy(physicalTableMap);
return this;
}
public final void setPhysicalTableMap(Map physicalTableMap) {
this.physicalTableMap = PhysicalTableMapCopier.copyFromBuilder(physicalTableMap);
}
public final Map getLogicalTableMap() {
if (logicalTableMap instanceof SdkAutoConstructMap) {
return null;
}
return logicalTableMap != null ? CollectionUtils.mapValues(logicalTableMap, LogicalTable::toBuilder) : null;
}
@Override
public final Builder logicalTableMap(Map logicalTableMap) {
this.logicalTableMap = LogicalTableMapCopier.copy(logicalTableMap);
return this;
}
public final void setLogicalTableMap(Map logicalTableMap) {
this.logicalTableMap = LogicalTableMapCopier.copyFromBuilder(logicalTableMap);
}
public final Collection getOutputColumns() {
if (outputColumns instanceof SdkAutoConstructList) {
return null;
}
return outputColumns != null ? outputColumns.stream().map(OutputColumn::toBuilder).collect(Collectors.toList())
: null;
}
@Override
public final Builder outputColumns(Collection outputColumns) {
this.outputColumns = OutputColumnListCopier.copy(outputColumns);
return this;
}
@Override
@SafeVarargs
public final Builder outputColumns(OutputColumn... outputColumns) {
outputColumns(Arrays.asList(outputColumns));
return this;
}
@Override
@SafeVarargs
public final Builder outputColumns(Consumer... outputColumns) {
outputColumns(Stream.of(outputColumns).map(c -> OutputColumn.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final void setOutputColumns(Collection outputColumns) {
this.outputColumns = OutputColumnListCopier.copyFromBuilder(outputColumns);
}
public final String getImportMode() {
return importMode;
}
@Override
public final Builder importMode(String importMode) {
this.importMode = importMode;
return this;
}
@Override
public final Builder importMode(DataSetImportMode importMode) {
this.importMode(importMode == null ? null : importMode.toString());
return this;
}
public final void setImportMode(String importMode) {
this.importMode = importMode;
}
public final Long getConsumedSpiceCapacityInBytes() {
return consumedSpiceCapacityInBytes;
}
@Override
public final Builder consumedSpiceCapacityInBytes(Long consumedSpiceCapacityInBytes) {
this.consumedSpiceCapacityInBytes = consumedSpiceCapacityInBytes;
return this;
}
public final void setConsumedSpiceCapacityInBytes(Long consumedSpiceCapacityInBytes) {
this.consumedSpiceCapacityInBytes = consumedSpiceCapacityInBytes;
}
public final Collection getColumnGroups() {
if (columnGroups instanceof SdkAutoConstructList) {
return null;
}
return columnGroups != null ? columnGroups.stream().map(ColumnGroup::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder columnGroups(Collection columnGroups) {
this.columnGroups = ColumnGroupListCopier.copy(columnGroups);
return this;
}
@Override
@SafeVarargs
public final Builder columnGroups(ColumnGroup... columnGroups) {
columnGroups(Arrays.asList(columnGroups));
return this;
}
@Override
@SafeVarargs
public final Builder columnGroups(Consumer... columnGroups) {
columnGroups(Stream.of(columnGroups).map(c -> ColumnGroup.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final void setColumnGroups(Collection columnGroups) {
this.columnGroups = ColumnGroupListCopier.copyFromBuilder(columnGroups);
}
public final Map getFieldFolders() {
if (fieldFolders instanceof SdkAutoConstructMap) {
return null;
}
return fieldFolders != null ? CollectionUtils.mapValues(fieldFolders, FieldFolder::toBuilder) : null;
}
@Override
public final Builder fieldFolders(Map fieldFolders) {
this.fieldFolders = FieldFolderMapCopier.copy(fieldFolders);
return this;
}
public final void setFieldFolders(Map fieldFolders) {
this.fieldFolders = FieldFolderMapCopier.copyFromBuilder(fieldFolders);
}
public final RowLevelPermissionDataSet.Builder getRowLevelPermissionDataSet() {
return rowLevelPermissionDataSet != null ? rowLevelPermissionDataSet.toBuilder() : null;
}
@Override
public final Builder rowLevelPermissionDataSet(RowLevelPermissionDataSet rowLevelPermissionDataSet) {
this.rowLevelPermissionDataSet = rowLevelPermissionDataSet;
return this;
}
public final void setRowLevelPermissionDataSet(RowLevelPermissionDataSet.BuilderImpl rowLevelPermissionDataSet) {
this.rowLevelPermissionDataSet = rowLevelPermissionDataSet != null ? rowLevelPermissionDataSet.build() : null;
}
public final Collection getColumnLevelPermissionRules() {
if (columnLevelPermissionRules instanceof SdkAutoConstructList) {
return null;
}
return columnLevelPermissionRules != null ? columnLevelPermissionRules.stream()
.map(ColumnLevelPermissionRule::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder columnLevelPermissionRules(Collection columnLevelPermissionRules) {
this.columnLevelPermissionRules = ColumnLevelPermissionRuleListCopier.copy(columnLevelPermissionRules);
return this;
}
@Override
@SafeVarargs
public final Builder columnLevelPermissionRules(ColumnLevelPermissionRule... columnLevelPermissionRules) {
columnLevelPermissionRules(Arrays.asList(columnLevelPermissionRules));
return this;
}
@Override
@SafeVarargs
public final Builder columnLevelPermissionRules(Consumer... columnLevelPermissionRules) {
columnLevelPermissionRules(Stream.of(columnLevelPermissionRules)
.map(c -> ColumnLevelPermissionRule.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
public final void setColumnLevelPermissionRules(
Collection columnLevelPermissionRules) {
this.columnLevelPermissionRules = ColumnLevelPermissionRuleListCopier.copyFromBuilder(columnLevelPermissionRules);
}
@Override
public DataSet build() {
return new DataSet(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}