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

commonMain.aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTraceAssessment.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.bedrockruntime.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A Top level guardrail trace object. For more information, see ConverseTrace.
 */
public class GuardrailTraceAssessment private constructor(builder: Builder) {
    /**
     * The input assessment.
     */
    public val inputAssessment: Map? = builder.inputAssessment
    /**
     * The output from the model.
     */
    public val modelOutput: List? = builder.modelOutput
    /**
     * the output assessments.
     */
    public val outputAssessments: Map>? = builder.outputAssessments

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

    override fun toString(): kotlin.String = buildString {
        append("GuardrailTraceAssessment(")
        append("inputAssessment=$inputAssessment,")
        append("modelOutput=$modelOutput,")
        append("outputAssessments=$outputAssessments")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = inputAssessment?.hashCode() ?: 0
        result = 31 * result + (modelOutput?.hashCode() ?: 0)
        result = 31 * result + (outputAssessments?.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 GuardrailTraceAssessment

        if (inputAssessment != other.inputAssessment) return false
        if (modelOutput != other.modelOutput) return false
        if (outputAssessments != other.outputAssessments) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The input assessment.
         */
        public var inputAssessment: Map? = null
        /**
         * The output from the model.
         */
        public var modelOutput: List? = null
        /**
         * the output assessments.
         */
        public var outputAssessments: Map>? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTraceAssessment) : this() {
            this.inputAssessment = x.inputAssessment
            this.modelOutput = x.modelOutput
            this.outputAssessments = x.outputAssessments
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy