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

commonMain.aws.sdk.kotlin.services.firehose.model.DestinationDescription.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.firehose.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the destination for a delivery stream.
 */
public class DestinationDescription private constructor(builder: Builder) {
    /**
     * The destination in the Serverless offering for Amazon OpenSearch Service.
     */
    public val amazonOpenSearchServerlessDestinationDescription: aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationDescription? = builder.amazonOpenSearchServerlessDestinationDescription
    /**
     * The destination in Amazon OpenSearch Service.
     */
    public val amazonopensearchserviceDestinationDescription: aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationDescription? = builder.amazonopensearchserviceDestinationDescription
    /**
     * The ID of the destination.
     */
    public val destinationId: kotlin.String = requireNotNull(builder.destinationId) { "A non-null value must be provided for destinationId" }
    /**
     * The destination in Amazon ES.
     */
    public val elasticsearchDestinationDescription: aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationDescription? = builder.elasticsearchDestinationDescription
    /**
     * The destination in Amazon S3.
     */
    public val extendedS3DestinationDescription: aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationDescription? = builder.extendedS3DestinationDescription
    /**
     * Describes the specified HTTP endpoint destination.
     */
    public val httpEndpointDestinationDescription: aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationDescription? = builder.httpEndpointDestinationDescription
    /**
     * Describes a destination in Apache Iceberg Tables.
     *
     * Amazon Data Firehose is in preview release and is subject to change.
     */
    public val icebergDestinationDescription: aws.sdk.kotlin.services.firehose.model.IcebergDestinationDescription? = builder.icebergDestinationDescription
    /**
     * The destination in Amazon Redshift.
     */
    public val redshiftDestinationDescription: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription? = builder.redshiftDestinationDescription
    /**
     * [Deprecated] The destination in Amazon S3.
     */
    public val s3DestinationDescription: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription? = builder.s3DestinationDescription
    /**
     * Optional description for the destination
     */
    public val snowflakeDestinationDescription: aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationDescription? = builder.snowflakeDestinationDescription
    /**
     * The destination in Splunk.
     */
    public val splunkDestinationDescription: aws.sdk.kotlin.services.firehose.model.SplunkDestinationDescription? = builder.splunkDestinationDescription

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.DestinationDescription = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DestinationDescription(")
        append("amazonOpenSearchServerlessDestinationDescription=$amazonOpenSearchServerlessDestinationDescription,")
        append("amazonopensearchserviceDestinationDescription=$amazonopensearchserviceDestinationDescription,")
        append("destinationId=$destinationId,")
        append("elasticsearchDestinationDescription=$elasticsearchDestinationDescription,")
        append("extendedS3DestinationDescription=$extendedS3DestinationDescription,")
        append("httpEndpointDestinationDescription=$httpEndpointDestinationDescription,")
        append("icebergDestinationDescription=$icebergDestinationDescription,")
        append("redshiftDestinationDescription=$redshiftDestinationDescription,")
        append("s3DestinationDescription=$s3DestinationDescription,")
        append("snowflakeDestinationDescription=$snowflakeDestinationDescription,")
        append("splunkDestinationDescription=$splunkDestinationDescription")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = amazonOpenSearchServerlessDestinationDescription?.hashCode() ?: 0
        result = 31 * result + (amazonopensearchserviceDestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (destinationId.hashCode())
        result = 31 * result + (elasticsearchDestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (extendedS3DestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (httpEndpointDestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (icebergDestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (redshiftDestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (s3DestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (snowflakeDestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (splunkDestinationDescription?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as DestinationDescription

        if (amazonOpenSearchServerlessDestinationDescription != other.amazonOpenSearchServerlessDestinationDescription) return false
        if (amazonopensearchserviceDestinationDescription != other.amazonopensearchserviceDestinationDescription) return false
        if (destinationId != other.destinationId) return false
        if (elasticsearchDestinationDescription != other.elasticsearchDestinationDescription) return false
        if (extendedS3DestinationDescription != other.extendedS3DestinationDescription) return false
        if (httpEndpointDestinationDescription != other.httpEndpointDestinationDescription) return false
        if (icebergDestinationDescription != other.icebergDestinationDescription) return false
        if (redshiftDestinationDescription != other.redshiftDestinationDescription) return false
        if (s3DestinationDescription != other.s3DestinationDescription) return false
        if (snowflakeDestinationDescription != other.snowflakeDestinationDescription) return false
        if (splunkDestinationDescription != other.splunkDestinationDescription) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.firehose.model.DestinationDescription = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The destination in the Serverless offering for Amazon OpenSearch Service.
         */
        public var amazonOpenSearchServerlessDestinationDescription: aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationDescription? = null
        /**
         * The destination in Amazon OpenSearch Service.
         */
        public var amazonopensearchserviceDestinationDescription: aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationDescription? = null
        /**
         * The ID of the destination.
         */
        public var destinationId: kotlin.String? = null
        /**
         * The destination in Amazon ES.
         */
        public var elasticsearchDestinationDescription: aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationDescription? = null
        /**
         * The destination in Amazon S3.
         */
        public var extendedS3DestinationDescription: aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationDescription? = null
        /**
         * Describes the specified HTTP endpoint destination.
         */
        public var httpEndpointDestinationDescription: aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationDescription? = null
        /**
         * Describes a destination in Apache Iceberg Tables.
         *
         * Amazon Data Firehose is in preview release and is subject to change.
         */
        public var icebergDestinationDescription: aws.sdk.kotlin.services.firehose.model.IcebergDestinationDescription? = null
        /**
         * The destination in Amazon Redshift.
         */
        public var redshiftDestinationDescription: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription? = null
        /**
         * [Deprecated] The destination in Amazon S3.
         */
        public var s3DestinationDescription: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription? = null
        /**
         * Optional description for the destination
         */
        public var snowflakeDestinationDescription: aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationDescription? = null
        /**
         * The destination in Splunk.
         */
        public var splunkDestinationDescription: aws.sdk.kotlin.services.firehose.model.SplunkDestinationDescription? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.DestinationDescription) : this() {
            this.amazonOpenSearchServerlessDestinationDescription = x.amazonOpenSearchServerlessDestinationDescription
            this.amazonopensearchserviceDestinationDescription = x.amazonopensearchserviceDestinationDescription
            this.destinationId = x.destinationId
            this.elasticsearchDestinationDescription = x.elasticsearchDestinationDescription
            this.extendedS3DestinationDescription = x.extendedS3DestinationDescription
            this.httpEndpointDestinationDescription = x.httpEndpointDestinationDescription
            this.icebergDestinationDescription = x.icebergDestinationDescription
            this.redshiftDestinationDescription = x.redshiftDestinationDescription
            this.s3DestinationDescription = x.s3DestinationDescription
            this.snowflakeDestinationDescription = x.snowflakeDestinationDescription
            this.splunkDestinationDescription = x.splunkDestinationDescription
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.firehose.model.DestinationDescription = DestinationDescription(this)

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationDescription] inside the given [block]
         */
        public fun amazonOpenSearchServerlessDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationDescription.Builder.() -> kotlin.Unit) {
            this.amazonOpenSearchServerlessDestinationDescription = aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationDescription] inside the given [block]
         */
        public fun amazonopensearchserviceDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationDescription.Builder.() -> kotlin.Unit) {
            this.amazonopensearchserviceDestinationDescription = aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationDescription] inside the given [block]
         */
        public fun elasticsearchDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationDescription.Builder.() -> kotlin.Unit) {
            this.elasticsearchDestinationDescription = aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationDescription] inside the given [block]
         */
        public fun extendedS3DestinationDescription(block: aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationDescription.Builder.() -> kotlin.Unit) {
            this.extendedS3DestinationDescription = aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationDescription] inside the given [block]
         */
        public fun httpEndpointDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationDescription.Builder.() -> kotlin.Unit) {
            this.httpEndpointDestinationDescription = aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.IcebergDestinationDescription] inside the given [block]
         */
        public fun icebergDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.IcebergDestinationDescription.Builder.() -> kotlin.Unit) {
            this.icebergDestinationDescription = aws.sdk.kotlin.services.firehose.model.IcebergDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription] inside the given [block]
         */
        public fun redshiftDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription.Builder.() -> kotlin.Unit) {
            this.redshiftDestinationDescription = aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.S3DestinationDescription] inside the given [block]
         */
        public fun s3DestinationDescription(block: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription.Builder.() -> kotlin.Unit) {
            this.s3DestinationDescription = aws.sdk.kotlin.services.firehose.model.S3DestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationDescription] inside the given [block]
         */
        public fun snowflakeDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationDescription.Builder.() -> kotlin.Unit) {
            this.snowflakeDestinationDescription = aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationDescription.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.SplunkDestinationDescription] inside the given [block]
         */
        public fun splunkDestinationDescription(block: aws.sdk.kotlin.services.firehose.model.SplunkDestinationDescription.Builder.() -> kotlin.Unit) {
            this.splunkDestinationDescription = aws.sdk.kotlin.services.firehose.model.SplunkDestinationDescription.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (destinationId == null) destinationId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy