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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryS3OutputConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cleanrooms.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the configuration to write the query results to S3.
 */
public class ProtectedQueryS3OutputConfiguration private constructor(builder: Builder) {
    /**
     * The S3 bucket to unload the protected query results.
     */
    public val bucket: kotlin.String = requireNotNull(builder.bucket) { "A non-null value must be provided for bucket" }
    /**
     * The S3 prefix to unload the protected query results.
     */
    public val keyPrefix: kotlin.String? = builder.keyPrefix
    /**
     * Intended file format of the result.
     */
    public val resultFormat: aws.sdk.kotlin.services.cleanrooms.model.ResultFormat = requireNotNull(builder.resultFormat) { "A non-null value must be provided for resultFormat" }

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

    override fun toString(): kotlin.String = buildString {
        append("ProtectedQueryS3OutputConfiguration(")
        append("bucket=$bucket,")
        append("keyPrefix=$keyPrefix,")
        append("resultFormat=$resultFormat")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bucket.hashCode()
        result = 31 * result + (keyPrefix?.hashCode() ?: 0)
        result = 31 * result + (resultFormat.hashCode())
        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 ProtectedQueryS3OutputConfiguration

        if (bucket != other.bucket) return false
        if (keyPrefix != other.keyPrefix) return false
        if (resultFormat != other.resultFormat) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The S3 bucket to unload the protected query results.
         */
        public var bucket: kotlin.String? = null
        /**
         * The S3 prefix to unload the protected query results.
         */
        public var keyPrefix: kotlin.String? = null
        /**
         * Intended file format of the result.
         */
        public var resultFormat: aws.sdk.kotlin.services.cleanrooms.model.ResultFormat? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.ProtectedQueryS3OutputConfiguration) : this() {
            this.bucket = x.bucket
            this.keyPrefix = x.keyPrefix
            this.resultFormat = x.resultFormat
        }

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

        internal fun correctErrors(): Builder {
            if (bucket == null) bucket = ""
            if (resultFormat == null) resultFormat = ResultFormat.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy