![JAR search and dependency download from the Maven repository](/logo.png)
software.amazon.awssdk.services.firehose.model.HttpEndpointDestinationUpdate Maven / Gradle / Ivy
Show all versions of firehose Show documentation
/*
* 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;
/**
*
* Updates the specified HTTP endpoint destination.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class HttpEndpointDestinationUpdate implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField ENDPOINT_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EndpointConfiguration")
.getter(getter(HttpEndpointDestinationUpdate::endpointConfiguration)).setter(setter(Builder::endpointConfiguration))
.constructor(HttpEndpointConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointConfiguration").build())
.build();
private static final SdkField BUFFERING_HINTS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("BufferingHints")
.getter(getter(HttpEndpointDestinationUpdate::bufferingHints)).setter(setter(Builder::bufferingHints))
.constructor(HttpEndpointBufferingHints::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BufferingHints").build()).build();
private static final SdkField CLOUD_WATCH_LOGGING_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CloudWatchLoggingOptions")
.getter(getter(HttpEndpointDestinationUpdate::cloudWatchLoggingOptions))
.setter(setter(Builder::cloudWatchLoggingOptions)).constructor(CloudWatchLoggingOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CloudWatchLoggingOptions").build())
.build();
private static final SdkField REQUEST_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RequestConfiguration")
.getter(getter(HttpEndpointDestinationUpdate::requestConfiguration)).setter(setter(Builder::requestConfiguration))
.constructor(HttpEndpointRequestConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RequestConfiguration").build())
.build();
private static final SdkField PROCESSING_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ProcessingConfiguration")
.getter(getter(HttpEndpointDestinationUpdate::processingConfiguration))
.setter(setter(Builder::processingConfiguration)).constructor(ProcessingConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingConfiguration").build())
.build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RoleARN").getter(getter(HttpEndpointDestinationUpdate::roleARN)).setter(setter(Builder::roleARN))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleARN").build()).build();
private static final SdkField RETRY_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RetryOptions")
.getter(getter(HttpEndpointDestinationUpdate::retryOptions)).setter(setter(Builder::retryOptions))
.constructor(HttpEndpointRetryOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RetryOptions").build()).build();
private static final SdkField S3_BACKUP_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("S3BackupMode").getter(getter(HttpEndpointDestinationUpdate::s3BackupModeAsString))
.setter(setter(Builder::s3BackupMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3BackupMode").build()).build();
private static final SdkField S3_UPDATE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("S3Update")
.getter(getter(HttpEndpointDestinationUpdate::s3Update)).setter(setter(Builder::s3Update))
.constructor(S3DestinationUpdate::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3Update").build()).build();
private static final SdkField SECRETS_MANAGER_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("SecretsManagerConfiguration")
.getter(getter(HttpEndpointDestinationUpdate::secretsManagerConfiguration))
.setter(setter(Builder::secretsManagerConfiguration))
.constructor(SecretsManagerConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecretsManagerConfiguration")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ENDPOINT_CONFIGURATION_FIELD,
BUFFERING_HINTS_FIELD, CLOUD_WATCH_LOGGING_OPTIONS_FIELD, REQUEST_CONFIGURATION_FIELD,
PROCESSING_CONFIGURATION_FIELD, ROLE_ARN_FIELD, RETRY_OPTIONS_FIELD, S3_BACKUP_MODE_FIELD, S3_UPDATE_FIELD,
SECRETS_MANAGER_CONFIGURATION_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("EndpointConfiguration", ENDPOINT_CONFIGURATION_FIELD);
put("BufferingHints", BUFFERING_HINTS_FIELD);
put("CloudWatchLoggingOptions", CLOUD_WATCH_LOGGING_OPTIONS_FIELD);
put("RequestConfiguration", REQUEST_CONFIGURATION_FIELD);
put("ProcessingConfiguration", PROCESSING_CONFIGURATION_FIELD);
put("RoleARN", ROLE_ARN_FIELD);
put("RetryOptions", RETRY_OPTIONS_FIELD);
put("S3BackupMode", S3_BACKUP_MODE_FIELD);
put("S3Update", S3_UPDATE_FIELD);
put("SecretsManagerConfiguration", SECRETS_MANAGER_CONFIGURATION_FIELD);
}
});
private static final long serialVersionUID = 1L;
private final HttpEndpointConfiguration endpointConfiguration;
private final HttpEndpointBufferingHints bufferingHints;
private final CloudWatchLoggingOptions cloudWatchLoggingOptions;
private final HttpEndpointRequestConfiguration requestConfiguration;
private final ProcessingConfiguration processingConfiguration;
private final String roleARN;
private final HttpEndpointRetryOptions retryOptions;
private final String s3BackupMode;
private final S3DestinationUpdate s3Update;
private final SecretsManagerConfiguration secretsManagerConfiguration;
private HttpEndpointDestinationUpdate(BuilderImpl builder) {
this.endpointConfiguration = builder.endpointConfiguration;
this.bufferingHints = builder.bufferingHints;
this.cloudWatchLoggingOptions = builder.cloudWatchLoggingOptions;
this.requestConfiguration = builder.requestConfiguration;
this.processingConfiguration = builder.processingConfiguration;
this.roleARN = builder.roleARN;
this.retryOptions = builder.retryOptions;
this.s3BackupMode = builder.s3BackupMode;
this.s3Update = builder.s3Update;
this.secretsManagerConfiguration = builder.secretsManagerConfiguration;
}
/**
*
* Describes the configuration of the HTTP endpoint destination.
*
*
* @return Describes the configuration of the HTTP endpoint destination.
*/
public final HttpEndpointConfiguration endpointConfiguration() {
return endpointConfiguration;
}
/**
*
* Describes buffering options that can be applied to the data before it is delivered to the HTTPS endpoint
* destination. Firehose teats these options as hints, and it might choose to use more optimal values. The
* SizeInMBs
and IntervalInSeconds
parameters are optional. However, if specify a value
* for one of them, you must also provide a value for the other.
*
*
* @return Describes buffering options that can be applied to the data before it is delivered to the HTTPS endpoint
* destination. Firehose teats these options as hints, and it might choose to use more optimal values. The
* SizeInMBs
and IntervalInSeconds
parameters are optional. However, if specify a
* value for one of them, you must also provide a value for the other.
*/
public final HttpEndpointBufferingHints bufferingHints() {
return bufferingHints;
}
/**
* Returns the value of the CloudWatchLoggingOptions property for this object.
*
* @return The value of the CloudWatchLoggingOptions property for this object.
*/
public final CloudWatchLoggingOptions cloudWatchLoggingOptions() {
return cloudWatchLoggingOptions;
}
/**
*
* The configuration of the request sent to the HTTP endpoint specified as the destination.
*
*
* @return The configuration of the request sent to the HTTP endpoint specified as the destination.
*/
public final HttpEndpointRequestConfiguration requestConfiguration() {
return requestConfiguration;
}
/**
* Returns the value of the ProcessingConfiguration property for this object.
*
* @return The value of the ProcessingConfiguration property for this object.
*/
public final ProcessingConfiguration processingConfiguration() {
return processingConfiguration;
}
/**
*
* Firehose uses this IAM role for all the permissions that the delivery stream needs.
*
*
* @return Firehose uses this IAM role for all the permissions that the delivery stream needs.
*/
public final String roleARN() {
return roleARN;
}
/**
*
* Describes the retry behavior in case Firehose is unable to deliver data to the specified HTTP endpoint
* destination, or if it doesn't receive a valid acknowledgment of receipt from the specified HTTP endpoint
* destination.
*
*
* @return Describes the retry behavior in case Firehose is unable to deliver data to the specified HTTP endpoint
* destination, or if it doesn't receive a valid acknowledgment of receipt from the specified HTTP endpoint
* destination.
*/
public final HttpEndpointRetryOptions retryOptions() {
return retryOptions;
}
/**
*
* Describes the S3 bucket backup options for the data that Kinesis Firehose delivers to the HTTP endpoint
* destination. You can back up all documents (AllData
) or only the documents that Firehose could not
* deliver to the specified HTTP endpoint destination (FailedDataOnly
).
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #s3BackupMode} will
* return {@link HttpEndpointS3BackupMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #s3BackupModeAsString}.
*
*
* @return Describes the S3 bucket backup options for the data that Kinesis Firehose delivers to the HTTP endpoint
* destination. You can back up all documents (AllData
) or only the documents that Firehose
* could not deliver to the specified HTTP endpoint destination (FailedDataOnly
).
* @see HttpEndpointS3BackupMode
*/
public final HttpEndpointS3BackupMode s3BackupMode() {
return HttpEndpointS3BackupMode.fromValue(s3BackupMode);
}
/**
*
* Describes the S3 bucket backup options for the data that Kinesis Firehose delivers to the HTTP endpoint
* destination. You can back up all documents (AllData
) or only the documents that Firehose could not
* deliver to the specified HTTP endpoint destination (FailedDataOnly
).
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #s3BackupMode} will
* return {@link HttpEndpointS3BackupMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #s3BackupModeAsString}.
*
*
* @return Describes the S3 bucket backup options for the data that Kinesis Firehose delivers to the HTTP endpoint
* destination. You can back up all documents (AllData
) or only the documents that Firehose
* could not deliver to the specified HTTP endpoint destination (FailedDataOnly
).
* @see HttpEndpointS3BackupMode
*/
public final String s3BackupModeAsString() {
return s3BackupMode;
}
/**
* Returns the value of the S3Update property for this object.
*
* @return The value of the S3Update property for this object.
*/
public final S3DestinationUpdate s3Update() {
return s3Update;
}
/**
*
* The configuration that defines how you access secrets for HTTP Endpoint destination.
*
*
* @return The configuration that defines how you access secrets for HTTP Endpoint destination.
*/
public final SecretsManagerConfiguration secretsManagerConfiguration() {
return secretsManagerConfiguration;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(endpointConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(bufferingHints());
hashCode = 31 * hashCode + Objects.hashCode(cloudWatchLoggingOptions());
hashCode = 31 * hashCode + Objects.hashCode(requestConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(processingConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(roleARN());
hashCode = 31 * hashCode + Objects.hashCode(retryOptions());
hashCode = 31 * hashCode + Objects.hashCode(s3BackupModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(s3Update());
hashCode = 31 * hashCode + Objects.hashCode(secretsManagerConfiguration());
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 HttpEndpointDestinationUpdate)) {
return false;
}
HttpEndpointDestinationUpdate other = (HttpEndpointDestinationUpdate) obj;
return Objects.equals(endpointConfiguration(), other.endpointConfiguration())
&& Objects.equals(bufferingHints(), other.bufferingHints())
&& Objects.equals(cloudWatchLoggingOptions(), other.cloudWatchLoggingOptions())
&& Objects.equals(requestConfiguration(), other.requestConfiguration())
&& Objects.equals(processingConfiguration(), other.processingConfiguration())
&& Objects.equals(roleARN(), other.roleARN()) && Objects.equals(retryOptions(), other.retryOptions())
&& Objects.equals(s3BackupModeAsString(), other.s3BackupModeAsString())
&& Objects.equals(s3Update(), other.s3Update())
&& Objects.equals(secretsManagerConfiguration(), other.secretsManagerConfiguration());
}
/**
* 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("HttpEndpointDestinationUpdate").add("EndpointConfiguration", endpointConfiguration())
.add("BufferingHints", bufferingHints()).add("CloudWatchLoggingOptions", cloudWatchLoggingOptions())
.add("RequestConfiguration", requestConfiguration()).add("ProcessingConfiguration", processingConfiguration())
.add("RoleARN", roleARN()).add("RetryOptions", retryOptions()).add("S3BackupMode", s3BackupModeAsString())
.add("S3Update", s3Update()).add("SecretsManagerConfiguration", secretsManagerConfiguration()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "EndpointConfiguration":
return Optional.ofNullable(clazz.cast(endpointConfiguration()));
case "BufferingHints":
return Optional.ofNullable(clazz.cast(bufferingHints()));
case "CloudWatchLoggingOptions":
return Optional.ofNullable(clazz.cast(cloudWatchLoggingOptions()));
case "RequestConfiguration":
return Optional.ofNullable(clazz.cast(requestConfiguration()));
case "ProcessingConfiguration":
return Optional.ofNullable(clazz.cast(processingConfiguration()));
case "RoleARN":
return Optional.ofNullable(clazz.cast(roleARN()));
case "RetryOptions":
return Optional.ofNullable(clazz.cast(retryOptions()));
case "S3BackupMode":
return Optional.ofNullable(clazz.cast(s3BackupModeAsString()));
case "S3Update":
return Optional.ofNullable(clazz.cast(s3Update()));
case "SecretsManagerConfiguration":
return Optional.ofNullable(clazz.cast(secretsManagerConfiguration()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Function