software.amazon.awssdk.services.firehose.model.DestinationDescription 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.List;
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 the destination for a delivery stream.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DestinationDescription implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField DESTINATION_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DestinationId").getter(getter(DestinationDescription::destinationId))
.setter(setter(Builder::destinationId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationId").build()).build();
private static final SdkField S3_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("S3DestinationDescription")
.getter(getter(DestinationDescription::s3DestinationDescription)).setter(setter(Builder::s3DestinationDescription))
.constructor(S3DestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3DestinationDescription").build())
.build();
private static final SdkField EXTENDED_S3_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("ExtendedS3DestinationDescription")
.getter(getter(DestinationDescription::extendedS3DestinationDescription))
.setter(setter(Builder::extendedS3DestinationDescription))
.constructor(ExtendedS3DestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExtendedS3DestinationDescription")
.build()).build();
private static final SdkField REDSHIFT_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("RedshiftDestinationDescription")
.getter(getter(DestinationDescription::redshiftDestinationDescription))
.setter(setter(Builder::redshiftDestinationDescription))
.constructor(RedshiftDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RedshiftDestinationDescription")
.build()).build();
private static final SdkField ELASTICSEARCH_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("ElasticsearchDestinationDescription")
.getter(getter(DestinationDescription::elasticsearchDestinationDescription))
.setter(setter(Builder::elasticsearchDestinationDescription))
.constructor(ElasticsearchDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("ElasticsearchDestinationDescription").build()).build();
private static final SdkField AMAZONOPENSEARCHSERVICE_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("AmazonopensearchserviceDestinationDescription")
.getter(getter(DestinationDescription::amazonopensearchserviceDestinationDescription))
.setter(setter(Builder::amazonopensearchserviceDestinationDescription))
.constructor(AmazonopensearchserviceDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("AmazonopensearchserviceDestinationDescription").build()).build();
private static final SdkField SPLUNK_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("SplunkDestinationDescription")
.getter(getter(DestinationDescription::splunkDestinationDescription))
.setter(setter(Builder::splunkDestinationDescription))
.constructor(SplunkDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SplunkDestinationDescription")
.build()).build();
private static final SdkField HTTP_ENDPOINT_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("HttpEndpointDestinationDescription")
.getter(getter(DestinationDescription::httpEndpointDestinationDescription))
.setter(setter(Builder::httpEndpointDestinationDescription))
.constructor(HttpEndpointDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HttpEndpointDestinationDescription")
.build()).build();
private static final SdkField SNOWFLAKE_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("SnowflakeDestinationDescription")
.getter(getter(DestinationDescription::snowflakeDestinationDescription))
.setter(setter(Builder::snowflakeDestinationDescription))
.constructor(SnowflakeDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnowflakeDestinationDescription")
.build()).build();
private static final SdkField AMAZON_OPEN_SEARCH_SERVERLESS_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("AmazonOpenSearchServerlessDestinationDescription")
.getter(getter(DestinationDescription::amazonOpenSearchServerlessDestinationDescription))
.setter(setter(Builder::amazonOpenSearchServerlessDestinationDescription))
.constructor(AmazonOpenSearchServerlessDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("AmazonOpenSearchServerlessDestinationDescription").build()).build();
private static final SdkField ICEBERG_DESTINATION_DESCRIPTION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("IcebergDestinationDescription")
.getter(getter(DestinationDescription::icebergDestinationDescription))
.setter(setter(Builder::icebergDestinationDescription))
.constructor(IcebergDestinationDescription::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IcebergDestinationDescription")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DESTINATION_ID_FIELD,
S3_DESTINATION_DESCRIPTION_FIELD, EXTENDED_S3_DESTINATION_DESCRIPTION_FIELD, REDSHIFT_DESTINATION_DESCRIPTION_FIELD,
ELASTICSEARCH_DESTINATION_DESCRIPTION_FIELD, AMAZONOPENSEARCHSERVICE_DESTINATION_DESCRIPTION_FIELD,
SPLUNK_DESTINATION_DESCRIPTION_FIELD, HTTP_ENDPOINT_DESTINATION_DESCRIPTION_FIELD,
SNOWFLAKE_DESTINATION_DESCRIPTION_FIELD, AMAZON_OPEN_SEARCH_SERVERLESS_DESTINATION_DESCRIPTION_FIELD,
ICEBERG_DESTINATION_DESCRIPTION_FIELD));
private static final long serialVersionUID = 1L;
private final String destinationId;
private final S3DestinationDescription s3DestinationDescription;
private final ExtendedS3DestinationDescription extendedS3DestinationDescription;
private final RedshiftDestinationDescription redshiftDestinationDescription;
private final ElasticsearchDestinationDescription elasticsearchDestinationDescription;
private final AmazonopensearchserviceDestinationDescription amazonopensearchserviceDestinationDescription;
private final SplunkDestinationDescription splunkDestinationDescription;
private final HttpEndpointDestinationDescription httpEndpointDestinationDescription;
private final SnowflakeDestinationDescription snowflakeDestinationDescription;
private final AmazonOpenSearchServerlessDestinationDescription amazonOpenSearchServerlessDestinationDescription;
private final IcebergDestinationDescription icebergDestinationDescription;
private DestinationDescription(BuilderImpl builder) {
this.destinationId = builder.destinationId;
this.s3DestinationDescription = builder.s3DestinationDescription;
this.extendedS3DestinationDescription = builder.extendedS3DestinationDescription;
this.redshiftDestinationDescription = builder.redshiftDestinationDescription;
this.elasticsearchDestinationDescription = builder.elasticsearchDestinationDescription;
this.amazonopensearchserviceDestinationDescription = builder.amazonopensearchserviceDestinationDescription;
this.splunkDestinationDescription = builder.splunkDestinationDescription;
this.httpEndpointDestinationDescription = builder.httpEndpointDestinationDescription;
this.snowflakeDestinationDescription = builder.snowflakeDestinationDescription;
this.amazonOpenSearchServerlessDestinationDescription = builder.amazonOpenSearchServerlessDestinationDescription;
this.icebergDestinationDescription = builder.icebergDestinationDescription;
}
/**
*
* The ID of the destination.
*
*
* @return The ID of the destination.
*/
public final String destinationId() {
return destinationId;
}
/**
*
* [Deprecated] The destination in Amazon S3.
*
*
* @return [Deprecated] The destination in Amazon S3.
*/
public final S3DestinationDescription s3DestinationDescription() {
return s3DestinationDescription;
}
/**
*
* The destination in Amazon S3.
*
*
* @return The destination in Amazon S3.
*/
public final ExtendedS3DestinationDescription extendedS3DestinationDescription() {
return extendedS3DestinationDescription;
}
/**
*
* The destination in Amazon Redshift.
*
*
* @return The destination in Amazon Redshift.
*/
public final RedshiftDestinationDescription redshiftDestinationDescription() {
return redshiftDestinationDescription;
}
/**
*
* The destination in Amazon ES.
*
*
* @return The destination in Amazon ES.
*/
public final ElasticsearchDestinationDescription elasticsearchDestinationDescription() {
return elasticsearchDestinationDescription;
}
/**
*
* The destination in Amazon OpenSearch Service.
*
*
* @return The destination in Amazon OpenSearch Service.
*/
public final AmazonopensearchserviceDestinationDescription amazonopensearchserviceDestinationDescription() {
return amazonopensearchserviceDestinationDescription;
}
/**
*
* The destination in Splunk.
*
*
* @return The destination in Splunk.
*/
public final SplunkDestinationDescription splunkDestinationDescription() {
return splunkDestinationDescription;
}
/**
*
* Describes the specified HTTP endpoint destination.
*
*
* @return Describes the specified HTTP endpoint destination.
*/
public final HttpEndpointDestinationDescription httpEndpointDestinationDescription() {
return httpEndpointDestinationDescription;
}
/**
*
* Optional description for the destination
*
*
* @return Optional description for the destination
*/
public final SnowflakeDestinationDescription snowflakeDestinationDescription() {
return snowflakeDestinationDescription;
}
/**
*
* The destination in the Serverless offering for Amazon OpenSearch Service.
*
*
* @return The destination in the Serverless offering for Amazon OpenSearch Service.
*/
public final AmazonOpenSearchServerlessDestinationDescription amazonOpenSearchServerlessDestinationDescription() {
return amazonOpenSearchServerlessDestinationDescription;
}
/**
*
* Describes a destination in Apache Iceberg Tables.
*
*
* Amazon Data Firehose is in preview release and is subject to change.
*
*
* @return Describes a destination in Apache Iceberg Tables.
*
* Amazon Data Firehose is in preview release and is subject to change.
*/
public final IcebergDestinationDescription icebergDestinationDescription() {
return icebergDestinationDescription;
}
@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(destinationId());
hashCode = 31 * hashCode + Objects.hashCode(s3DestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(extendedS3DestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(redshiftDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(elasticsearchDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(amazonopensearchserviceDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(splunkDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(httpEndpointDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(snowflakeDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(amazonOpenSearchServerlessDestinationDescription());
hashCode = 31 * hashCode + Objects.hashCode(icebergDestinationDescription());
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 DestinationDescription)) {
return false;
}
DestinationDescription other = (DestinationDescription) obj;
return Objects.equals(destinationId(), other.destinationId())
&& Objects.equals(s3DestinationDescription(), other.s3DestinationDescription())
&& Objects.equals(extendedS3DestinationDescription(), other.extendedS3DestinationDescription())
&& Objects.equals(redshiftDestinationDescription(), other.redshiftDestinationDescription())
&& Objects.equals(elasticsearchDestinationDescription(), other.elasticsearchDestinationDescription())
&& Objects.equals(amazonopensearchserviceDestinationDescription(),
other.amazonopensearchserviceDestinationDescription())
&& Objects.equals(splunkDestinationDescription(), other.splunkDestinationDescription())
&& Objects.equals(httpEndpointDestinationDescription(), other.httpEndpointDestinationDescription())
&& Objects.equals(snowflakeDestinationDescription(), other.snowflakeDestinationDescription())
&& Objects.equals(amazonOpenSearchServerlessDestinationDescription(),
other.amazonOpenSearchServerlessDestinationDescription())
&& Objects.equals(icebergDestinationDescription(), other.icebergDestinationDescription());
}
/**
* 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("DestinationDescription").add("DestinationId", destinationId())
.add("S3DestinationDescription", s3DestinationDescription())
.add("ExtendedS3DestinationDescription", extendedS3DestinationDescription())
.add("RedshiftDestinationDescription", redshiftDestinationDescription())
.add("ElasticsearchDestinationDescription", elasticsearchDestinationDescription())
.add("AmazonopensearchserviceDestinationDescription", amazonopensearchserviceDestinationDescription())
.add("SplunkDestinationDescription", splunkDestinationDescription())
.add("HttpEndpointDestinationDescription", httpEndpointDestinationDescription())
.add("SnowflakeDestinationDescription", snowflakeDestinationDescription())
.add("AmazonOpenSearchServerlessDestinationDescription", amazonOpenSearchServerlessDestinationDescription())
.add("IcebergDestinationDescription", icebergDestinationDescription()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "DestinationId":
return Optional.ofNullable(clazz.cast(destinationId()));
case "S3DestinationDescription":
return Optional.ofNullable(clazz.cast(s3DestinationDescription()));
case "ExtendedS3DestinationDescription":
return Optional.ofNullable(clazz.cast(extendedS3DestinationDescription()));
case "RedshiftDestinationDescription":
return Optional.ofNullable(clazz.cast(redshiftDestinationDescription()));
case "ElasticsearchDestinationDescription":
return Optional.ofNullable(clazz.cast(elasticsearchDestinationDescription()));
case "AmazonopensearchserviceDestinationDescription":
return Optional.ofNullable(clazz.cast(amazonopensearchserviceDestinationDescription()));
case "SplunkDestinationDescription":
return Optional.ofNullable(clazz.cast(splunkDestinationDescription()));
case "HttpEndpointDestinationDescription":
return Optional.ofNullable(clazz.cast(httpEndpointDestinationDescription()));
case "SnowflakeDestinationDescription":
return Optional.ofNullable(clazz.cast(snowflakeDestinationDescription()));
case "AmazonOpenSearchServerlessDestinationDescription":
return Optional.ofNullable(clazz.cast(amazonOpenSearchServerlessDestinationDescription()));
case "IcebergDestinationDescription":
return Optional.ofNullable(clazz.cast(icebergDestinationDescription()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function