
commonMain.aws.sdk.kotlin.services.qapps.model.PredictQAppResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qapps.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PredictQAppResponse private constructor(builder: Builder) {
/**
* The generated Q App definition.
*/
public val app: aws.sdk.kotlin.services.qapps.model.PredictAppDefinition? = builder.app
/**
* The problem statement extracted from the input conversation, if provided.
*/
public val problemStatement: kotlin.String = requireNotNull(builder.problemStatement) { "A non-null value must be provided for problemStatement" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qapps.model.PredictQAppResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PredictQAppResponse(")
append("app=$app,")
append("problemStatement=$problemStatement")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = app?.hashCode() ?: 0
result = 31 * result + (problemStatement.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 PredictQAppResponse
if (app != other.app) return false
if (problemStatement != other.problemStatement) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qapps.model.PredictQAppResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The generated Q App definition.
*/
public var app: aws.sdk.kotlin.services.qapps.model.PredictAppDefinition? = null
/**
* The problem statement extracted from the input conversation, if provided.
*/
public var problemStatement: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qapps.model.PredictQAppResponse) : this() {
this.app = x.app
this.problemStatement = x.problemStatement
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qapps.model.PredictQAppResponse = PredictQAppResponse(this)
/**
* construct an [aws.sdk.kotlin.services.qapps.model.PredictAppDefinition] inside the given [block]
*/
public fun app(block: aws.sdk.kotlin.services.qapps.model.PredictAppDefinition.Builder.() -> kotlin.Unit) {
this.app = aws.sdk.kotlin.services.qapps.model.PredictAppDefinition.invoke(block)
}
internal fun correctErrors(): Builder {
if (problemStatement == null) problemStatement = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy