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 module holds the client classes that are used for communicating with Amazon Kinesis Service

There is a newer version: 2.28.6
Show newest version
/*
 * Copyright 2013-2018 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.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import javax.annotation.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.ProtocolMarshaller;
import software.amazon.awssdk.core.protocol.StructuredPojo;
import software.amazon.awssdk.services.firehose.transform.ExtendedS3DestinationUpdateMarshaller;
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 class ExtendedS3DestinationUpdate implements StructuredPojo, ToCopyableBuilder { private final String roleARN; private final String bucketARN; private final String prefix; 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 ExtendedS3DestinationUpdate(BuilderImpl builder) { this.roleARN = builder.roleARN; this.bucketARN = builder.bucketARN; this.prefix = builder.prefix; 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; } /** *

* The ARN of the AWS credentials. *

* * @return The ARN of the AWS credentials. */ public String roleARN() { return roleARN; } /** *

* The ARN of the S3 bucket. *

* * @return The ARN of the S3 bucket. */ public String bucketARN() { return bucketARN; } /** *

* The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered S3 files. You can specify an extra * prefix to be added in front of the time format prefix. If the prefix ends with a slash, it appears as a folder in * the S3 bucket. For more information, see Amazon S3 Object Name Format in the * Amazon Kinesis Firehose Developer Guide. *

* * @return The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered S3 files. You can specify an * extra prefix to be added in front of the time format prefix. If the prefix ends with a slash, it appears * as a folder in the S3 bucket. For more information, see Amazon S3 Object Name Format * in the Amazon Kinesis Firehose Developer Guide. */ public String prefix() { return prefix; } /** *

* The buffering option. *

* * @return The buffering option. */ public 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 #compressionFormatString}. *

* * @return The compression format. If no value is specified, the default is UNCOMPRESSED. * @see CompressionFormat */ public 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 #compressionFormatString}. *

* * @return The compression format. If no value is specified, the default is UNCOMPRESSED. * @see CompressionFormat */ public String compressionFormatString() { 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 EncryptionConfiguration encryptionConfiguration() { return encryptionConfiguration; } /** *

* The CloudWatch logging options for your delivery stream. *

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

* The data processing configuration. *

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

* Enables or disables Amazon S3 backup mode. *

*

* 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 #s3BackupModeString}. *

* * @return Enables or disables Amazon S3 backup mode. * @see S3BackupMode */ public S3BackupMode s3BackupMode() { return S3BackupMode.fromValue(s3BackupMode); } /** *

* Enables or disables Amazon S3 backup mode. *

*

* 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 #s3BackupModeString}. *

* * @return Enables or disables Amazon S3 backup mode. * @see S3BackupMode */ public String s3BackupModeString() { return s3BackupMode; } /** *

* The Amazon S3 destination for backup. *

* * @return The Amazon S3 destination for backup. */ public S3DestinationUpdate s3BackupUpdate() { return s3BackupUpdate; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public 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(bufferingHints()); hashCode = 31 * hashCode + Objects.hashCode(compressionFormatString()); hashCode = 31 * hashCode + Objects.hashCode(encryptionConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(cloudWatchLoggingOptions()); hashCode = 31 * hashCode + Objects.hashCode(processingConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(s3BackupModeString()); hashCode = 31 * hashCode + Objects.hashCode(s3BackupUpdate()); return hashCode; } @Override public boolean equals(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(bufferingHints(), other.bufferingHints()) && Objects.equals(compressionFormatString(), other.compressionFormatString()) && Objects.equals(encryptionConfiguration(), other.encryptionConfiguration()) && Objects.equals(cloudWatchLoggingOptions(), other.cloudWatchLoggingOptions()) && Objects.equals(processingConfiguration(), other.processingConfiguration()) && Objects.equals(s3BackupModeString(), other.s3BackupModeString()) && Objects.equals(s3BackupUpdate(), other.s3BackupUpdate()); } @Override public String toString() { return ToString.builder("ExtendedS3DestinationUpdate").add("RoleARN", roleARN()).add("BucketARN", bucketARN()) .add("Prefix", prefix()).add("BufferingHints", bufferingHints()) .add("CompressionFormat", compressionFormatString()).add("EncryptionConfiguration", encryptionConfiguration()) .add("CloudWatchLoggingOptions", cloudWatchLoggingOptions()) .add("ProcessingConfiguration", processingConfiguration()).add("S3BackupMode", s3BackupModeString()) .add("S3BackupUpdate", s3BackupUpdate()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "RoleARN": return Optional.of(clazz.cast(roleARN())); case "BucketARN": return Optional.of(clazz.cast(bucketARN())); case "Prefix": return Optional.of(clazz.cast(prefix())); case "BufferingHints": return Optional.of(clazz.cast(bufferingHints())); case "CompressionFormat": return Optional.of(clazz.cast(compressionFormatString())); case "EncryptionConfiguration": return Optional.of(clazz.cast(encryptionConfiguration())); case "CloudWatchLoggingOptions": return Optional.of(clazz.cast(cloudWatchLoggingOptions())); case "ProcessingConfiguration": return Optional.of(clazz.cast(processingConfiguration())); case "S3BackupMode": return Optional.of(clazz.cast(s3BackupModeString())); case "S3BackupUpdate": return Optional.of(clazz.cast(s3BackupUpdate())); default: return Optional.empty(); } } @SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { ExtendedS3DestinationUpdateMarshaller.getInstance().marshall(this, protocolMarshaller); } public interface Builder extends CopyableBuilder { /** *

* The ARN of the AWS credentials. *

* * @param roleARN * The ARN of the AWS credentials. * @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. *

* * @param bucketARN * The ARN of the S3 bucket. * @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 S3 files. You can specify an extra * prefix to be added in front of the time format prefix. If the prefix ends with a slash, it appears as a * folder in the S3 bucket. For more information, see Amazon S3 Object Name Format in * the Amazon Kinesis Firehose Developer Guide. *

* * @param prefix * The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered S3 files. You can specify * an extra prefix to be added in front of the time format prefix. If the prefix ends with a slash, it * appears as a folder in the S3 bucket. For more information, see Amazon S3 Object Name * Format in the Amazon Kinesis Firehose Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder prefix(String prefix); /** *

* 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 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().apply(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 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().apply(encryptionConfiguration).build()); } /** *

* The CloudWatch logging options for your delivery stream. *

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

* The CloudWatch logging options for your delivery stream. *

* This is a convenience 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().apply(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 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().apply(processingConfiguration).build()); } /** *

* Enables or disables Amazon S3 backup mode. *

* * @param s3BackupMode * Enables or disables Amazon S3 backup mode. * @see S3BackupMode * @return Returns a reference to this object so that method calls can be chained together. * @see S3BackupMode */ Builder s3BackupMode(String s3BackupMode); /** *

* Enables or disables Amazon S3 backup mode. *

* * @param s3BackupMode * Enables or disables Amazon S3 backup mode. * @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 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().apply(s3BackupUpdate).build()); } } static final class BuilderImpl implements Builder { private String roleARN; private String bucketARN; private String prefix; private BufferingHints bufferingHints; private String compressionFormat; private EncryptionConfiguration encryptionConfiguration; private CloudWatchLoggingOptions cloudWatchLoggingOptions; private ProcessingConfiguration processingConfiguration; private String s3BackupMode; private S3DestinationUpdate s3BackupUpdate; private BuilderImpl() { } private BuilderImpl(ExtendedS3DestinationUpdate model) { roleARN(model.roleARN); bucketARN(model.bucketARN); prefix(model.prefix); bufferingHints(model.bufferingHints); compressionFormat(model.compressionFormat); encryptionConfiguration(model.encryptionConfiguration); cloudWatchLoggingOptions(model.cloudWatchLoggingOptions); processingConfiguration(model.processingConfiguration); s3BackupMode(model.s3BackupMode); s3BackupUpdate(model.s3BackupUpdate); } public final String getRoleARN() { return roleARN; } @Override public final Builder roleARN(String roleARN) { this.roleARN = roleARN; return this; } public final void setRoleARN(String roleARN) { this.roleARN = roleARN; } public final String getBucketARN() { return bucketARN; } @Override public final Builder bucketARN(String bucketARN) { this.bucketARN = bucketARN; return this; } public final void setBucketARN(String bucketARN) { this.bucketARN = bucketARN; } public final String getPrefix() { return prefix; } @Override public final Builder prefix(String prefix) { this.prefix = prefix; return this; } public final void setPrefix(String prefix) { this.prefix = prefix; } public final BufferingHints.Builder getBufferingHints() { return bufferingHints != null ? bufferingHints.toBuilder() : null; } @Override public final Builder bufferingHints(BufferingHints bufferingHints) { this.bufferingHints = bufferingHints; return this; } public final void setBufferingHints(BufferingHints.BuilderImpl bufferingHints) { this.bufferingHints = bufferingHints != null ? bufferingHints.build() : null; } public final String getCompressionFormat() { return compressionFormat; } @Override public final Builder compressionFormat(String compressionFormat) { this.compressionFormat = compressionFormat; return this; } @Override public final Builder compressionFormat(CompressionFormat compressionFormat) { this.compressionFormat(compressionFormat.toString()); return this; } public final void setCompressionFormat(String compressionFormat) { this.compressionFormat = compressionFormat; } public final EncryptionConfiguration.Builder getEncryptionConfiguration() { return encryptionConfiguration != null ? encryptionConfiguration.toBuilder() : null; } @Override public final Builder encryptionConfiguration(EncryptionConfiguration encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration; return this; } public final void setEncryptionConfiguration(EncryptionConfiguration.BuilderImpl encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration != null ? encryptionConfiguration.build() : null; } public final CloudWatchLoggingOptions.Builder getCloudWatchLoggingOptions() { return cloudWatchLoggingOptions != null ? cloudWatchLoggingOptions.toBuilder() : null; } @Override public final Builder cloudWatchLoggingOptions(CloudWatchLoggingOptions cloudWatchLoggingOptions) { this.cloudWatchLoggingOptions = cloudWatchLoggingOptions; return this; } public final void setCloudWatchLoggingOptions(CloudWatchLoggingOptions.BuilderImpl cloudWatchLoggingOptions) { this.cloudWatchLoggingOptions = cloudWatchLoggingOptions != null ? cloudWatchLoggingOptions.build() : null; } public final ProcessingConfiguration.Builder getProcessingConfiguration() { return processingConfiguration != null ? processingConfiguration.toBuilder() : null; } @Override public final Builder processingConfiguration(ProcessingConfiguration processingConfiguration) { this.processingConfiguration = processingConfiguration; return this; } public final void setProcessingConfiguration(ProcessingConfiguration.BuilderImpl processingConfiguration) { this.processingConfiguration = processingConfiguration != null ? processingConfiguration.build() : null; } public final String getS3BackupMode() { return s3BackupMode; } @Override public final Builder s3BackupMode(String s3BackupMode) { this.s3BackupMode = s3BackupMode; return this; } @Override public final Builder s3BackupMode(S3BackupMode s3BackupMode) { this.s3BackupMode(s3BackupMode.toString()); return this; } public final void setS3BackupMode(String s3BackupMode) { this.s3BackupMode = s3BackupMode; } public final S3DestinationUpdate.Builder getS3BackupUpdate() { return s3BackupUpdate != null ? s3BackupUpdate.toBuilder() : null; } @Override public final Builder s3BackupUpdate(S3DestinationUpdate s3BackupUpdate) { this.s3BackupUpdate = s3BackupUpdate; return this; } public final void setS3BackupUpdate(S3DestinationUpdate.BuilderImpl s3BackupUpdate) { this.s3BackupUpdate = s3BackupUpdate != null ? s3BackupUpdate.build() : null; } @Override public ExtendedS3DestinationUpdate build() { return new ExtendedS3DestinationUpdate(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy