commonMain.aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicy.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Defines a resiliency policy.
*
* Resilience Hub allows you to provide a value of zero for `rtoInSecs` and `rpoInSecs` of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for `rtoInSecs` and `rpoInSecs`, the estimated workload RTO and estimated workload RPO result will be near zero and the **Compliance status** for your application will be set to **Policy breached**.
*/
public class ResiliencyPolicy private constructor(builder: Builder) {
/**
* Date and time when the resiliency policy was created.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
*/
public val dataLocationConstraint: aws.sdk.kotlin.services.resiliencehub.model.DataLocationConstraint? = builder.dataLocationConstraint
/**
* Specifies the estimated cost tier of the resiliency policy.
*/
public val estimatedCostTier: aws.sdk.kotlin.services.resiliencehub.model.EstimatedCostTier? = builder.estimatedCostTier
/**
* The resiliency policy.
*/
public val policy: Map? = builder.policy
/**
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:`partition`:resiliencehub:`region`:`account`:resiliency-policy/`policy-id`. For more information about ARNs, see [ Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference* guide.
*/
public val policyArn: kotlin.String? = builder.policyArn
/**
* The description for the policy.
*/
public val policyDescription: kotlin.String? = builder.policyDescription
/**
* The name of the policy
*/
public val policyName: kotlin.String? = builder.policyName
/**
* Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.
*/
public val tags: Map? = builder.tags
/**
* The tier for this resiliency policy, ranging from the highest severity (`MissionCritical`) to lowest (`NonCritical`).
*/
public val tier: aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicyTier? = builder.tier
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResiliencyPolicy(")
append("creationTime=$creationTime,")
append("dataLocationConstraint=$dataLocationConstraint,")
append("estimatedCostTier=$estimatedCostTier,")
append("policy=$policy,")
append("policyArn=$policyArn,")
append("policyDescription=$policyDescription,")
append("policyName=$policyName,")
append("tags=*** Sensitive Data Redacted ***,")
append("tier=$tier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationTime?.hashCode() ?: 0
result = 31 * result + (dataLocationConstraint?.hashCode() ?: 0)
result = 31 * result + (estimatedCostTier?.hashCode() ?: 0)
result = 31 * result + (policy?.hashCode() ?: 0)
result = 31 * result + (policyArn?.hashCode() ?: 0)
result = 31 * result + (policyDescription?.hashCode() ?: 0)
result = 31 * result + (policyName?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (tier?.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 ResiliencyPolicy
if (creationTime != other.creationTime) return false
if (dataLocationConstraint != other.dataLocationConstraint) return false
if (estimatedCostTier != other.estimatedCostTier) return false
if (policy != other.policy) return false
if (policyArn != other.policyArn) return false
if (policyDescription != other.policyDescription) return false
if (policyName != other.policyName) return false
if (tags != other.tags) return false
if (tier != other.tier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicy = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Date and time when the resiliency policy was created.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
*/
public var dataLocationConstraint: aws.sdk.kotlin.services.resiliencehub.model.DataLocationConstraint? = null
/**
* Specifies the estimated cost tier of the resiliency policy.
*/
public var estimatedCostTier: aws.sdk.kotlin.services.resiliencehub.model.EstimatedCostTier? = null
/**
* The resiliency policy.
*/
public var policy: Map? = null
/**
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:`partition`:resiliencehub:`region`:`account`:resiliency-policy/`policy-id`. For more information about ARNs, see [ Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference* guide.
*/
public var policyArn: kotlin.String? = null
/**
* The description for the policy.
*/
public var policyDescription: kotlin.String? = null
/**
* The name of the policy
*/
public var policyName: kotlin.String? = null
/**
* Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.
*/
public var tags: Map? = null
/**
* The tier for this resiliency policy, ranging from the highest severity (`MissionCritical`) to lowest (`NonCritical`).
*/
public var tier: aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicyTier? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicy) : this() {
this.creationTime = x.creationTime
this.dataLocationConstraint = x.dataLocationConstraint
this.estimatedCostTier = x.estimatedCostTier
this.policy = x.policy
this.policyArn = x.policyArn
this.policyDescription = x.policyDescription
this.policyName = x.policyName
this.tags = x.tags
this.tier = x.tier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.ResiliencyPolicy = ResiliencyPolicy(this)
internal fun correctErrors(): Builder {
return this
}
}
}