commonMain.aws.sdk.kotlin.services.configservice.model.ComplianceByConfigRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configservice-jvm Show documentation
Show all versions of configservice-jvm Show documentation
The AWS SDK for Kotlin client for Config Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Indicates whether an Config rule is compliant. A rule is compliant if all of the resources that the rule evaluated comply with it. A rule is noncompliant if any of these resources do not comply.
*/
public class ComplianceByConfigRule private constructor(builder: Builder) {
/**
* Indicates whether the Config rule is compliant.
*/
public val compliance: aws.sdk.kotlin.services.configservice.model.Compliance? = builder.compliance
/**
* The name of the Config rule.
*/
public val configRuleName: kotlin.String? = builder.configRuleName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.ComplianceByConfigRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ComplianceByConfigRule(")
append("compliance=$compliance,")
append("configRuleName=$configRuleName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = compliance?.hashCode() ?: 0
result = 31 * result + (configRuleName?.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 ComplianceByConfigRule
if (compliance != other.compliance) return false
if (configRuleName != other.configRuleName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.ComplianceByConfigRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates whether the Config rule is compliant.
*/
public var compliance: aws.sdk.kotlin.services.configservice.model.Compliance? = null
/**
* The name of the Config rule.
*/
public var configRuleName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.ComplianceByConfigRule) : this() {
this.compliance = x.compliance
this.configRuleName = x.configRuleName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.ComplianceByConfigRule = ComplianceByConfigRule(this)
/**
* construct an [aws.sdk.kotlin.services.configservice.model.Compliance] inside the given [block]
*/
public fun compliance(block: aws.sdk.kotlin.services.configservice.model.Compliance.Builder.() -> kotlin.Unit) {
this.compliance = aws.sdk.kotlin.services.configservice.model.Compliance.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}