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

software.amazon.awssdk.services.firehose.model.ExtendedS3DestinationUpdate Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Kinesis Firehose module holds the client classes that are used for communicating with Amazon Kinesis Firehose Service

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.firehose.model;

import java.io.Serializable;
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.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;

/**
 * 

* Describes an update for a destination in Amazon S3. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ExtendedS3DestinationUpdate implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RoleARN").getter(getter(ExtendedS3DestinationUpdate::roleARN)).setter(setter(Builder::roleARN)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleARN").build()).build(); private static final SdkField BUCKET_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("BucketARN").getter(getter(ExtendedS3DestinationUpdate::bucketARN)).setter(setter(Builder::bucketARN)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BucketARN").build()).build(); private static final SdkField PREFIX_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Prefix") .getter(getter(ExtendedS3DestinationUpdate::prefix)).setter(setter(Builder::prefix)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Prefix").build()).build(); private static final SdkField ERROR_OUTPUT_PREFIX_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ErrorOutputPrefix").getter(getter(ExtendedS3DestinationUpdate::errorOutputPrefix)) .setter(setter(Builder::errorOutputPrefix)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ErrorOutputPrefix").build()).build(); private static final SdkField BUFFERING_HINTS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("BufferingHints") .getter(getter(ExtendedS3DestinationUpdate::bufferingHints)).setter(setter(Builder::bufferingHints)) .constructor(BufferingHints::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BufferingHints").build()).build(); private static final SdkField COMPRESSION_FORMAT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CompressionFormat").getter(getter(ExtendedS3DestinationUpdate::compressionFormatAsString)) .setter(setter(Builder::compressionFormat)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompressionFormat").build()).build(); private static final SdkField ENCRYPTION_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("EncryptionConfiguration") .getter(getter(ExtendedS3DestinationUpdate::encryptionConfiguration)) .setter(setter(Builder::encryptionConfiguration)).constructor(EncryptionConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EncryptionConfiguration").build()) .build(); private static final SdkField CLOUD_WATCH_LOGGING_OPTIONS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("CloudWatchLoggingOptions") .getter(getter(ExtendedS3DestinationUpdate::cloudWatchLoggingOptions)) .setter(setter(Builder::cloudWatchLoggingOptions)).constructor(CloudWatchLoggingOptions::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CloudWatchLoggingOptions").build()) .build(); private static final SdkField PROCESSING_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ProcessingConfiguration") .getter(getter(ExtendedS3DestinationUpdate::processingConfiguration)) .setter(setter(Builder::processingConfiguration)).constructor(ProcessingConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingConfiguration").build()) .build(); private static final SdkField S3_BACKUP_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("S3BackupMode").getter(getter(ExtendedS3DestinationUpdate::s3BackupModeAsString)) .setter(setter(Builder::s3BackupMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3BackupMode").build()).build(); private static final SdkField S3_BACKUP_UPDATE_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("S3BackupUpdate") .getter(getter(ExtendedS3DestinationUpdate::s3BackupUpdate)).setter(setter(Builder::s3BackupUpdate)) .constructor(S3DestinationUpdate::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3BackupUpdate").build()).build(); private static final SdkField DATA_FORMAT_CONVERSION_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("DataFormatConversionConfiguration") .getter(getter(ExtendedS3DestinationUpdate::dataFormatConversionConfiguration)) .setter(setter(Builder::dataFormatConversionConfiguration)) .constructor(DataFormatConversionConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataFormatConversionConfiguration") .build()).build(); private static final SdkField DYNAMIC_PARTITIONING_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("DynamicPartitioningConfiguration") .getter(getter(ExtendedS3DestinationUpdate::dynamicPartitioningConfiguration)) .setter(setter(Builder::dynamicPartitioningConfiguration)) .constructor(DynamicPartitioningConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DynamicPartitioningConfiguration") .build()).build(); private static final SdkField FILE_EXTENSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FileExtension").getter(getter(ExtendedS3DestinationUpdate::fileExtension)) .setter(setter(Builder::fileExtension)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileExtension").build()).build(); private static final SdkField CUSTOM_TIME_ZONE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CustomTimeZone").getter(getter(ExtendedS3DestinationUpdate::customTimeZone)) .setter(setter(Builder::customTimeZone)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomTimeZone").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ROLE_ARN_FIELD, BUCKET_ARN_FIELD, PREFIX_FIELD, ERROR_OUTPUT_PREFIX_FIELD, BUFFERING_HINTS_FIELD, COMPRESSION_FORMAT_FIELD, ENCRYPTION_CONFIGURATION_FIELD, CLOUD_WATCH_LOGGING_OPTIONS_FIELD, PROCESSING_CONFIGURATION_FIELD, S3_BACKUP_MODE_FIELD, S3_BACKUP_UPDATE_FIELD, DATA_FORMAT_CONVERSION_CONFIGURATION_FIELD, DYNAMIC_PARTITIONING_CONFIGURATION_FIELD, FILE_EXTENSION_FIELD, CUSTOM_TIME_ZONE_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String roleARN; private final String bucketARN; private final String prefix; private final String errorOutputPrefix; private final BufferingHints bufferingHints; private final String compressionFormat; private final EncryptionConfiguration encryptionConfiguration; private final CloudWatchLoggingOptions cloudWatchLoggingOptions; private final ProcessingConfiguration processingConfiguration; private final String s3BackupMode; private final S3DestinationUpdate s3BackupUpdate; private final DataFormatConversionConfiguration dataFormatConversionConfiguration; private final DynamicPartitioningConfiguration dynamicPartitioningConfiguration; private final String fileExtension; private final String customTimeZone; private ExtendedS3DestinationUpdate(BuilderImpl builder) { this.roleARN = builder.roleARN; this.bucketARN = builder.bucketARN; this.prefix = builder.prefix; this.errorOutputPrefix = builder.errorOutputPrefix; this.bufferingHints = builder.bufferingHints; this.compressionFormat = builder.compressionFormat; this.encryptionConfiguration = builder.encryptionConfiguration; this.cloudWatchLoggingOptions = builder.cloudWatchLoggingOptions; this.processingConfiguration = builder.processingConfiguration; this.s3BackupMode = builder.s3BackupMode; this.s3BackupUpdate = builder.s3BackupUpdate; this.dataFormatConversionConfiguration = builder.dataFormatConversionConfiguration; this.dynamicPartitioningConfiguration = builder.dynamicPartitioningConfiguration; this.fileExtension = builder.fileExtension; this.customTimeZone = builder.customTimeZone; } /** *

* The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) * and Amazon Web Services Service Namespaces. *

* * @return The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names * (ARNs) and Amazon Web Services Service Namespaces. */ public final String roleARN() { return roleARN; } /** *

* The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) * and Amazon Web Services Service Namespaces. *

* * @return The ARN of the S3 bucket. For more information, see Amazon Resource Names * (ARNs) and Amazon Web Services Service Namespaces. */ public final String bucketARN() { return bucketARN; } /** *

* The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify * a custom prefix, as described in Custom Prefixes for Amazon S3 * Objects. *

* * @return The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also * specify a custom prefix, as described in Custom Prefixes for Amazon S3 * Objects. */ public final String prefix() { return prefix; } /** *

* A prefix that Firehose evaluates and adds to failed records before writing them to S3. This prefix appears * immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 * Objects. *

* * @return A prefix that Firehose evaluates and adds to failed records before writing them to S3. This prefix * appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 * Objects. */ public final String errorOutputPrefix() { return errorOutputPrefix; } /** *

* The buffering option. *

* * @return The buffering option. */ public final BufferingHints bufferingHints() { return bufferingHints; } /** *

* The compression format. If no value is specified, the default is UNCOMPRESSED. *

*

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

* * @return The compression format. If no value is specified, the default is UNCOMPRESSED. * @see CompressionFormat */ public final CompressionFormat compressionFormat() { return CompressionFormat.fromValue(compressionFormat); } /** *

* The compression format. If no value is specified, the default is UNCOMPRESSED. *

*

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

* * @return The compression format. If no value is specified, the default is UNCOMPRESSED. * @see CompressionFormat */ public final String compressionFormatAsString() { return compressionFormat; } /** *

* The encryption configuration. If no value is specified, the default is no encryption. *

* * @return The encryption configuration. If no value is specified, the default is no encryption. */ public final EncryptionConfiguration encryptionConfiguration() { return encryptionConfiguration; } /** *

* The Amazon CloudWatch logging options for your Firehose stream. *

* * @return The Amazon CloudWatch logging options for your Firehose stream. */ public final CloudWatchLoggingOptions cloudWatchLoggingOptions() { return cloudWatchLoggingOptions; } /** *

* The data processing configuration. *

* * @return The data processing configuration. */ public final ProcessingConfiguration processingConfiguration() { return processingConfiguration; } /** *

* You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you can't * update the Firehose stream to disable it. *

*

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

* * @return You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you * can't update the Firehose stream to disable it. * @see S3BackupMode */ public final S3BackupMode s3BackupMode() { return S3BackupMode.fromValue(s3BackupMode); } /** *

* You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you can't * update the Firehose stream to disable it. *

*

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

* * @return You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you * can't update the Firehose stream to disable it. * @see S3BackupMode */ public final String s3BackupModeAsString() { return s3BackupMode; } /** *

* The Amazon S3 destination for backup. *

* * @return The Amazon S3 destination for backup. */ public final S3DestinationUpdate s3BackupUpdate() { return s3BackupUpdate; } /** *

* The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC format * before writing it to Amazon S3. *

* * @return The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC * format before writing it to Amazon S3. */ public final DataFormatConversionConfiguration dataFormatConversionConfiguration() { return dataFormatConversionConfiguration; } /** *

* The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming data by * partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon S3 * destinations. *

* * @return The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming * data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for * Amazon S3 destinations. */ public final DynamicPartitioningConfiguration dynamicPartitioningConfiguration() { return dynamicPartitioningConfiguration; } /** *

* Specify a file extension. It will override the default file extension *

* * @return Specify a file extension. It will override the default file extension */ public final String fileExtension() { return fileExtension; } /** *

* The time zone you prefer. UTC is the default. *

* * @return The time zone you prefer. UTC is the default. */ public final String customTimeZone() { return customTimeZone; } @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(roleARN()); hashCode = 31 * hashCode + Objects.hashCode(bucketARN()); hashCode = 31 * hashCode + Objects.hashCode(prefix()); hashCode = 31 * hashCode + Objects.hashCode(errorOutputPrefix()); hashCode = 31 * hashCode + Objects.hashCode(bufferingHints()); hashCode = 31 * hashCode + Objects.hashCode(compressionFormatAsString()); hashCode = 31 * hashCode + Objects.hashCode(encryptionConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(cloudWatchLoggingOptions()); hashCode = 31 * hashCode + Objects.hashCode(processingConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(s3BackupModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(s3BackupUpdate()); hashCode = 31 * hashCode + Objects.hashCode(dataFormatConversionConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(dynamicPartitioningConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(fileExtension()); hashCode = 31 * hashCode + Objects.hashCode(customTimeZone()); 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 ExtendedS3DestinationUpdate)) { return false; } ExtendedS3DestinationUpdate other = (ExtendedS3DestinationUpdate) obj; return Objects.equals(roleARN(), other.roleARN()) && Objects.equals(bucketARN(), other.bucketARN()) && Objects.equals(prefix(), other.prefix()) && Objects.equals(errorOutputPrefix(), other.errorOutputPrefix()) && Objects.equals(bufferingHints(), other.bufferingHints()) && Objects.equals(compressionFormatAsString(), other.compressionFormatAsString()) && Objects.equals(encryptionConfiguration(), other.encryptionConfiguration()) && Objects.equals(cloudWatchLoggingOptions(), other.cloudWatchLoggingOptions()) && Objects.equals(processingConfiguration(), other.processingConfiguration()) && Objects.equals(s3BackupModeAsString(), other.s3BackupModeAsString()) && Objects.equals(s3BackupUpdate(), other.s3BackupUpdate()) && Objects.equals(dataFormatConversionConfiguration(), other.dataFormatConversionConfiguration()) && Objects.equals(dynamicPartitioningConfiguration(), other.dynamicPartitioningConfiguration()) && Objects.equals(fileExtension(), other.fileExtension()) && Objects.equals(customTimeZone(), other.customTimeZone()); } /** * 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("ExtendedS3DestinationUpdate").add("RoleARN", roleARN()).add("BucketARN", bucketARN()) .add("Prefix", prefix()).add("ErrorOutputPrefix", errorOutputPrefix()).add("BufferingHints", bufferingHints()) .add("CompressionFormat", compressionFormatAsString()).add("EncryptionConfiguration", encryptionConfiguration()) .add("CloudWatchLoggingOptions", cloudWatchLoggingOptions()) .add("ProcessingConfiguration", processingConfiguration()).add("S3BackupMode", s3BackupModeAsString()) .add("S3BackupUpdate", s3BackupUpdate()) .add("DataFormatConversionConfiguration", dataFormatConversionConfiguration()) .add("DynamicPartitioningConfiguration", dynamicPartitioningConfiguration()) .add("FileExtension", fileExtension()).add("CustomTimeZone", customTimeZone()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "RoleARN": return Optional.ofNullable(clazz.cast(roleARN())); case "BucketARN": return Optional.ofNullable(clazz.cast(bucketARN())); case "Prefix": return Optional.ofNullable(clazz.cast(prefix())); case "ErrorOutputPrefix": return Optional.ofNullable(clazz.cast(errorOutputPrefix())); case "BufferingHints": return Optional.ofNullable(clazz.cast(bufferingHints())); case "CompressionFormat": return Optional.ofNullable(clazz.cast(compressionFormatAsString())); case "EncryptionConfiguration": return Optional.ofNullable(clazz.cast(encryptionConfiguration())); case "CloudWatchLoggingOptions": return Optional.ofNullable(clazz.cast(cloudWatchLoggingOptions())); case "ProcessingConfiguration": return Optional.ofNullable(clazz.cast(processingConfiguration())); case "S3BackupMode": return Optional.ofNullable(clazz.cast(s3BackupModeAsString())); case "S3BackupUpdate": return Optional.ofNullable(clazz.cast(s3BackupUpdate())); case "DataFormatConversionConfiguration": return Optional.ofNullable(clazz.cast(dataFormatConversionConfiguration())); case "DynamicPartitioningConfiguration": return Optional.ofNullable(clazz.cast(dynamicPartitioningConfiguration())); case "FileExtension": return Optional.ofNullable(clazz.cast(fileExtension())); case "CustomTimeZone": return Optional.ofNullable(clazz.cast(customTimeZone())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("RoleARN", ROLE_ARN_FIELD); map.put("BucketARN", BUCKET_ARN_FIELD); map.put("Prefix", PREFIX_FIELD); map.put("ErrorOutputPrefix", ERROR_OUTPUT_PREFIX_FIELD); map.put("BufferingHints", BUFFERING_HINTS_FIELD); map.put("CompressionFormat", COMPRESSION_FORMAT_FIELD); map.put("EncryptionConfiguration", ENCRYPTION_CONFIGURATION_FIELD); map.put("CloudWatchLoggingOptions", CLOUD_WATCH_LOGGING_OPTIONS_FIELD); map.put("ProcessingConfiguration", PROCESSING_CONFIGURATION_FIELD); map.put("S3BackupMode", S3_BACKUP_MODE_FIELD); map.put("S3BackupUpdate", S3_BACKUP_UPDATE_FIELD); map.put("DataFormatConversionConfiguration", DATA_FORMAT_CONVERSION_CONFIGURATION_FIELD); map.put("DynamicPartitioningConfiguration", DYNAMIC_PARTITIONING_CONFIGURATION_FIELD); map.put("FileExtension", FILE_EXTENSION_FIELD); map.put("CustomTimeZone", CUSTOM_TIME_ZONE_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((ExtendedS3DestinationUpdate) 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 Amazon Web Services credentials. For more information, see Amazon Resource Names * (ARNs) and Amazon Web Services Service Namespaces. *

* * @param roleARN * The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource * Names (ARNs) and Amazon Web Services Service Namespaces. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleARN(String roleARN); /** *

* The ARN of the S3 bucket. For more information, see Amazon Resource Names * (ARNs) and Amazon Web Services Service Namespaces. *

* * @param bucketARN * The ARN of the S3 bucket. For more information, see Amazon Resource * Names (ARNs) and Amazon Web Services Service Namespaces. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bucketARN(String bucketARN); /** *

* The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also * specify a custom prefix, as described in Custom Prefixes for Amazon S3 * Objects. *

* * @param prefix * The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can * also specify a custom prefix, as described in Custom Prefixes for Amazon S3 * Objects. * @return Returns a reference to this object so that method calls can be chained together. */ Builder prefix(String prefix); /** *

* A prefix that Firehose evaluates and adds to failed records before writing them to S3. This prefix appears * immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 * Objects. *

* * @param errorOutputPrefix * A prefix that Firehose evaluates and adds to failed records before writing them to S3. This prefix * appears immediately following the bucket name. For information about how to specify this prefix, see * Custom Prefixes for Amazon * S3 Objects. * @return Returns a reference to this object so that method calls can be chained together. */ Builder errorOutputPrefix(String errorOutputPrefix); /** *

* The buffering option. *

* * @param bufferingHints * The buffering option. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bufferingHints(BufferingHints bufferingHints); /** *

* The buffering option. *

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

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

* The compression format. If no value is specified, the default is UNCOMPRESSED. *

* * @param compressionFormat * The compression format. If no value is specified, the default is UNCOMPRESSED. * @see CompressionFormat * @return Returns a reference to this object so that method calls can be chained together. * @see CompressionFormat */ Builder compressionFormat(String compressionFormat); /** *

* The compression format. If no value is specified, the default is UNCOMPRESSED. *

* * @param compressionFormat * The compression format. If no value is specified, the default is UNCOMPRESSED. * @see CompressionFormat * @return Returns a reference to this object so that method calls can be chained together. * @see CompressionFormat */ Builder compressionFormat(CompressionFormat compressionFormat); /** *

* The encryption configuration. If no value is specified, the default is no encryption. *

* * @param encryptionConfiguration * The encryption configuration. If no value is specified, the default is no encryption. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionConfiguration(EncryptionConfiguration encryptionConfiguration); /** *

* The encryption configuration. If no value is specified, the default is no encryption. *

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

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

* The Amazon CloudWatch logging options for your Firehose stream. *

* * @param cloudWatchLoggingOptions * The Amazon CloudWatch logging options for your Firehose stream. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cloudWatchLoggingOptions(CloudWatchLoggingOptions cloudWatchLoggingOptions); /** *

* The Amazon CloudWatch logging options for your Firehose stream. *

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

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

* The data processing configuration. *

* * @param processingConfiguration * The data processing configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingConfiguration(ProcessingConfiguration processingConfiguration); /** *

* The data processing configuration. *

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

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

* You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you * can't update the Firehose stream to disable it. *

* * @param s3BackupMode * You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, * you can't update the Firehose stream to disable it. * @see S3BackupMode * @return Returns a reference to this object so that method calls can be chained together. * @see S3BackupMode */ Builder s3BackupMode(String s3BackupMode); /** *

* You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you * can't update the Firehose stream to disable it. *

* * @param s3BackupMode * You can update a Firehose stream to enable Amazon S3 backup if it is disabled. If backup is enabled, * you can't update the Firehose stream to disable it. * @see S3BackupMode * @return Returns a reference to this object so that method calls can be chained together. * @see S3BackupMode */ Builder s3BackupMode(S3BackupMode s3BackupMode); /** *

* The Amazon S3 destination for backup. *

* * @param s3BackupUpdate * The Amazon S3 destination for backup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder s3BackupUpdate(S3DestinationUpdate s3BackupUpdate); /** *

* The Amazon S3 destination for backup. *

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

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

* The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC * format before writing it to Amazon S3. *

* * @param dataFormatConversionConfiguration * The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or * ORC format before writing it to Amazon S3. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dataFormatConversionConfiguration(DataFormatConversionConfiguration dataFormatConversionConfiguration); /** *

* The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC * format before writing it to Amazon S3. *

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

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

* The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming * data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon * S3 destinations. *

* * @param dynamicPartitioningConfiguration * The configuration of the dynamic partitioning mechanism that creates smaller data sets from the * streaming data by partitioning it based on partition keys. Currently, dynamic partitioning is only * supported for Amazon S3 destinations. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dynamicPartitioningConfiguration(DynamicPartitioningConfiguration dynamicPartitioningConfiguration); /** *

* The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming * data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon * S3 destinations. *

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

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

* Specify a file extension. It will override the default file extension *

* * @param fileExtension * Specify a file extension. It will override the default file extension * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileExtension(String fileExtension); /** *

* The time zone you prefer. UTC is the default. *

* * @param customTimeZone * The time zone you prefer. UTC is the default. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customTimeZone(String customTimeZone); } static final class BuilderImpl implements Builder { private String roleARN; private String bucketARN; private String prefix; private String errorOutputPrefix; private BufferingHints bufferingHints; private String compressionFormat; private EncryptionConfiguration encryptionConfiguration; private CloudWatchLoggingOptions cloudWatchLoggingOptions; private ProcessingConfiguration processingConfiguration; private String s3BackupMode; private S3DestinationUpdate s3BackupUpdate; private DataFormatConversionConfiguration dataFormatConversionConfiguration; private DynamicPartitioningConfiguration dynamicPartitioningConfiguration; private String fileExtension; private String customTimeZone; private BuilderImpl() { } private BuilderImpl(ExtendedS3DestinationUpdate model) { roleARN(model.roleARN); bucketARN(model.bucketARN); prefix(model.prefix); errorOutputPrefix(model.errorOutputPrefix); bufferingHints(model.bufferingHints); compressionFormat(model.compressionFormat); encryptionConfiguration(model.encryptionConfiguration); cloudWatchLoggingOptions(model.cloudWatchLoggingOptions); processingConfiguration(model.processingConfiguration); s3BackupMode(model.s3BackupMode); s3BackupUpdate(model.s3BackupUpdate); dataFormatConversionConfiguration(model.dataFormatConversionConfiguration); dynamicPartitioningConfiguration(model.dynamicPartitioningConfiguration); fileExtension(model.fileExtension); customTimeZone(model.customTimeZone); } public final String getRoleARN() { return roleARN; } public final void setRoleARN(String roleARN) { this.roleARN = roleARN; } @Override public final Builder roleARN(String roleARN) { this.roleARN = roleARN; return this; } public final String getBucketARN() { return bucketARN; } public final void setBucketARN(String bucketARN) { this.bucketARN = bucketARN; } @Override public final Builder bucketARN(String bucketARN) { this.bucketARN = bucketARN; return this; } public final String getPrefix() { return prefix; } public final void setPrefix(String prefix) { this.prefix = prefix; } @Override public final Builder prefix(String prefix) { this.prefix = prefix; return this; } public final String getErrorOutputPrefix() { return errorOutputPrefix; } public final void setErrorOutputPrefix(String errorOutputPrefix) { this.errorOutputPrefix = errorOutputPrefix; } @Override public final Builder errorOutputPrefix(String errorOutputPrefix) { this.errorOutputPrefix = errorOutputPrefix; return this; } public final BufferingHints.Builder getBufferingHints() { return bufferingHints != null ? bufferingHints.toBuilder() : null; } public final void setBufferingHints(BufferingHints.BuilderImpl bufferingHints) { this.bufferingHints = bufferingHints != null ? bufferingHints.build() : null; } @Override public final Builder bufferingHints(BufferingHints bufferingHints) { this.bufferingHints = bufferingHints; return this; } public final String getCompressionFormat() { return compressionFormat; } public final void setCompressionFormat(String compressionFormat) { this.compressionFormat = compressionFormat; } @Override public final Builder compressionFormat(String compressionFormat) { this.compressionFormat = compressionFormat; return this; } @Override public final Builder compressionFormat(CompressionFormat compressionFormat) { this.compressionFormat(compressionFormat == null ? null : compressionFormat.toString()); return this; } public final EncryptionConfiguration.Builder getEncryptionConfiguration() { return encryptionConfiguration != null ? encryptionConfiguration.toBuilder() : null; } public final void setEncryptionConfiguration(EncryptionConfiguration.BuilderImpl encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration != null ? encryptionConfiguration.build() : null; } @Override public final Builder encryptionConfiguration(EncryptionConfiguration encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration; return this; } public final CloudWatchLoggingOptions.Builder getCloudWatchLoggingOptions() { return cloudWatchLoggingOptions != null ? cloudWatchLoggingOptions.toBuilder() : null; } public final void setCloudWatchLoggingOptions(CloudWatchLoggingOptions.BuilderImpl cloudWatchLoggingOptions) { this.cloudWatchLoggingOptions = cloudWatchLoggingOptions != null ? cloudWatchLoggingOptions.build() : null; } @Override public final Builder cloudWatchLoggingOptions(CloudWatchLoggingOptions cloudWatchLoggingOptions) { this.cloudWatchLoggingOptions = cloudWatchLoggingOptions; return this; } public final ProcessingConfiguration.Builder getProcessingConfiguration() { return processingConfiguration != null ? processingConfiguration.toBuilder() : null; } public final void setProcessingConfiguration(ProcessingConfiguration.BuilderImpl processingConfiguration) { this.processingConfiguration = processingConfiguration != null ? processingConfiguration.build() : null; } @Override public final Builder processingConfiguration(ProcessingConfiguration processingConfiguration) { this.processingConfiguration = processingConfiguration; return this; } public final String getS3BackupMode() { return s3BackupMode; } public final void setS3BackupMode(String s3BackupMode) { this.s3BackupMode = s3BackupMode; } @Override public final Builder s3BackupMode(String s3BackupMode) { this.s3BackupMode = s3BackupMode; return this; } @Override public final Builder s3BackupMode(S3BackupMode s3BackupMode) { this.s3BackupMode(s3BackupMode == null ? null : s3BackupMode.toString()); return this; } public final S3DestinationUpdate.Builder getS3BackupUpdate() { return s3BackupUpdate != null ? s3BackupUpdate.toBuilder() : null; } public final void setS3BackupUpdate(S3DestinationUpdate.BuilderImpl s3BackupUpdate) { this.s3BackupUpdate = s3BackupUpdate != null ? s3BackupUpdate.build() : null; } @Override public final Builder s3BackupUpdate(S3DestinationUpdate s3BackupUpdate) { this.s3BackupUpdate = s3BackupUpdate; return this; } public final DataFormatConversionConfiguration.Builder getDataFormatConversionConfiguration() { return dataFormatConversionConfiguration != null ? dataFormatConversionConfiguration.toBuilder() : null; } public final void setDataFormatConversionConfiguration( DataFormatConversionConfiguration.BuilderImpl dataFormatConversionConfiguration) { this.dataFormatConversionConfiguration = dataFormatConversionConfiguration != null ? dataFormatConversionConfiguration .build() : null; } @Override public final Builder dataFormatConversionConfiguration(DataFormatConversionConfiguration dataFormatConversionConfiguration) { this.dataFormatConversionConfiguration = dataFormatConversionConfiguration; return this; } public final DynamicPartitioningConfiguration.Builder getDynamicPartitioningConfiguration() { return dynamicPartitioningConfiguration != null ? dynamicPartitioningConfiguration.toBuilder() : null; } public final void setDynamicPartitioningConfiguration( DynamicPartitioningConfiguration.BuilderImpl dynamicPartitioningConfiguration) { this.dynamicPartitioningConfiguration = dynamicPartitioningConfiguration != null ? dynamicPartitioningConfiguration .build() : null; } @Override public final Builder dynamicPartitioningConfiguration(DynamicPartitioningConfiguration dynamicPartitioningConfiguration) { this.dynamicPartitioningConfiguration = dynamicPartitioningConfiguration; return this; } public final String getFileExtension() { return fileExtension; } public final void setFileExtension(String fileExtension) { this.fileExtension = fileExtension; } @Override public final Builder fileExtension(String fileExtension) { this.fileExtension = fileExtension; return this; } public final String getCustomTimeZone() { return customTimeZone; } public final void setCustomTimeZone(String customTimeZone) { this.customTimeZone = customTimeZone; } @Override public final Builder customTimeZone(String customTimeZone) { this.customTimeZone = customTimeZone; return this; } @Override public ExtendedS3DestinationUpdate build() { return new ExtendedS3DestinationUpdate(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy