commonMain.aws.sdk.kotlin.services.resiliencehub.model.AppComponentCompliance.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
/**
* Defines the compliance of an Application Component against the resiliency policy.
*/
public class AppComponentCompliance private constructor(builder: Builder) {
/**
* Name of the Application Component.
*/
public val appComponentName: kotlin.String? = builder.appComponentName
/**
* The compliance of the Application Component against the resiliency policy.
*/
public val compliance: Map? = builder.compliance
/**
* The cost for the application.
*/
public val cost: aws.sdk.kotlin.services.resiliencehub.model.Cost? = builder.cost
/**
* The compliance message.
*/
public val message: kotlin.String? = builder.message
/**
* The current resiliency score for the application.
*/
public val resiliencyScore: aws.sdk.kotlin.services.resiliencehub.model.ResiliencyScore? = builder.resiliencyScore
/**
* Status of the action.
*/
public val status: aws.sdk.kotlin.services.resiliencehub.model.ComplianceStatus? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.AppComponentCompliance = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AppComponentCompliance(")
append("appComponentName=$appComponentName,")
append("compliance=$compliance,")
append("cost=$cost,")
append("message=$message,")
append("resiliencyScore=$resiliencyScore,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appComponentName?.hashCode() ?: 0
result = 31 * result + (compliance?.hashCode() ?: 0)
result = 31 * result + (cost?.hashCode() ?: 0)
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (resiliencyScore?.hashCode() ?: 0)
result = 31 * result + (status?.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 AppComponentCompliance
if (appComponentName != other.appComponentName) return false
if (compliance != other.compliance) return false
if (cost != other.cost) return false
if (message != other.message) return false
if (resiliencyScore != other.resiliencyScore) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.AppComponentCompliance = Builder(this).apply(block).build()
public class Builder {
/**
* Name of the Application Component.
*/
public var appComponentName: kotlin.String? = null
/**
* The compliance of the Application Component against the resiliency policy.
*/
public var compliance: Map? = null
/**
* The cost for the application.
*/
public var cost: aws.sdk.kotlin.services.resiliencehub.model.Cost? = null
/**
* The compliance message.
*/
public var message: kotlin.String? = null
/**
* The current resiliency score for the application.
*/
public var resiliencyScore: aws.sdk.kotlin.services.resiliencehub.model.ResiliencyScore? = null
/**
* Status of the action.
*/
public var status: aws.sdk.kotlin.services.resiliencehub.model.ComplianceStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.AppComponentCompliance) : this() {
this.appComponentName = x.appComponentName
this.compliance = x.compliance
this.cost = x.cost
this.message = x.message
this.resiliencyScore = x.resiliencyScore
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.AppComponentCompliance = AppComponentCompliance(this)
/**
* construct an [aws.sdk.kotlin.services.resiliencehub.model.Cost] inside the given [block]
*/
public fun cost(block: aws.sdk.kotlin.services.resiliencehub.model.Cost.Builder.() -> kotlin.Unit) {
this.cost = aws.sdk.kotlin.services.resiliencehub.model.Cost.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.resiliencehub.model.ResiliencyScore] inside the given [block]
*/
public fun resiliencyScore(block: aws.sdk.kotlin.services.resiliencehub.model.ResiliencyScore.Builder.() -> kotlin.Unit) {
this.resiliencyScore = aws.sdk.kotlin.services.resiliencehub.model.ResiliencyScore.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}