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

software.amazon.awssdk.services.firehose.model.ElasticsearchDestinationUpdate 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.ElasticsearchDestinationUpdateMarshaller;
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 ES. *

*/ @Generated("software.amazon.awssdk:codegen") public class ElasticsearchDestinationUpdate implements StructuredPojo, ToCopyableBuilder { private final String roleARN; private final String domainARN; private final String indexName; private final String typeName; private final String indexRotationPeriod; private final ElasticsearchBufferingHints bufferingHints; private final ElasticsearchRetryOptions retryOptions; private final S3DestinationUpdate s3Update; private final ProcessingConfiguration processingConfiguration; private final CloudWatchLoggingOptions cloudWatchLoggingOptions; private ElasticsearchDestinationUpdate(BuilderImpl builder) { this.roleARN = builder.roleARN; this.domainARN = builder.domainARN; this.indexName = builder.indexName; this.typeName = builder.typeName; this.indexRotationPeriod = builder.indexRotationPeriod; this.bufferingHints = builder.bufferingHints; this.retryOptions = builder.retryOptions; this.s3Update = builder.s3Update; this.processingConfiguration = builder.processingConfiguration; this.cloudWatchLoggingOptions = builder.cloudWatchLoggingOptions; } /** *

* The ARN of the IAM role to be assumed by Kinesis Firehose for calling the Amazon ES Configuration API and for * indexing documents. For more information, see Amazon S3 Bucket * Access. *

* * @return The ARN of the IAM role to be assumed by Kinesis Firehose for calling the Amazon ES Configuration API and * for indexing documents. For more information, see Amazon S3 * Bucket Access. */ public String roleARN() { return roleARN; } /** *

* The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, * DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after assuming the * IAM role specified in RoleARN. *

* * @return The ARN of the Amazon ES domain. The IAM role must have permissions for  * DescribeElasticsearchDomain, DescribeElasticsearchDomains, and * DescribeElasticsearchDomainConfig after assuming the IAM role specified in RoleARN. */ public String domainARN() { return domainARN; } /** *

* The Elasticsearch index name. *

* * @return The Elasticsearch index name. */ public String indexName() { return indexName; } /** *

* The Elasticsearch type name. *

* * @return The Elasticsearch type name. */ public String typeName() { return typeName; } /** *

* The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to facilitate the * expiration of old data. For more information, see Index Rotation for * Amazon Elasticsearch Service Destination. Default value is OneDay. *

*

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

* * @return The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to facilitate * the expiration of old data. For more information, see Index Rotation * for Amazon Elasticsearch Service Destination. Default value is OneDay. * @see ElasticsearchIndexRotationPeriod */ public ElasticsearchIndexRotationPeriod indexRotationPeriod() { return ElasticsearchIndexRotationPeriod.fromValue(indexRotationPeriod); } /** *

* The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to facilitate the * expiration of old data. For more information, see Index Rotation for * Amazon Elasticsearch Service Destination. Default value is OneDay. *

*

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

* * @return The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to facilitate * the expiration of old data. For more information, see Index Rotation * for Amazon Elasticsearch Service Destination. Default value is OneDay. * @see ElasticsearchIndexRotationPeriod */ public String indexRotationPeriodString() { return indexRotationPeriod; } /** *

* The buffering options. If no value is specified, ElasticsearchBufferingHints object default values are * used. *

* * @return The buffering options. If no value is specified, ElasticsearchBufferingHints object default values * are used. */ public ElasticsearchBufferingHints bufferingHints() { return bufferingHints; } /** *

* The retry behavior in case Kinesis Firehose is unable to deliver documents to Amazon ES. The default value is 300 * (5 minutes). *

* * @return The retry behavior in case Kinesis Firehose is unable to deliver documents to Amazon ES. The default * value is 300 (5 minutes). */ public ElasticsearchRetryOptions retryOptions() { return retryOptions; } /** *

* The Amazon S3 destination. *

* * @return The Amazon S3 destination. */ public S3DestinationUpdate s3Update() { return s3Update; } /** *

* The data processing configuration. *

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

* The CloudWatch logging options for your delivery stream. *

* * @return The CloudWatch logging options for your delivery stream. */ public CloudWatchLoggingOptions cloudWatchLoggingOptions() { return cloudWatchLoggingOptions; } @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(domainARN()); hashCode = 31 * hashCode + Objects.hashCode(indexName()); hashCode = 31 * hashCode + Objects.hashCode(typeName()); hashCode = 31 * hashCode + Objects.hashCode(indexRotationPeriodString()); hashCode = 31 * hashCode + Objects.hashCode(bufferingHints()); hashCode = 31 * hashCode + Objects.hashCode(retryOptions()); hashCode = 31 * hashCode + Objects.hashCode(s3Update()); hashCode = 31 * hashCode + Objects.hashCode(processingConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(cloudWatchLoggingOptions()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ElasticsearchDestinationUpdate)) { return false; } ElasticsearchDestinationUpdate other = (ElasticsearchDestinationUpdate) obj; return Objects.equals(roleARN(), other.roleARN()) && Objects.equals(domainARN(), other.domainARN()) && Objects.equals(indexName(), other.indexName()) && Objects.equals(typeName(), other.typeName()) && Objects.equals(indexRotationPeriodString(), other.indexRotationPeriodString()) && Objects.equals(bufferingHints(), other.bufferingHints()) && Objects.equals(retryOptions(), other.retryOptions()) && Objects.equals(s3Update(), other.s3Update()) && Objects.equals(processingConfiguration(), other.processingConfiguration()) && Objects.equals(cloudWatchLoggingOptions(), other.cloudWatchLoggingOptions()); } @Override public String toString() { return ToString.builder("ElasticsearchDestinationUpdate").add("RoleARN", roleARN()).add("DomainARN", domainARN()) .add("IndexName", indexName()).add("TypeName", typeName()) .add("IndexRotationPeriod", indexRotationPeriodString()).add("BufferingHints", bufferingHints()) .add("RetryOptions", retryOptions()).add("S3Update", s3Update()) .add("ProcessingConfiguration", processingConfiguration()) .add("CloudWatchLoggingOptions", cloudWatchLoggingOptions()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "RoleARN": return Optional.of(clazz.cast(roleARN())); case "DomainARN": return Optional.of(clazz.cast(domainARN())); case "IndexName": return Optional.of(clazz.cast(indexName())); case "TypeName": return Optional.of(clazz.cast(typeName())); case "IndexRotationPeriod": return Optional.of(clazz.cast(indexRotationPeriodString())); case "BufferingHints": return Optional.of(clazz.cast(bufferingHints())); case "RetryOptions": return Optional.of(clazz.cast(retryOptions())); case "S3Update": return Optional.of(clazz.cast(s3Update())); case "ProcessingConfiguration": return Optional.of(clazz.cast(processingConfiguration())); case "CloudWatchLoggingOptions": return Optional.of(clazz.cast(cloudWatchLoggingOptions())); default: return Optional.empty(); } } @SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { ElasticsearchDestinationUpdateMarshaller.getInstance().marshall(this, protocolMarshaller); } public interface Builder extends CopyableBuilder { /** *

* The ARN of the IAM role to be assumed by Kinesis Firehose for calling the Amazon ES Configuration API and for * indexing documents. For more information, see Amazon S3 Bucket * Access. *

* * @param roleARN * The ARN of the IAM role to be assumed by Kinesis Firehose for calling the Amazon ES Configuration API * and for indexing documents. For more information, see Amazon S3 * Bucket Access. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleARN(String roleARN); /** *

* The ARN of the Amazon ES domain. The IAM role must have permissions for  * DescribeElasticsearchDomain, DescribeElasticsearchDomains, and * DescribeElasticsearchDomainConfig after assuming the IAM role specified in RoleARN. *

* * @param domainARN * The ARN of the Amazon ES domain. The IAM role must have permissions for  * DescribeElasticsearchDomain, DescribeElasticsearchDomains, and * DescribeElasticsearchDomainConfig after assuming the IAM role specified in * RoleARN. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainARN(String domainARN); /** *

* The Elasticsearch index name. *

* * @param indexName * The Elasticsearch index name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder indexName(String indexName); /** *

* The Elasticsearch type name. *

* * @param typeName * The Elasticsearch type name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder typeName(String typeName); /** *

* The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to facilitate the * expiration of old data. For more information, see Index Rotation for * Amazon Elasticsearch Service Destination. Default value is OneDay. *

* * @param indexRotationPeriod * The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to * facilitate the expiration of old data. For more information, see Index * Rotation for Amazon Elasticsearch Service Destination. Default value is OneDay. * @see ElasticsearchIndexRotationPeriod * @return Returns a reference to this object so that method calls can be chained together. * @see ElasticsearchIndexRotationPeriod */ Builder indexRotationPeriod(String indexRotationPeriod); /** *

* The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to facilitate the * expiration of old data. For more information, see Index Rotation for * Amazon Elasticsearch Service Destination. Default value is OneDay. *

* * @param indexRotationPeriod * The Elasticsearch index rotation period. Index rotation appends a time stamp to IndexName to * facilitate the expiration of old data. For more information, see Index * Rotation for Amazon Elasticsearch Service Destination. Default value is OneDay. * @see ElasticsearchIndexRotationPeriod * @return Returns a reference to this object so that method calls can be chained together. * @see ElasticsearchIndexRotationPeriod */ Builder indexRotationPeriod(ElasticsearchIndexRotationPeriod indexRotationPeriod); /** *

* The buffering options. If no value is specified, ElasticsearchBufferingHints object default values are * used. *

* * @param bufferingHints * The buffering options. If no value is specified, ElasticsearchBufferingHints object default * values are used. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bufferingHints(ElasticsearchBufferingHints bufferingHints); /** *

* The buffering options. If no value is specified, ElasticsearchBufferingHints object default values are * used. *

* This is a convenience that creates an instance of the {@link ElasticsearchBufferingHints.Builder} avoiding * the need to create one manually via {@link ElasticsearchBufferingHints#builder()}. * * When the {@link Consumer} completes, {@link ElasticsearchBufferingHints.Builder#build()} is called * immediately and its result is passed to {@link #bufferingHints(ElasticsearchBufferingHints)}. * * @param bufferingHints * a consumer that will call methods on {@link ElasticsearchBufferingHints.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #bufferingHints(ElasticsearchBufferingHints) */ default Builder bufferingHints(Consumer bufferingHints) { return bufferingHints(ElasticsearchBufferingHints.builder().apply(bufferingHints).build()); } /** *

* The retry behavior in case Kinesis Firehose is unable to deliver documents to Amazon ES. The default value is * 300 (5 minutes). *

* * @param retryOptions * The retry behavior in case Kinesis Firehose is unable to deliver documents to Amazon ES. The default * value is 300 (5 minutes). * @return Returns a reference to this object so that method calls can be chained together. */ Builder retryOptions(ElasticsearchRetryOptions retryOptions); /** *

* The retry behavior in case Kinesis Firehose is unable to deliver documents to Amazon ES. The default value is * 300 (5 minutes). *

* This is a convenience that creates an instance of the {@link ElasticsearchRetryOptions.Builder} avoiding the * need to create one manually via {@link ElasticsearchRetryOptions#builder()}. * * When the {@link Consumer} completes, {@link ElasticsearchRetryOptions.Builder#build()} is called immediately * and its result is passed to {@link #retryOptions(ElasticsearchRetryOptions)}. * * @param retryOptions * a consumer that will call methods on {@link ElasticsearchRetryOptions.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #retryOptions(ElasticsearchRetryOptions) */ default Builder retryOptions(Consumer retryOptions) { return retryOptions(ElasticsearchRetryOptions.builder().apply(retryOptions).build()); } /** *

* The Amazon S3 destination. *

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

* The Amazon S3 destination. *

* 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 #s3Update(S3DestinationUpdate)}. * * @param s3Update * 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 #s3Update(S3DestinationUpdate) */ default Builder s3Update(Consumer s3Update) { return s3Update(S3DestinationUpdate.builder().apply(s3Update).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()); } /** *

* 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()); } } static final class BuilderImpl implements Builder { private String roleARN; private String domainARN; private String indexName; private String typeName; private String indexRotationPeriod; private ElasticsearchBufferingHints bufferingHints; private ElasticsearchRetryOptions retryOptions; private S3DestinationUpdate s3Update; private ProcessingConfiguration processingConfiguration; private CloudWatchLoggingOptions cloudWatchLoggingOptions; private BuilderImpl() { } private BuilderImpl(ElasticsearchDestinationUpdate model) { roleARN(model.roleARN); domainARN(model.domainARN); indexName(model.indexName); typeName(model.typeName); indexRotationPeriod(model.indexRotationPeriod); bufferingHints(model.bufferingHints); retryOptions(model.retryOptions); s3Update(model.s3Update); processingConfiguration(model.processingConfiguration); cloudWatchLoggingOptions(model.cloudWatchLoggingOptions); } 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 getDomainARN() { return domainARN; } @Override public final Builder domainARN(String domainARN) { this.domainARN = domainARN; return this; } public final void setDomainARN(String domainARN) { this.domainARN = domainARN; } public final String getIndexName() { return indexName; } @Override public final Builder indexName(String indexName) { this.indexName = indexName; return this; } public final void setIndexName(String indexName) { this.indexName = indexName; } public final String getTypeName() { return typeName; } @Override public final Builder typeName(String typeName) { this.typeName = typeName; return this; } public final void setTypeName(String typeName) { this.typeName = typeName; } public final String getIndexRotationPeriod() { return indexRotationPeriod; } @Override public final Builder indexRotationPeriod(String indexRotationPeriod) { this.indexRotationPeriod = indexRotationPeriod; return this; } @Override public final Builder indexRotationPeriod(ElasticsearchIndexRotationPeriod indexRotationPeriod) { this.indexRotationPeriod(indexRotationPeriod.toString()); return this; } public final void setIndexRotationPeriod(String indexRotationPeriod) { this.indexRotationPeriod = indexRotationPeriod; } public final ElasticsearchBufferingHints.Builder getBufferingHints() { return bufferingHints != null ? bufferingHints.toBuilder() : null; } @Override public final Builder bufferingHints(ElasticsearchBufferingHints bufferingHints) { this.bufferingHints = bufferingHints; return this; } public final void setBufferingHints(ElasticsearchBufferingHints.BuilderImpl bufferingHints) { this.bufferingHints = bufferingHints != null ? bufferingHints.build() : null; } public final ElasticsearchRetryOptions.Builder getRetryOptions() { return retryOptions != null ? retryOptions.toBuilder() : null; } @Override public final Builder retryOptions(ElasticsearchRetryOptions retryOptions) { this.retryOptions = retryOptions; return this; } public final void setRetryOptions(ElasticsearchRetryOptions.BuilderImpl retryOptions) { this.retryOptions = retryOptions != null ? retryOptions.build() : null; } public final S3DestinationUpdate.Builder getS3Update() { return s3Update != null ? s3Update.toBuilder() : null; } @Override public final Builder s3Update(S3DestinationUpdate s3Update) { this.s3Update = s3Update; return this; } public final void setS3Update(S3DestinationUpdate.BuilderImpl s3Update) { this.s3Update = s3Update != null ? s3Update.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 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; } @Override public ElasticsearchDestinationUpdate build() { return new ElasticsearchDestinationUpdate(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy