
commonMain.aws.sdk.kotlin.services.wellarchitected.model.Choice.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wellarchitected.model
/**
* A choice available to answer question.
*/
public class Choice private constructor(builder: Builder) {
/**
* The additional resources for a choice in a custom lens.
*
* A choice can have up to two additional resources: one of type `HELPFUL_RESOURCE`, one of type `IMPROVEMENT_PLAN`, or both.
*/
public val additionalResources: List? = builder.additionalResources
/**
* The ID of a choice.
*/
public val choiceId: kotlin.String? = builder.choiceId
/**
* The description of a choice.
*/
public val description: kotlin.String? = builder.description
/**
* The helpful resource (both text and URL) for a particular choice.
*
* This field only applies to custom lenses. Each choice can have only one helpful resource.
*/
public val helpfulResource: aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent? = builder.helpfulResource
/**
* The improvement plan (both text and URL) for a particular choice.
*
* This field only applies to custom lenses. Each choice can have only one improvement plan.
*/
public val improvementPlan: aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent? = builder.improvementPlan
/**
* The title of a choice.
*/
public val title: kotlin.String? = builder.title
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wellarchitected.model.Choice = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Choice(")
append("additionalResources=$additionalResources,")
append("choiceId=$choiceId,")
append("description=$description,")
append("helpfulResource=$helpfulResource,")
append("improvementPlan=$improvementPlan,")
append("title=$title")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalResources?.hashCode() ?: 0
result = 31 * result + (choiceId?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (helpfulResource?.hashCode() ?: 0)
result = 31 * result + (improvementPlan?.hashCode() ?: 0)
result = 31 * result + (title?.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 Choice
if (additionalResources != other.additionalResources) return false
if (choiceId != other.choiceId) return false
if (description != other.description) return false
if (helpfulResource != other.helpfulResource) return false
if (improvementPlan != other.improvementPlan) return false
if (title != other.title) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wellarchitected.model.Choice = Builder(this).apply(block).build()
public class Builder {
/**
* The additional resources for a choice in a custom lens.
*
* A choice can have up to two additional resources: one of type `HELPFUL_RESOURCE`, one of type `IMPROVEMENT_PLAN`, or both.
*/
public var additionalResources: List? = null
/**
* The ID of a choice.
*/
public var choiceId: kotlin.String? = null
/**
* The description of a choice.
*/
public var description: kotlin.String? = null
/**
* The helpful resource (both text and URL) for a particular choice.
*
* This field only applies to custom lenses. Each choice can have only one helpful resource.
*/
public var helpfulResource: aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent? = null
/**
* The improvement plan (both text and URL) for a particular choice.
*
* This field only applies to custom lenses. Each choice can have only one improvement plan.
*/
public var improvementPlan: aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent? = null
/**
* The title of a choice.
*/
public var title: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wellarchitected.model.Choice) : this() {
this.additionalResources = x.additionalResources
this.choiceId = x.choiceId
this.description = x.description
this.helpfulResource = x.helpfulResource
this.improvementPlan = x.improvementPlan
this.title = x.title
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wellarchitected.model.Choice = Choice(this)
/**
* construct an [aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent] inside the given [block]
*/
public fun helpfulResource(block: aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent.Builder.() -> kotlin.Unit) {
this.helpfulResource = aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent] inside the given [block]
*/
public fun improvementPlan(block: aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent.Builder.() -> kotlin.Unit) {
this.improvementPlan = aws.sdk.kotlin.services.wellarchitected.model.ChoiceContent.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy