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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model



/**
 * Configuration for prompt override.
 */
public class PromptOverrideConfiguration private constructor(builder: Builder) {
    /**
     * ARN of a Lambda.
     */
    public val overrideLambda: kotlin.String? = builder.overrideLambda
    /**
     * List of BasePromptConfiguration
     */
    public val promptConfigurations: List = requireNotNull(builder.promptConfigurations) { "A non-null value must be provided for promptConfigurations" }

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

    override fun toString(): kotlin.String = buildString {
        append("PromptOverrideConfiguration(")
        append("*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = overrideLambda?.hashCode() ?: 0
        result = 31 * result + (promptConfigurations.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 PromptOverrideConfiguration

        if (overrideLambda != other.overrideLambda) return false
        if (promptConfigurations != other.promptConfigurations) return false

        return true
    }

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

    public class Builder {
        /**
         * ARN of a Lambda.
         */
        public var overrideLambda: kotlin.String? = null
        /**
         * List of BasePromptConfiguration
         */
        public var promptConfigurations: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration) : this() {
            this.overrideLambda = x.overrideLambda
            this.promptConfigurations = x.promptConfigurations
        }

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

        internal fun correctErrors(): Builder {
            if (promptConfigurations == null) promptConfigurations = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy