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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about validation of the flow.
 *
 * This data type is used in the following API operations:
 * + [GetFlow response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetFlow.html#API_agent_GetFlow_ResponseSyntax)
 * + [GetFlowVersion response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetFlowVersion.html#API_agent_GetFlowVersion_ResponseSyntax)
 */
public class FlowValidation private constructor(builder: Builder) {
    /**
     * A message describing the validation error.
     */
    public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
    /**
     * The severity of the issue described in the message.
     */
    public val severity: aws.sdk.kotlin.services.bedrockagent.model.FlowValidationSeverity = requireNotNull(builder.severity) { "A non-null value must be provided for severity" }

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

    override fun toString(): kotlin.String = buildString {
        append("FlowValidation(")
        append("message=$message,")
        append("severity=$severity")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = message.hashCode()
        result = 31 * result + (severity.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 FlowValidation

        if (message != other.message) return false
        if (severity != other.severity) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A message describing the validation error.
         */
        public var message: kotlin.String? = null
        /**
         * The severity of the issue described in the message.
         */
        public var severity: aws.sdk.kotlin.services.bedrockagent.model.FlowValidationSeverity? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.FlowValidation) : this() {
            this.message = x.message
            this.severity = x.severity
        }

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

        internal fun correctErrors(): Builder {
            if (message == null) message = ""
            if (severity == null) severity = FlowValidationSeverity.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy