commonMain.aws.sdk.kotlin.services.bedrockagent.model.FlowValidation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// 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) {
/**
* Specific details about the validation issue encountered in the flow.
*/
public val details: aws.sdk.kotlin.services.bedrockagent.model.FlowValidationDetails? = builder.details
/**
* 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" }
/**
* The type of validation issue encountered in the flow.
*/
public val type: aws.sdk.kotlin.services.bedrockagent.model.FlowValidationType? = builder.type
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("details=$details,")
append("message=$message,")
append("severity=$severity,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = details?.hashCode() ?: 0
result = 31 * result + (message.hashCode())
result = 31 * result + (severity.hashCode())
result = 31 * result + (type?.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 FlowValidation
if (details != other.details) return false
if (message != other.message) return false
if (severity != other.severity) return false
if (type != other.type) 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 {
/**
* Specific details about the validation issue encountered in the flow.
*/
public var details: aws.sdk.kotlin.services.bedrockagent.model.FlowValidationDetails? = null
/**
* 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
/**
* The type of validation issue encountered in the flow.
*/
public var type: aws.sdk.kotlin.services.bedrockagent.model.FlowValidationType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.FlowValidation) : this() {
this.details = x.details
this.message = x.message
this.severity = x.severity
this.type = x.type
}
@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
}
}
}