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

software.amazon.awssdk.services.iotsitewise.model.PutStorageConfigurationRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Io T Site Wise module holds the client classes that are used for communicating with Io T Site Wise.

The newest version!
/*
 * 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.iotsitewise.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
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 software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class PutStorageConfigurationRequest extends IoTSiteWiseRequest implements
        ToCopyableBuilder {
    private static final SdkField STORAGE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("storageType").getter(getter(PutStorageConfigurationRequest::storageTypeAsString))
            .setter(setter(Builder::storageType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("storageType").build()).build();

    private static final SdkField MULTI_LAYER_STORAGE_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("multiLayerStorage")
            .getter(getter(PutStorageConfigurationRequest::multiLayerStorage)).setter(setter(Builder::multiLayerStorage))
            .constructor(MultiLayerStorage::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("multiLayerStorage").build()).build();

    private static final SdkField DISASSOCIATED_DATA_STORAGE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("disassociatedDataStorage")
            .getter(getter(PutStorageConfigurationRequest::disassociatedDataStorageAsString))
            .setter(setter(Builder::disassociatedDataStorage))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("disassociatedDataStorage").build())
            .build();

    private static final SdkField RETENTION_PERIOD_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("retentionPeriod")
            .getter(getter(PutStorageConfigurationRequest::retentionPeriod)).setter(setter(Builder::retentionPeriod))
            .constructor(RetentionPeriod::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("retentionPeriod").build()).build();

    private static final SdkField WARM_TIER_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("warmTier").getter(getter(PutStorageConfigurationRequest::warmTierAsString))
            .setter(setter(Builder::warmTier))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("warmTier").build()).build();

    private static final SdkField WARM_TIER_RETENTION_PERIOD_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("warmTierRetentionPeriod")
            .getter(getter(PutStorageConfigurationRequest::warmTierRetentionPeriod))
            .setter(setter(Builder::warmTierRetentionPeriod)).constructor(WarmTierRetentionPeriod::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("warmTierRetentionPeriod").build())
            .build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STORAGE_TYPE_FIELD,
            MULTI_LAYER_STORAGE_FIELD, DISASSOCIATED_DATA_STORAGE_FIELD, RETENTION_PERIOD_FIELD, WARM_TIER_FIELD,
            WARM_TIER_RETENTION_PERIOD_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = Collections
            .unmodifiableMap(new HashMap>() {
                {
                    put("storageType", STORAGE_TYPE_FIELD);
                    put("multiLayerStorage", MULTI_LAYER_STORAGE_FIELD);
                    put("disassociatedDataStorage", DISASSOCIATED_DATA_STORAGE_FIELD);
                    put("retentionPeriod", RETENTION_PERIOD_FIELD);
                    put("warmTier", WARM_TIER_FIELD);
                    put("warmTierRetentionPeriod", WARM_TIER_RETENTION_PERIOD_FIELD);
                }
            });

    private final String storageType;

    private final MultiLayerStorage multiLayerStorage;

    private final String disassociatedDataStorage;

    private final RetentionPeriod retentionPeriod;

    private final String warmTier;

    private final WarmTierRetentionPeriod warmTierRetentionPeriod;

    private PutStorageConfigurationRequest(BuilderImpl builder) {
        super(builder);
        this.storageType = builder.storageType;
        this.multiLayerStorage = builder.multiLayerStorage;
        this.disassociatedDataStorage = builder.disassociatedDataStorage;
        this.retentionPeriod = builder.retentionPeriod;
        this.warmTier = builder.warmTier;
        this.warmTierRetentionPeriod = builder.warmTierRetentionPeriod;
    }

    /**
     * 

* The storage tier that you specified for your data. The storageType parameter can be one of the * following values: *

*
    *
  • *

    * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a * service-managed database. *

    *
  • *
  • *

    * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold * tier is a customer-managed Amazon S3 bucket. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #storageType} will * return {@link StorageType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #storageTypeAsString}. *

* * @return The storage tier that you specified for your data. The storageType parameter can be one of * the following values:

*
    *
  • *

    * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a * service-managed database. *

    *
  • *
  • *

    * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. * The cold tier is a customer-managed Amazon S3 bucket. *

    *
  • * @see StorageType */ public final StorageType storageType() { return StorageType.fromValue(storageType); } /** *

    * The storage tier that you specified for your data. The storageType parameter can be one of the * following values: *

    *
      *
    • *

      * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a * service-managed database. *

      *
    • *
    • *

      * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold * tier is a customer-managed Amazon S3 bucket. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #storageType} will * return {@link StorageType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #storageTypeAsString}. *

    * * @return The storage tier that you specified for your data. The storageType parameter can be one of * the following values:

    *
      *
    • *

      * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a * service-managed database. *

      *
    • *
    • *

      * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. * The cold tier is a customer-managed Amazon S3 bucket. *

      *
    • * @see StorageType */ public final String storageTypeAsString() { return storageType; } /** *

      * Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, you * must specify a MultiLayerStorage object. *

      * * @return Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, * you must specify a MultiLayerStorage object. */ public final MultiLayerStorage multiLayerStorage() { return multiLayerStorage; } /** *

      * Contains the storage configuration for time series (data streams) that aren't associated with asset properties. * The disassociatedDataStorage can be one of the following values: *

      *
        *
      • *

        * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

        * *

        * After the disassociatedDataStorage is enabled, you can't disable it. *

        *
      • *
      • *

        * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset * properties. *

        *
      • *
      *

      * For more information, see Data streams in the IoT * SiteWise User Guide. *

      *

      * If the service returns an enum value that is not available in the current SDK version, * {@link #disassociatedDataStorage} will return {@link DisassociatedDataStorageState#UNKNOWN_TO_SDK_VERSION}. The * raw value returned by the service is available from {@link #disassociatedDataStorageAsString}. *

      * * @return Contains the storage configuration for time series (data streams) that aren't associated with asset * properties. The disassociatedDataStorage can be one of the following values:

      *
        *
      • *

        * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

        * *

        * After the disassociatedDataStorage is enabled, you can't disable it. *

        *
      • *
      • *

        * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated * with asset properties. *

        *
      • *
      *

      * For more information, see Data streams in * the IoT SiteWise User Guide. * @see DisassociatedDataStorageState */ public final DisassociatedDataStorageState disassociatedDataStorage() { return DisassociatedDataStorageState.fromValue(disassociatedDataStorage); } /** *

      * Contains the storage configuration for time series (data streams) that aren't associated with asset properties. * The disassociatedDataStorage can be one of the following values: *

      *
        *
      • *

        * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

        * *

        * After the disassociatedDataStorage is enabled, you can't disable it. *

        *
      • *
      • *

        * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset * properties. *

        *
      • *
      *

      * For more information, see Data streams in the IoT * SiteWise User Guide. *

      *

      * If the service returns an enum value that is not available in the current SDK version, * {@link #disassociatedDataStorage} will return {@link DisassociatedDataStorageState#UNKNOWN_TO_SDK_VERSION}. The * raw value returned by the service is available from {@link #disassociatedDataStorageAsString}. *

      * * @return Contains the storage configuration for time series (data streams) that aren't associated with asset * properties. The disassociatedDataStorage can be one of the following values:

      *
        *
      • *

        * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

        * *

        * After the disassociatedDataStorage is enabled, you can't disable it. *

        *
      • *
      • *

        * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated * with asset properties. *

        *
      • *
      *

      * For more information, see Data streams in * the IoT SiteWise User Guide. * @see DisassociatedDataStorageState */ public final String disassociatedDataStorageAsString() { return disassociatedDataStorage; } /** * Returns the value of the RetentionPeriod property for this object. * * @return The value of the RetentionPeriod property for this object. */ public final RetentionPeriod retentionPeriod() { return retentionPeriod; } /** *

      * A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and * historical data ingested with the CreaeBulkImportJob API. *

      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #warmTier} will * return {@link WarmTierState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #warmTierAsString}. *

      * * @return A service managed storage tier optimized for analytical queries. It stores periodically uploaded, * buffered and historical data ingested with the CreaeBulkImportJob API. * @see WarmTierState */ public final WarmTierState warmTier() { return WarmTierState.fromValue(warmTier); } /** *

      * A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and * historical data ingested with the CreaeBulkImportJob API. *

      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #warmTier} will * return {@link WarmTierState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #warmTierAsString}. *

      * * @return A service managed storage tier optimized for analytical queries. It stores periodically uploaded, * buffered and historical data ingested with the CreaeBulkImportJob API. * @see WarmTierState */ public final String warmTierAsString() { return warmTier; } /** *

      * Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set this * only if cold tier is enabled. *

      * * @return Set this period to specify how long your data is stored in the warm tier before it is deleted. You can * set this only if cold tier is enabled. */ public final WarmTierRetentionPeriod warmTierRetentionPeriod() { return warmTierRetentionPeriod; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(storageTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(multiLayerStorage()); hashCode = 31 * hashCode + Objects.hashCode(disassociatedDataStorageAsString()); hashCode = 31 * hashCode + Objects.hashCode(retentionPeriod()); hashCode = 31 * hashCode + Objects.hashCode(warmTierAsString()); hashCode = 31 * hashCode + Objects.hashCode(warmTierRetentionPeriod()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PutStorageConfigurationRequest)) { return false; } PutStorageConfigurationRequest other = (PutStorageConfigurationRequest) obj; return Objects.equals(storageTypeAsString(), other.storageTypeAsString()) && Objects.equals(multiLayerStorage(), other.multiLayerStorage()) && Objects.equals(disassociatedDataStorageAsString(), other.disassociatedDataStorageAsString()) && Objects.equals(retentionPeriod(), other.retentionPeriod()) && Objects.equals(warmTierAsString(), other.warmTierAsString()) && Objects.equals(warmTierRetentionPeriod(), other.warmTierRetentionPeriod()); } /** * 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("PutStorageConfigurationRequest").add("StorageType", storageTypeAsString()) .add("MultiLayerStorage", multiLayerStorage()) .add("DisassociatedDataStorage", disassociatedDataStorageAsString()).add("RetentionPeriod", retentionPeriod()) .add("WarmTier", warmTierAsString()).add("WarmTierRetentionPeriod", warmTierRetentionPeriod()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "storageType": return Optional.ofNullable(clazz.cast(storageTypeAsString())); case "multiLayerStorage": return Optional.ofNullable(clazz.cast(multiLayerStorage())); case "disassociatedDataStorage": return Optional.ofNullable(clazz.cast(disassociatedDataStorageAsString())); case "retentionPeriod": return Optional.ofNullable(clazz.cast(retentionPeriod())); case "warmTier": return Optional.ofNullable(clazz.cast(warmTierAsString())); case "warmTierRetentionPeriod": return Optional.ofNullable(clazz.cast(warmTierRetentionPeriod())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((PutStorageConfigurationRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends IoTSiteWiseRequest.Builder, SdkPojo, CopyableBuilder { /** *

      * The storage tier that you specified for your data. The storageType parameter can be one of the * following values: *

      *
        *
      • *

        * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a * service-managed database. *

        *
      • *
      • *

        * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The * cold tier is a customer-managed Amazon S3 bucket. *

        *
      • *
      * * @param storageType * The storage tier that you specified for your data. The storageType parameter can be one * of the following values:

      *
        *
      • *

        * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier * is a service-managed database. *

        *
      • *
      • *

        * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot * tier. The cold tier is a customer-managed Amazon S3 bucket. *

        *
      • * @see StorageType * @return Returns a reference to this object so that method calls can be chained together. * @see StorageType */ Builder storageType(String storageType); /** *

        * The storage tier that you specified for your data. The storageType parameter can be one of the * following values: *

        *
          *
        • *

          * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a * service-managed database. *

          *
        • *
        • *

          * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The * cold tier is a customer-managed Amazon S3 bucket. *

          *
        • *
        * * @param storageType * The storage tier that you specified for your data. The storageType parameter can be one * of the following values:

        *
          *
        • *

          * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier * is a service-managed database. *

          *
        • *
        • *

          * MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot * tier. The cold tier is a customer-managed Amazon S3 bucket. *

          *
        • * @see StorageType * @return Returns a reference to this object so that method calls can be chained together. * @see StorageType */ Builder storageType(StorageType storageType); /** *

          * Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, you * must specify a MultiLayerStorage object. *

          * * @param multiLayerStorage * Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage * type, you must specify a MultiLayerStorage object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder multiLayerStorage(MultiLayerStorage multiLayerStorage); /** *

          * Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, you * must specify a MultiLayerStorage object. *

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

          * When the {@link Consumer} completes, {@link MultiLayerStorage.Builder#build()} is called immediately and its * result is passed to {@link #multiLayerStorage(MultiLayerStorage)}. * * @param multiLayerStorage * a consumer that will call methods on {@link MultiLayerStorage.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #multiLayerStorage(MultiLayerStorage) */ default Builder multiLayerStorage(Consumer multiLayerStorage) { return multiLayerStorage(MultiLayerStorage.builder().applyMutation(multiLayerStorage).build()); } /** *

          * Contains the storage configuration for time series (data streams) that aren't associated with asset * properties. The disassociatedDataStorage can be one of the following values: *

          *
            *
          • *

            * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

            * *

            * After the disassociatedDataStorage is enabled, you can't disable it. *

            *
          • *
          • *

            * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with * asset properties. *

            *
          • *
          *

          * For more information, see Data streams in the * IoT SiteWise User Guide. *

          * * @param disassociatedDataStorage * Contains the storage configuration for time series (data streams) that aren't associated with asset * properties. The disassociatedDataStorage can be one of the following values:

          *
            *
          • *

            * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

            * *

            * After the disassociatedDataStorage is enabled, you can't disable it. *

            *
          • *
          • *

            * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated * with asset properties. *

            *
          • *
          *

          * For more information, see Data streams in * the IoT SiteWise User Guide. * @see DisassociatedDataStorageState * @return Returns a reference to this object so that method calls can be chained together. * @see DisassociatedDataStorageState */ Builder disassociatedDataStorage(String disassociatedDataStorage); /** *

          * Contains the storage configuration for time series (data streams) that aren't associated with asset * properties. The disassociatedDataStorage can be one of the following values: *

          *
            *
          • *

            * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

            * *

            * After the disassociatedDataStorage is enabled, you can't disable it. *

            *
          • *
          • *

            * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with * asset properties. *

            *
          • *
          *

          * For more information, see Data streams in the * IoT SiteWise User Guide. *

          * * @param disassociatedDataStorage * Contains the storage configuration for time series (data streams) that aren't associated with asset * properties. The disassociatedDataStorage can be one of the following values:

          *
            *
          • *

            * ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties. *

            * *

            * After the disassociatedDataStorage is enabled, you can't disable it. *

            *
          • *
          • *

            * DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated * with asset properties. *

            *
          • *
          *

          * For more information, see Data streams in * the IoT SiteWise User Guide. * @see DisassociatedDataStorageState * @return Returns a reference to this object so that method calls can be chained together. * @see DisassociatedDataStorageState */ Builder disassociatedDataStorage(DisassociatedDataStorageState disassociatedDataStorage); /** * Sets the value of the RetentionPeriod property for this object. * * @param retentionPeriod * The new value for the RetentionPeriod property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder retentionPeriod(RetentionPeriod retentionPeriod); /** * Sets the value of the RetentionPeriod property for this object. * * This is a convenience method that creates an instance of the {@link RetentionPeriod.Builder} avoiding the * need to create one manually via {@link RetentionPeriod#builder()}. * *

          * When the {@link Consumer} completes, {@link RetentionPeriod.Builder#build()} is called immediately and its * result is passed to {@link #retentionPeriod(RetentionPeriod)}. * * @param retentionPeriod * a consumer that will call methods on {@link RetentionPeriod.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #retentionPeriod(RetentionPeriod) */ default Builder retentionPeriod(Consumer retentionPeriod) { return retentionPeriod(RetentionPeriod.builder().applyMutation(retentionPeriod).build()); } /** *

          * A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered * and historical data ingested with the CreaeBulkImportJob API. *

          * * @param warmTier * A service managed storage tier optimized for analytical queries. It stores periodically uploaded, * buffered and historical data ingested with the CreaeBulkImportJob API. * @see WarmTierState * @return Returns a reference to this object so that method calls can be chained together. * @see WarmTierState */ Builder warmTier(String warmTier); /** *

          * A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered * and historical data ingested with the CreaeBulkImportJob API. *

          * * @param warmTier * A service managed storage tier optimized for analytical queries. It stores periodically uploaded, * buffered and historical data ingested with the CreaeBulkImportJob API. * @see WarmTierState * @return Returns a reference to this object so that method calls can be chained together. * @see WarmTierState */ Builder warmTier(WarmTierState warmTier); /** *

          * Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set * this only if cold tier is enabled. *

          * * @param warmTierRetentionPeriod * Set this period to specify how long your data is stored in the warm tier before it is deleted. You can * set this only if cold tier is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ Builder warmTierRetentionPeriod(WarmTierRetentionPeriod warmTierRetentionPeriod); /** *

          * Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set * this only if cold tier is enabled. *

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

          * When the {@link Consumer} completes, {@link WarmTierRetentionPeriod.Builder#build()} is called immediately * and its result is passed to {@link #warmTierRetentionPeriod(WarmTierRetentionPeriod)}. * * @param warmTierRetentionPeriod * a consumer that will call methods on {@link WarmTierRetentionPeriod.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #warmTierRetentionPeriod(WarmTierRetentionPeriod) */ default Builder warmTierRetentionPeriod(Consumer warmTierRetentionPeriod) { return warmTierRetentionPeriod(WarmTierRetentionPeriod.builder().applyMutation(warmTierRetentionPeriod).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends IoTSiteWiseRequest.BuilderImpl implements Builder { private String storageType; private MultiLayerStorage multiLayerStorage; private String disassociatedDataStorage; private RetentionPeriod retentionPeriod; private String warmTier; private WarmTierRetentionPeriod warmTierRetentionPeriod; private BuilderImpl() { } private BuilderImpl(PutStorageConfigurationRequest model) { super(model); storageType(model.storageType); multiLayerStorage(model.multiLayerStorage); disassociatedDataStorage(model.disassociatedDataStorage); retentionPeriod(model.retentionPeriod); warmTier(model.warmTier); warmTierRetentionPeriod(model.warmTierRetentionPeriod); } public final String getStorageType() { return storageType; } public final void setStorageType(String storageType) { this.storageType = storageType; } @Override public final Builder storageType(String storageType) { this.storageType = storageType; return this; } @Override public final Builder storageType(StorageType storageType) { this.storageType(storageType == null ? null : storageType.toString()); return this; } public final MultiLayerStorage.Builder getMultiLayerStorage() { return multiLayerStorage != null ? multiLayerStorage.toBuilder() : null; } public final void setMultiLayerStorage(MultiLayerStorage.BuilderImpl multiLayerStorage) { this.multiLayerStorage = multiLayerStorage != null ? multiLayerStorage.build() : null; } @Override public final Builder multiLayerStorage(MultiLayerStorage multiLayerStorage) { this.multiLayerStorage = multiLayerStorage; return this; } public final String getDisassociatedDataStorage() { return disassociatedDataStorage; } public final void setDisassociatedDataStorage(String disassociatedDataStorage) { this.disassociatedDataStorage = disassociatedDataStorage; } @Override public final Builder disassociatedDataStorage(String disassociatedDataStorage) { this.disassociatedDataStorage = disassociatedDataStorage; return this; } @Override public final Builder disassociatedDataStorage(DisassociatedDataStorageState disassociatedDataStorage) { this.disassociatedDataStorage(disassociatedDataStorage == null ? null : disassociatedDataStorage.toString()); return this; } public final RetentionPeriod.Builder getRetentionPeriod() { return retentionPeriod != null ? retentionPeriod.toBuilder() : null; } public final void setRetentionPeriod(RetentionPeriod.BuilderImpl retentionPeriod) { this.retentionPeriod = retentionPeriod != null ? retentionPeriod.build() : null; } @Override public final Builder retentionPeriod(RetentionPeriod retentionPeriod) { this.retentionPeriod = retentionPeriod; return this; } public final String getWarmTier() { return warmTier; } public final void setWarmTier(String warmTier) { this.warmTier = warmTier; } @Override public final Builder warmTier(String warmTier) { this.warmTier = warmTier; return this; } @Override public final Builder warmTier(WarmTierState warmTier) { this.warmTier(warmTier == null ? null : warmTier.toString()); return this; } public final WarmTierRetentionPeriod.Builder getWarmTierRetentionPeriod() { return warmTierRetentionPeriod != null ? warmTierRetentionPeriod.toBuilder() : null; } public final void setWarmTierRetentionPeriod(WarmTierRetentionPeriod.BuilderImpl warmTierRetentionPeriod) { this.warmTierRetentionPeriod = warmTierRetentionPeriod != null ? warmTierRetentionPeriod.build() : null; } @Override public final Builder warmTierRetentionPeriod(WarmTierRetentionPeriod warmTierRetentionPeriod) { this.warmTierRetentionPeriod = warmTierRetentionPeriod; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public PutStorageConfigurationRequest build() { return new PutStorageConfigurationRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy