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

commonMain.aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription.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 a destination in Amazon Redshift.
 */
public class RedshiftDestinationDescription private constructor(builder: Builder) {
    /**
     * The Amazon CloudWatch logging options for your delivery stream.
     */
    public val cloudWatchLoggingOptions: aws.sdk.kotlin.services.firehose.model.CloudWatchLoggingOptions? = builder.cloudWatchLoggingOptions
    /**
     * The database connection string.
     */
    public val clusterJdbcurl: kotlin.String = requireNotNull(builder.clusterJdbcurl) { "A non-null value must be provided for clusterJdbcurl" }
    /**
     * The `COPY` command.
     */
    public val copyCommand: aws.sdk.kotlin.services.firehose.model.CopyCommand? = builder.copyCommand
    /**
     * The data processing configuration.
     */
    public val processingConfiguration: aws.sdk.kotlin.services.firehose.model.ProcessingConfiguration? = builder.processingConfiguration
    /**
     * The retry behavior in case Firehose is unable to deliver documents to Amazon Redshift. Default value is 3600 (60 minutes).
     */
    public val retryOptions: aws.sdk.kotlin.services.firehose.model.RedshiftRetryOptions? = builder.retryOptions
    /**
     * The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
    /**
     * The configuration for backup in Amazon S3.
     */
    public val s3BackupDescription: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription? = builder.s3BackupDescription
    /**
     * The Amazon S3 backup mode.
     */
    public val s3BackupMode: aws.sdk.kotlin.services.firehose.model.RedshiftS3BackupMode? = builder.s3BackupMode
    /**
     * The Amazon S3 destination.
     */
    public val s3DestinationDescription: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription? = builder.s3DestinationDescription
    /**
     * The configuration that defines how you access secrets for Amazon Redshift.
     */
    public val secretsManagerConfiguration: aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration? = builder.secretsManagerConfiguration
    /**
     * The name of the user.
     */
    public val username: kotlin.String? = builder.username

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

    override fun toString(): kotlin.String = buildString {
        append("RedshiftDestinationDescription(")
        append("cloudWatchLoggingOptions=$cloudWatchLoggingOptions,")
        append("clusterJdbcurl=$clusterJdbcurl,")
        append("copyCommand=$copyCommand,")
        append("processingConfiguration=$processingConfiguration,")
        append("retryOptions=$retryOptions,")
        append("roleArn=$roleArn,")
        append("s3BackupDescription=$s3BackupDescription,")
        append("s3BackupMode=$s3BackupMode,")
        append("s3DestinationDescription=$s3DestinationDescription,")
        append("secretsManagerConfiguration=$secretsManagerConfiguration,")
        append("username=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cloudWatchLoggingOptions?.hashCode() ?: 0
        result = 31 * result + (clusterJdbcurl.hashCode())
        result = 31 * result + (copyCommand?.hashCode() ?: 0)
        result = 31 * result + (processingConfiguration?.hashCode() ?: 0)
        result = 31 * result + (retryOptions?.hashCode() ?: 0)
        result = 31 * result + (roleArn.hashCode())
        result = 31 * result + (s3BackupDescription?.hashCode() ?: 0)
        result = 31 * result + (s3BackupMode?.hashCode() ?: 0)
        result = 31 * result + (s3DestinationDescription?.hashCode() ?: 0)
        result = 31 * result + (secretsManagerConfiguration?.hashCode() ?: 0)
        result = 31 * result + (username?.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 RedshiftDestinationDescription

        if (cloudWatchLoggingOptions != other.cloudWatchLoggingOptions) return false
        if (clusterJdbcurl != other.clusterJdbcurl) return false
        if (copyCommand != other.copyCommand) return false
        if (processingConfiguration != other.processingConfiguration) return false
        if (retryOptions != other.retryOptions) return false
        if (roleArn != other.roleArn) return false
        if (s3BackupDescription != other.s3BackupDescription) return false
        if (s3BackupMode != other.s3BackupMode) return false
        if (s3DestinationDescription != other.s3DestinationDescription) return false
        if (secretsManagerConfiguration != other.secretsManagerConfiguration) return false
        if (username != other.username) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon CloudWatch logging options for your delivery stream.
         */
        public var cloudWatchLoggingOptions: aws.sdk.kotlin.services.firehose.model.CloudWatchLoggingOptions? = null
        /**
         * The database connection string.
         */
        public var clusterJdbcurl: kotlin.String? = null
        /**
         * The `COPY` command.
         */
        public var copyCommand: aws.sdk.kotlin.services.firehose.model.CopyCommand? = null
        /**
         * The data processing configuration.
         */
        public var processingConfiguration: aws.sdk.kotlin.services.firehose.model.ProcessingConfiguration? = null
        /**
         * The retry behavior in case Firehose is unable to deliver documents to Amazon Redshift. Default value is 3600 (60 minutes).
         */
        public var retryOptions: aws.sdk.kotlin.services.firehose.model.RedshiftRetryOptions? = null
        /**
         * The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
         */
        public var roleArn: kotlin.String? = null
        /**
         * The configuration for backup in Amazon S3.
         */
        public var s3BackupDescription: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription? = null
        /**
         * The Amazon S3 backup mode.
         */
        public var s3BackupMode: aws.sdk.kotlin.services.firehose.model.RedshiftS3BackupMode? = null
        /**
         * The Amazon S3 destination.
         */
        public var s3DestinationDescription: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription? = null
        /**
         * The configuration that defines how you access secrets for Amazon Redshift.
         */
        public var secretsManagerConfiguration: aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration? = null
        /**
         * The name of the user.
         */
        public var username: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationDescription) : this() {
            this.cloudWatchLoggingOptions = x.cloudWatchLoggingOptions
            this.clusterJdbcurl = x.clusterJdbcurl
            this.copyCommand = x.copyCommand
            this.processingConfiguration = x.processingConfiguration
            this.retryOptions = x.retryOptions
            this.roleArn = x.roleArn
            this.s3BackupDescription = x.s3BackupDescription
            this.s3BackupMode = x.s3BackupMode
            this.s3DestinationDescription = x.s3DestinationDescription
            this.secretsManagerConfiguration = x.secretsManagerConfiguration
            this.username = x.username
        }

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

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

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

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

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

        /**
         * construct an [aws.sdk.kotlin.services.firehose.model.S3DestinationDescription] inside the given [block]
         */
        public fun s3BackupDescription(block: aws.sdk.kotlin.services.firehose.model.S3DestinationDescription.Builder.() -> kotlin.Unit) {
            this.s3BackupDescription = aws.sdk.kotlin.services.firehose.model.S3DestinationDescription.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.SecretsManagerConfiguration] inside the given [block]
         */
        public fun secretsManagerConfiguration(block: aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration.Builder.() -> kotlin.Unit) {
            this.secretsManagerConfiguration = aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy