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

commonMain.aws.sdk.kotlin.services.kinesisanalytics.model.S3Configuration.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.kinesisanalytics.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Provides a description of an Amazon S3 data source, including the Amazon Resource Name (ARN) of the S3 bucket, the ARN of the IAM role that is used to access the bucket, and the name of the Amazon S3 object that contains the data.
 */
public class S3Configuration private constructor(builder: Builder) {
    /**
     * ARN of the S3 bucket that contains the data.
     */
    public val bucketArn: kotlin.String = requireNotNull(builder.bucketArn) { "A non-null value must be provided for bucketArn" }
    /**
     * The name of the object that contains the data.
     */
    public val fileKey: kotlin.String = requireNotNull(builder.fileKey) { "A non-null value must be provided for fileKey" }
    /**
     * IAM ARN of the role used to access the data.
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("S3Configuration(")
        append("bucketArn=$bucketArn,")
        append("fileKey=$fileKey,")
        append("roleArn=$roleArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bucketArn.hashCode()
        result = 31 * result + (fileKey.hashCode())
        result = 31 * result + (roleArn.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 S3Configuration

        if (bucketArn != other.bucketArn) return false
        if (fileKey != other.fileKey) return false
        if (roleArn != other.roleArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * ARN of the S3 bucket that contains the data.
         */
        public var bucketArn: kotlin.String? = null
        /**
         * The name of the object that contains the data.
         */
        public var fileKey: kotlin.String? = null
        /**
         * IAM ARN of the role used to access the data.
         */
        public var roleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesisanalytics.model.S3Configuration) : this() {
            this.bucketArn = x.bucketArn
            this.fileKey = x.fileKey
            this.roleArn = x.roleArn
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy