
commonMain.aws.sdk.kotlin.services.wellarchitected.model.Answer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wellarchitected.model
/**
* An answer of the question.
*/
public class Answer private constructor(builder: Builder) {
/**
* A list of selected choices to a question in your workload.
*/
public val choiceAnswers: List? = builder.choiceAnswers
/**
* List of choices available for a question.
*/
public val choices: List? = builder.choices
/**
* The helpful resource text to be displayed for a custom lens.
*
* This field does not apply to Amazon Web Services official lenses.
*/
public val helpfulResourceDisplayText: kotlin.String? = builder.helpfulResourceDisplayText
/**
* The helpful resource URL.
*
* For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.
*
* For custom lenses, this is the helpful resource URL for a question and is only provided if `HelpfulResourceDisplayText` was specified for the question.
*/
public val helpfulResourceUrl: kotlin.String? = builder.helpfulResourceUrl
/**
* The improvement plan URL for a question in an Amazon Web Services official lenses.
*
* This value is only available if the question has been answered.
*
* This value does not apply to custom lenses.
*/
public val improvementPlanUrl: kotlin.String? = builder.improvementPlanUrl
/**
* Defines whether this question is applicable to a lens review.
*/
public val isApplicable: kotlin.Boolean = builder.isApplicable
/**
* The notes associated with the workload.
*/
public val notes: kotlin.String? = builder.notes
/**
* The ID used to identify a pillar, for example, `security`.
*
* A pillar is identified by its PillarReviewSummary$PillarId.
*/
public val pillarId: kotlin.String? = builder.pillarId
/**
* The description of the question.
*/
public val questionDescription: kotlin.String? = builder.questionDescription
/**
* The ID of the question.
*/
public val questionId: kotlin.String? = builder.questionId
/**
* The title of the question.
*/
public val questionTitle: kotlin.String? = builder.questionTitle
/**
* The reason why the question is not applicable to your workload.
*/
public val reason: aws.sdk.kotlin.services.wellarchitected.model.AnswerReason? = builder.reason
/**
* The risk for a given workload, lens review, pillar, or question.
*/
public val risk: aws.sdk.kotlin.services.wellarchitected.model.Risk? = builder.risk
/**
* List of selected choice IDs in a question answer.
*
* The values entered replace the previously selected choices.
*/
public val selectedChoices: List? = builder.selectedChoices
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wellarchitected.model.Answer = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Answer(")
append("choiceAnswers=$choiceAnswers,")
append("choices=$choices,")
append("helpfulResourceDisplayText=$helpfulResourceDisplayText,")
append("helpfulResourceUrl=$helpfulResourceUrl,")
append("improvementPlanUrl=$improvementPlanUrl,")
append("isApplicable=$isApplicable,")
append("notes=$notes,")
append("pillarId=$pillarId,")
append("questionDescription=$questionDescription,")
append("questionId=$questionId,")
append("questionTitle=$questionTitle,")
append("reason=$reason,")
append("risk=$risk,")
append("selectedChoices=$selectedChoices")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = choiceAnswers?.hashCode() ?: 0
result = 31 * result + (choices?.hashCode() ?: 0)
result = 31 * result + (helpfulResourceDisplayText?.hashCode() ?: 0)
result = 31 * result + (helpfulResourceUrl?.hashCode() ?: 0)
result = 31 * result + (improvementPlanUrl?.hashCode() ?: 0)
result = 31 * result + (isApplicable.hashCode())
result = 31 * result + (notes?.hashCode() ?: 0)
result = 31 * result + (pillarId?.hashCode() ?: 0)
result = 31 * result + (questionDescription?.hashCode() ?: 0)
result = 31 * result + (questionId?.hashCode() ?: 0)
result = 31 * result + (questionTitle?.hashCode() ?: 0)
result = 31 * result + (reason?.hashCode() ?: 0)
result = 31 * result + (risk?.hashCode() ?: 0)
result = 31 * result + (selectedChoices?.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 Answer
if (choiceAnswers != other.choiceAnswers) return false
if (choices != other.choices) return false
if (helpfulResourceDisplayText != other.helpfulResourceDisplayText) return false
if (helpfulResourceUrl != other.helpfulResourceUrl) return false
if (improvementPlanUrl != other.improvementPlanUrl) return false
if (isApplicable != other.isApplicable) return false
if (notes != other.notes) return false
if (pillarId != other.pillarId) return false
if (questionDescription != other.questionDescription) return false
if (questionId != other.questionId) return false
if (questionTitle != other.questionTitle) return false
if (reason != other.reason) return false
if (risk != other.risk) return false
if (selectedChoices != other.selectedChoices) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wellarchitected.model.Answer = Builder(this).apply(block).build()
public class Builder {
/**
* A list of selected choices to a question in your workload.
*/
public var choiceAnswers: List? = null
/**
* List of choices available for a question.
*/
public var choices: List? = null
/**
* The helpful resource text to be displayed for a custom lens.
*
* This field does not apply to Amazon Web Services official lenses.
*/
public var helpfulResourceDisplayText: kotlin.String? = null
/**
* The helpful resource URL.
*
* For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.
*
* For custom lenses, this is the helpful resource URL for a question and is only provided if `HelpfulResourceDisplayText` was specified for the question.
*/
public var helpfulResourceUrl: kotlin.String? = null
/**
* The improvement plan URL for a question in an Amazon Web Services official lenses.
*
* This value is only available if the question has been answered.
*
* This value does not apply to custom lenses.
*/
public var improvementPlanUrl: kotlin.String? = null
/**
* Defines whether this question is applicable to a lens review.
*/
public var isApplicable: kotlin.Boolean = false
/**
* The notes associated with the workload.
*/
public var notes: kotlin.String? = null
/**
* The ID used to identify a pillar, for example, `security`.
*
* A pillar is identified by its PillarReviewSummary$PillarId.
*/
public var pillarId: kotlin.String? = null
/**
* The description of the question.
*/
public var questionDescription: kotlin.String? = null
/**
* The ID of the question.
*/
public var questionId: kotlin.String? = null
/**
* The title of the question.
*/
public var questionTitle: kotlin.String? = null
/**
* The reason why the question is not applicable to your workload.
*/
public var reason: aws.sdk.kotlin.services.wellarchitected.model.AnswerReason? = null
/**
* The risk for a given workload, lens review, pillar, or question.
*/
public var risk: aws.sdk.kotlin.services.wellarchitected.model.Risk? = null
/**
* List of selected choice IDs in a question answer.
*
* The values entered replace the previously selected choices.
*/
public var selectedChoices: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wellarchitected.model.Answer) : this() {
this.choiceAnswers = x.choiceAnswers
this.choices = x.choices
this.helpfulResourceDisplayText = x.helpfulResourceDisplayText
this.helpfulResourceUrl = x.helpfulResourceUrl
this.improvementPlanUrl = x.improvementPlanUrl
this.isApplicable = x.isApplicable
this.notes = x.notes
this.pillarId = x.pillarId
this.questionDescription = x.questionDescription
this.questionId = x.questionId
this.questionTitle = x.questionTitle
this.reason = x.reason
this.risk = x.risk
this.selectedChoices = x.selectedChoices
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wellarchitected.model.Answer = Answer(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy