All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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.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 ROW_LEVEL_PERMISSION_TAG_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("RowLevelPermissionTagConfiguration") .getter(getter(DataSet::rowLevelPermissionTagConfiguration)) .setter(setter(Builder::rowLevelPermissionTagConfiguration)) .constructor(RowLevelPermissionTagConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RowLevelPermissionTagConfiguration") .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 SdkField DATA_SET_USAGE_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("DataSetUsageConfiguration") .getter(getter(DataSet::dataSetUsageConfiguration)).setter(setter(Builder::dataSetUsageConfiguration)) .constructor(DataSetUsageConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataSetUsageConfiguration").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, ROW_LEVEL_PERMISSION_TAG_CONFIGURATION_FIELD, COLUMN_LEVEL_PERMISSION_RULES_FIELD, DATA_SET_USAGE_CONFIGURATION_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 RowLevelPermissionTagConfiguration rowLevelPermissionTagConfiguration; private final List columnLevelPermissionRules; private final DataSetUsageConfiguration dataSetUsageConfiguration; 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.rowLevelPermissionTagConfiguration = builder.rowLevelPermissionTagConfiguration; this.columnLevelPermissionRules = builder.columnLevelPermissionRules; this.dataSetUsageConfiguration = builder.dataSetUsageConfiguration; } /** *

* 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; } /** * For responses, this returns true if the service returned a value for the PhysicalTableMap property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ 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. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasPhysicalTableMap} method. *

* * @return Declares the physical tables that are available in the underlying data sources. */ public final Map physicalTableMap() { return physicalTableMap; } /** * For responses, this returns true if the service returned a value for the LogicalTableMap property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ 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. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasLogicalTableMap} method. *

* * @return Configures the combination and transformation of the data from the physical tables. */ public final Map logicalTableMap() { return logicalTableMap; } /** * For responses, this returns true if the service returned a value for the OutputColumns property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ 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. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasOutputColumns} method. *

* * @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; } /** * For responses, this returns true if the service returned a value for the ColumnGroups property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ 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. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasColumnGroups} method. *

* * @return Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial * hierarchy is supported. */ public final List columnGroups() { return columnGroups; } /** * For responses, this returns true if the service returned a value for the FieldFolders property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ 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. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasFieldFolders} method. *

* * @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; } /** *

* The element you can use to define tags for row-level security. *

* * @return The element you can use to define tags for row-level security. */ public final RowLevelPermissionTagConfiguration rowLevelPermissionTagConfiguration() { return rowLevelPermissionTagConfiguration; } /** * For responses, this returns true if the service returned a value for the ColumnLevelPermissionRules property. * This DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ 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. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasColumnLevelPermissionRules} method. *

* * @return A set of one or more definitions of a * ColumnLevelPermissionRule * . */ public final List columnLevelPermissionRules() { return columnLevelPermissionRules; } /** *

* The usage configuration to apply to child datasets that reference this dataset as a source. *

* * @return The usage configuration to apply to child datasets that reference this dataset as a source. */ public final DataSetUsageConfiguration dataSetUsageConfiguration() { return dataSetUsageConfiguration; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class 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(rowLevelPermissionTagConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(hasColumnLevelPermissionRules() ? columnLevelPermissionRules() : null); hashCode = 31 * hashCode + Objects.hashCode(dataSetUsageConfiguration()); 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()) && Objects.equals(rowLevelPermissionTagConfiguration(), other.rowLevelPermissionTagConfiguration()) && hasColumnLevelPermissionRules() == other.hasColumnLevelPermissionRules() && Objects.equals(columnLevelPermissionRules(), other.columnLevelPermissionRules()) && Objects.equals(dataSetUsageConfiguration(), other.dataSetUsageConfiguration()); } /** * 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("RowLevelPermissionTagConfiguration", rowLevelPermissionTagConfiguration()) .add("ColumnLevelPermissionRules", hasColumnLevelPermissionRules() ? columnLevelPermissionRules() : null) .add("DataSetUsageConfiguration", dataSetUsageConfiguration()).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 "RowLevelPermissionTagConfiguration": return Optional.ofNullable(clazz.cast(rowLevelPermissionTagConfiguration())); case "ColumnLevelPermissionRules": return Optional.ofNullable(clazz.cast(columnLevelPermissionRules())); case "DataSetUsageConfiguration": return Optional.ofNullable(clazz.cast(dataSetUsageConfiguration())); 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 method that creates an instance of the * {@link software.amazon.awssdk.services.quicksight.model.OutputColumn.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.quicksight.model.OutputColumn#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.quicksight.model.OutputColumn.Builder#build()} is called immediately * and its result is passed to {@link #outputColumns(List)}. * * @param outputColumns * a consumer that will call methods on * {@link software.amazon.awssdk.services.quicksight.model.OutputColumn.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #outputColumns(java.util.Collection) */ 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 method that creates an instance of the * {@link software.amazon.awssdk.services.quicksight.model.ColumnGroup.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.quicksight.model.ColumnGroup#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.quicksight.model.ColumnGroup.Builder#build()} is called immediately * and its result is passed to {@link #columnGroups(List)}. * * @param columnGroups * a consumer that will call methods on * {@link software.amazon.awssdk.services.quicksight.model.ColumnGroup.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #columnGroups(java.util.Collection) */ 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 method 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()); } /** *

* The element you can use to define tags for row-level security. *

* * @param rowLevelPermissionTagConfiguration * The element you can use to define tags for row-level security. * @return Returns a reference to this object so that method calls can be chained together. */ Builder rowLevelPermissionTagConfiguration(RowLevelPermissionTagConfiguration rowLevelPermissionTagConfiguration); /** *

* The element you can use to define tags for row-level security. *

* This is a convenience method that creates an instance of the * {@link RowLevelPermissionTagConfiguration.Builder} avoiding the need to create one manually via * {@link RowLevelPermissionTagConfiguration#builder()}. * *

* When the {@link Consumer} completes, {@link RowLevelPermissionTagConfiguration.Builder#build()} is called * immediately and its result is passed to * {@link #rowLevelPermissionTagConfiguration(RowLevelPermissionTagConfiguration)}. * * @param rowLevelPermissionTagConfiguration * a consumer that will call methods on {@link RowLevelPermissionTagConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #rowLevelPermissionTagConfiguration(RowLevelPermissionTagConfiguration) */ default Builder rowLevelPermissionTagConfiguration( Consumer rowLevelPermissionTagConfiguration) { return rowLevelPermissionTagConfiguration(RowLevelPermissionTagConfiguration.builder() .applyMutation(rowLevelPermissionTagConfiguration).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 method that creates an instance of the * {@link software.amazon.awssdk.services.quicksight.model.ColumnLevelPermissionRule.Builder} avoiding the need * to create one manually via * {@link software.amazon.awssdk.services.quicksight.model.ColumnLevelPermissionRule#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.quicksight.model.ColumnLevelPermissionRule.Builder#build()} is called * immediately and its result is passed to {@link #columnLevelPermissionRules(List)}. * * @param columnLevelPermissionRules * a consumer that will call methods on * {@link software.amazon.awssdk.services.quicksight.model.ColumnLevelPermissionRule.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #columnLevelPermissionRules(java.util.Collection) */ Builder columnLevelPermissionRules(Consumer... columnLevelPermissionRules); /** *

* The usage configuration to apply to child datasets that reference this dataset as a source. *

* * @param dataSetUsageConfiguration * The usage configuration to apply to child datasets that reference this dataset as a source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dataSetUsageConfiguration(DataSetUsageConfiguration dataSetUsageConfiguration); /** *

* The usage configuration to apply to child datasets that reference this dataset as a source. *

* This is a convenience method that creates an instance of the {@link DataSetUsageConfiguration.Builder} * avoiding the need to create one manually via {@link DataSetUsageConfiguration#builder()}. * *

* When the {@link Consumer} completes, {@link DataSetUsageConfiguration.Builder#build()} is called immediately * and its result is passed to {@link #dataSetUsageConfiguration(DataSetUsageConfiguration)}. * * @param dataSetUsageConfiguration * a consumer that will call methods on {@link DataSetUsageConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #dataSetUsageConfiguration(DataSetUsageConfiguration) */ default Builder dataSetUsageConfiguration(Consumer dataSetUsageConfiguration) { return dataSetUsageConfiguration(DataSetUsageConfiguration.builder().applyMutation(dataSetUsageConfiguration).build()); } } 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 RowLevelPermissionTagConfiguration rowLevelPermissionTagConfiguration; private List columnLevelPermissionRules = DefaultSdkAutoConstructList.getInstance(); private DataSetUsageConfiguration dataSetUsageConfiguration; 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); rowLevelPermissionTagConfiguration(model.rowLevelPermissionTagConfiguration); columnLevelPermissionRules(model.columnLevelPermissionRules); dataSetUsageConfiguration(model.dataSetUsageConfiguration); } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final String getDataSetId() { return dataSetId; } public final void setDataSetId(String dataSetId) { this.dataSetId = dataSetId; } @Override public final Builder dataSetId(String dataSetId) { this.dataSetId = dataSetId; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final Instant getCreatedTime() { return createdTime; } public final void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; } @Override public final Builder createdTime(Instant createdTime) { this.createdTime = createdTime; return this; } public final Instant getLastUpdatedTime() { return lastUpdatedTime; } public final void setLastUpdatedTime(Instant lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } @Override public final Builder lastUpdatedTime(Instant lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; return this; } public final Map getPhysicalTableMap() { Map result = PhysicalTableMapCopier.copyToBuilder(this.physicalTableMap); if (result instanceof SdkAutoConstructMap) { return null; } return result; } public final void setPhysicalTableMap(Map physicalTableMap) { this.physicalTableMap = PhysicalTableMapCopier.copyFromBuilder(physicalTableMap); } @Override public final Builder physicalTableMap(Map physicalTableMap) { this.physicalTableMap = PhysicalTableMapCopier.copy(physicalTableMap); return this; } public final Map getLogicalTableMap() { Map result = LogicalTableMapCopier.copyToBuilder(this.logicalTableMap); if (result instanceof SdkAutoConstructMap) { return null; } return result; } public final void setLogicalTableMap(Map logicalTableMap) { this.logicalTableMap = LogicalTableMapCopier.copyFromBuilder(logicalTableMap); } @Override public final Builder logicalTableMap(Map logicalTableMap) { this.logicalTableMap = LogicalTableMapCopier.copy(logicalTableMap); return this; } public final List getOutputColumns() { List result = OutputColumnListCopier.copyToBuilder(this.outputColumns); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setOutputColumns(Collection outputColumns) { this.outputColumns = OutputColumnListCopier.copyFromBuilder(outputColumns); } @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 String getImportMode() { return importMode; } public final void setImportMode(String importMode) { this.importMode = 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 Long getConsumedSpiceCapacityInBytes() { return consumedSpiceCapacityInBytes; } public final void setConsumedSpiceCapacityInBytes(Long consumedSpiceCapacityInBytes) { this.consumedSpiceCapacityInBytes = consumedSpiceCapacityInBytes; } @Override public final Builder consumedSpiceCapacityInBytes(Long consumedSpiceCapacityInBytes) { this.consumedSpiceCapacityInBytes = consumedSpiceCapacityInBytes; return this; } public final List getColumnGroups() { List result = ColumnGroupListCopier.copyToBuilder(this.columnGroups); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setColumnGroups(Collection columnGroups) { this.columnGroups = ColumnGroupListCopier.copyFromBuilder(columnGroups); } @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 Map getFieldFolders() { Map result = FieldFolderMapCopier.copyToBuilder(this.fieldFolders); if (result instanceof SdkAutoConstructMap) { return null; } return result; } public final void setFieldFolders(Map fieldFolders) { this.fieldFolders = FieldFolderMapCopier.copyFromBuilder(fieldFolders); } @Override public final Builder fieldFolders(Map fieldFolders) { this.fieldFolders = FieldFolderMapCopier.copy(fieldFolders); return this; } public final RowLevelPermissionDataSet.Builder getRowLevelPermissionDataSet() { return rowLevelPermissionDataSet != null ? rowLevelPermissionDataSet.toBuilder() : null; } public final void setRowLevelPermissionDataSet(RowLevelPermissionDataSet.BuilderImpl rowLevelPermissionDataSet) { this.rowLevelPermissionDataSet = rowLevelPermissionDataSet != null ? rowLevelPermissionDataSet.build() : null; } @Override public final Builder rowLevelPermissionDataSet(RowLevelPermissionDataSet rowLevelPermissionDataSet) { this.rowLevelPermissionDataSet = rowLevelPermissionDataSet; return this; } public final RowLevelPermissionTagConfiguration.Builder getRowLevelPermissionTagConfiguration() { return rowLevelPermissionTagConfiguration != null ? rowLevelPermissionTagConfiguration.toBuilder() : null; } public final void setRowLevelPermissionTagConfiguration( RowLevelPermissionTagConfiguration.BuilderImpl rowLevelPermissionTagConfiguration) { this.rowLevelPermissionTagConfiguration = rowLevelPermissionTagConfiguration != null ? rowLevelPermissionTagConfiguration .build() : null; } @Override public final Builder rowLevelPermissionTagConfiguration( RowLevelPermissionTagConfiguration rowLevelPermissionTagConfiguration) { this.rowLevelPermissionTagConfiguration = rowLevelPermissionTagConfiguration; return this; } public final List getColumnLevelPermissionRules() { List result = ColumnLevelPermissionRuleListCopier .copyToBuilder(this.columnLevelPermissionRules); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setColumnLevelPermissionRules( Collection columnLevelPermissionRules) { this.columnLevelPermissionRules = ColumnLevelPermissionRuleListCopier.copyFromBuilder(columnLevelPermissionRules); } @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 DataSetUsageConfiguration.Builder getDataSetUsageConfiguration() { return dataSetUsageConfiguration != null ? dataSetUsageConfiguration.toBuilder() : null; } public final void setDataSetUsageConfiguration(DataSetUsageConfiguration.BuilderImpl dataSetUsageConfiguration) { this.dataSetUsageConfiguration = dataSetUsageConfiguration != null ? dataSetUsageConfiguration.build() : null; } @Override public final Builder dataSetUsageConfiguration(DataSetUsageConfiguration dataSetUsageConfiguration) { this.dataSetUsageConfiguration = dataSetUsageConfiguration; return this; } @Override public DataSet build() { return new DataSet(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy