commonMain.aws.sdk.kotlin.services.resiliencehub.model.TestRecommendation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resiliencehub-jvm Show documentation
Show all versions of resiliencehub-jvm Show documentation
The AWS SDK for Kotlin client for resiliencehub
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.resiliencehub.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Defines a test recommendation.
*/
public class TestRecommendation private constructor(builder: Builder) {
/**
* Name of the Application Component.
*/
public val appComponentName: kotlin.String? = builder.appComponentName
/**
* A list of recommended alarms that are used in the test and must be exported before or with the test.
*/
public val dependsOnAlarms: List? = builder.dependsOnAlarms
/**
* Description for the test recommendation.
*/
public val description: kotlin.String? = builder.description
/**
* Intent of the test recommendation.
*/
public val intent: kotlin.String? = builder.intent
/**
* The test recommendation items.
*/
public val items: List? = builder.items
/**
* Name of the test recommendation.
*/
public val name: kotlin.String? = builder.name
/**
* Prerequisite of the test recommendation.
*/
public val prerequisite: kotlin.String? = builder.prerequisite
/**
* Identifier for the test recommendation.
*/
public val recommendationId: kotlin.String? = builder.recommendationId
/**
* Status of the recommended test.
*/
public val recommendationStatus: aws.sdk.kotlin.services.resiliencehub.model.RecommendationStatus? = builder.recommendationStatus
/**
* Reference identifier for the test recommendation.
*/
public val referenceId: kotlin.String = requireNotNull(builder.referenceId) { "A non-null value must be provided for referenceId" }
/**
* Level of risk for this test recommendation.
*/
public val risk: aws.sdk.kotlin.services.resiliencehub.model.TestRisk? = builder.risk
/**
* Type of test recommendation.
*/
public val type: aws.sdk.kotlin.services.resiliencehub.model.TestType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.TestRecommendation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TestRecommendation(")
append("appComponentName=$appComponentName,")
append("dependsOnAlarms=$dependsOnAlarms,")
append("description=$description,")
append("intent=$intent,")
append("items=$items,")
append("name=$name,")
append("prerequisite=$prerequisite,")
append("recommendationId=$recommendationId,")
append("recommendationStatus=$recommendationStatus,")
append("referenceId=$referenceId,")
append("risk=$risk,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appComponentName?.hashCode() ?: 0
result = 31 * result + (dependsOnAlarms?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (intent?.hashCode() ?: 0)
result = 31 * result + (items?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (prerequisite?.hashCode() ?: 0)
result = 31 * result + (recommendationId?.hashCode() ?: 0)
result = 31 * result + (recommendationStatus?.hashCode() ?: 0)
result = 31 * result + (referenceId.hashCode())
result = 31 * result + (risk?.hashCode() ?: 0)
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 TestRecommendation
if (appComponentName != other.appComponentName) return false
if (dependsOnAlarms != other.dependsOnAlarms) return false
if (description != other.description) return false
if (intent != other.intent) return false
if (items != other.items) return false
if (name != other.name) return false
if (prerequisite != other.prerequisite) return false
if (recommendationId != other.recommendationId) return false
if (recommendationStatus != other.recommendationStatus) return false
if (referenceId != other.referenceId) return false
if (risk != other.risk) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.TestRecommendation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Name of the Application Component.
*/
public var appComponentName: kotlin.String? = null
/**
* A list of recommended alarms that are used in the test and must be exported before or with the test.
*/
public var dependsOnAlarms: List? = null
/**
* Description for the test recommendation.
*/
public var description: kotlin.String? = null
/**
* Intent of the test recommendation.
*/
public var intent: kotlin.String? = null
/**
* The test recommendation items.
*/
public var items: List? = null
/**
* Name of the test recommendation.
*/
public var name: kotlin.String? = null
/**
* Prerequisite of the test recommendation.
*/
public var prerequisite: kotlin.String? = null
/**
* Identifier for the test recommendation.
*/
public var recommendationId: kotlin.String? = null
/**
* Status of the recommended test.
*/
public var recommendationStatus: aws.sdk.kotlin.services.resiliencehub.model.RecommendationStatus? = null
/**
* Reference identifier for the test recommendation.
*/
public var referenceId: kotlin.String? = null
/**
* Level of risk for this test recommendation.
*/
public var risk: aws.sdk.kotlin.services.resiliencehub.model.TestRisk? = null
/**
* Type of test recommendation.
*/
public var type: aws.sdk.kotlin.services.resiliencehub.model.TestType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.TestRecommendation) : this() {
this.appComponentName = x.appComponentName
this.dependsOnAlarms = x.dependsOnAlarms
this.description = x.description
this.intent = x.intent
this.items = x.items
this.name = x.name
this.prerequisite = x.prerequisite
this.recommendationId = x.recommendationId
this.recommendationStatus = x.recommendationStatus
this.referenceId = x.referenceId
this.risk = x.risk
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.TestRecommendation = TestRecommendation(this)
internal fun correctErrors(): Builder {
if (referenceId == null) referenceId = ""
return this
}
}
}