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

commonMain.aws.sdk.kotlin.services.bedrock.model.S3Config.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.bedrock.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * S3 configuration for storing log data.
 */
public class S3Config private constructor(builder: Builder) {
    /**
     * S3 bucket name.
     */
    public val bucketName: kotlin.String = requireNotNull(builder.bucketName) { "A non-null value must be provided for bucketName" }
    /**
     * S3 prefix.
     */
    public val keyPrefix: kotlin.String? = builder.keyPrefix

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

    override fun toString(): kotlin.String = buildString {
        append("S3Config(")
        append("bucketName=$bucketName,")
        append("keyPrefix=$keyPrefix")
        append(")")
    }

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

        if (bucketName != other.bucketName) return false
        if (keyPrefix != other.keyPrefix) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * S3 bucket name.
         */
        public var bucketName: kotlin.String? = null
        /**
         * S3 prefix.
         */
        public var keyPrefix: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrock.model.S3Config) : this() {
            this.bucketName = x.bucketName
            this.keyPrefix = x.keyPrefix
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy