
commonMain.aws.sdk.kotlin.services.qapps.model.PredictAppDefinition.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
/**
* The definition of an Amazon Q App generated based on input such as a conversation or problem statement.
*/
public class PredictAppDefinition private constructor(builder: Builder) {
/**
* The definition specifying the cards and flow of the generated Q App.
*/
public val appDefinition: aws.sdk.kotlin.services.qapps.model.AppDefinitionInput? = builder.appDefinition
/**
* The description of the generated Q App definition.
*/
public val description: kotlin.String? = builder.description
/**
* The title of the generated Q App definition.
*/
public val title: kotlin.String = requireNotNull(builder.title) { "A non-null value must be provided for title" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qapps.model.PredictAppDefinition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PredictAppDefinition(")
append("appDefinition=$appDefinition,")
append("description=$description,")
append("title=$title")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appDefinition?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (title.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 PredictAppDefinition
if (appDefinition != other.appDefinition) return false
if (description != other.description) return false
if (title != other.title) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qapps.model.PredictAppDefinition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The definition specifying the cards and flow of the generated Q App.
*/
public var appDefinition: aws.sdk.kotlin.services.qapps.model.AppDefinitionInput? = null
/**
* The description of the generated Q App definition.
*/
public var description: kotlin.String? = null
/**
* The title of the generated Q App definition.
*/
public var title: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qapps.model.PredictAppDefinition) : this() {
this.appDefinition = x.appDefinition
this.description = x.description
this.title = x.title
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qapps.model.PredictAppDefinition = PredictAppDefinition(this)
/**
* construct an [aws.sdk.kotlin.services.qapps.model.AppDefinitionInput] inside the given [block]
*/
public fun appDefinition(block: aws.sdk.kotlin.services.qapps.model.AppDefinitionInput.Builder.() -> kotlin.Unit) {
this.appDefinition = aws.sdk.kotlin.services.qapps.model.AppDefinitionInput.invoke(block)
}
internal fun correctErrors(): Builder {
if (title == null) title = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy