commonMain.aws.sdk.kotlin.services.resiliencehub.model.RecommendationDisruptionCompliance.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 disruption compliance recommendation.
*/
public class RecommendationDisruptionCompliance private constructor(builder: Builder) {
/**
* The expected compliance status after applying the recommended configuration change.
*/
public val expectedComplianceStatus: aws.sdk.kotlin.services.resiliencehub.model.ComplianceStatus = requireNotNull(builder.expectedComplianceStatus) { "A non-null value must be provided for expectedComplianceStatus" }
/**
* The expected Recovery Point Objective (RPO) description after applying the recommended configuration change.
*/
public val expectedRpoDescription: kotlin.String? = builder.expectedRpoDescription
/**
* The expected RPO after applying the recommended configuration change.
*/
public val expectedRpoInSecs: kotlin.Int = builder.expectedRpoInSecs
/**
* The expected Recovery Time Objective (RTO) description after applying the recommended configuration change.
*/
public val expectedRtoDescription: kotlin.String? = builder.expectedRtoDescription
/**
* The expected RTO after applying the recommended configuration change.
*/
public val expectedRtoInSecs: kotlin.Int = builder.expectedRtoInSecs
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.RecommendationDisruptionCompliance = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RecommendationDisruptionCompliance(")
append("expectedComplianceStatus=$expectedComplianceStatus,")
append("expectedRpoDescription=$expectedRpoDescription,")
append("expectedRpoInSecs=$expectedRpoInSecs,")
append("expectedRtoDescription=$expectedRtoDescription,")
append("expectedRtoInSecs=$expectedRtoInSecs")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = expectedComplianceStatus.hashCode()
result = 31 * result + (expectedRpoDescription?.hashCode() ?: 0)
result = 31 * result + (expectedRpoInSecs)
result = 31 * result + (expectedRtoDescription?.hashCode() ?: 0)
result = 31 * result + (expectedRtoInSecs)
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 RecommendationDisruptionCompliance
if (expectedComplianceStatus != other.expectedComplianceStatus) return false
if (expectedRpoDescription != other.expectedRpoDescription) return false
if (expectedRpoInSecs != other.expectedRpoInSecs) return false
if (expectedRtoDescription != other.expectedRtoDescription) return false
if (expectedRtoInSecs != other.expectedRtoInSecs) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.RecommendationDisruptionCompliance = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The expected compliance status after applying the recommended configuration change.
*/
public var expectedComplianceStatus: aws.sdk.kotlin.services.resiliencehub.model.ComplianceStatus? = null
/**
* The expected Recovery Point Objective (RPO) description after applying the recommended configuration change.
*/
public var expectedRpoDescription: kotlin.String? = null
/**
* The expected RPO after applying the recommended configuration change.
*/
public var expectedRpoInSecs: kotlin.Int = 0
/**
* The expected Recovery Time Objective (RTO) description after applying the recommended configuration change.
*/
public var expectedRtoDescription: kotlin.String? = null
/**
* The expected RTO after applying the recommended configuration change.
*/
public var expectedRtoInSecs: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.RecommendationDisruptionCompliance) : this() {
this.expectedComplianceStatus = x.expectedComplianceStatus
this.expectedRpoDescription = x.expectedRpoDescription
this.expectedRpoInSecs = x.expectedRpoInSecs
this.expectedRtoDescription = x.expectedRtoDescription
this.expectedRtoInSecs = x.expectedRtoInSecs
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.RecommendationDisruptionCompliance = RecommendationDisruptionCompliance(this)
internal fun correctErrors(): Builder {
if (expectedComplianceStatus == null) expectedComplianceStatus = ComplianceStatus.SdkUnknown("no value provided")
return this
}
}
}