commonMain.aws.sdk.kotlin.services.configservice.model.ComplianceByResource.kt Maven / Gradle / Ivy
// 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 Amazon Web Services resource that is evaluated according to one or more Config rules is compliant. A resource is compliant if it complies with all of the rules that evaluate it. A resource is noncompliant if it does not comply with one or more of these rules.
*/
public class ComplianceByResource private constructor(builder: Builder) {
/**
* Indicates whether the Amazon Web Services resource complies with all of the Config rules that evaluated it.
*/
public val compliance: aws.sdk.kotlin.services.configservice.model.Compliance? = builder.compliance
/**
* The ID of the Amazon Web Services resource that was evaluated.
*/
public val resourceId: kotlin.String? = builder.resourceId
/**
* The type of the Amazon Web Services resource that was evaluated.
*/
public val resourceType: kotlin.String? = builder.resourceType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.ComplianceByResource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ComplianceByResource(")
append("compliance=$compliance,")
append("resourceId=$resourceId,")
append("resourceType=$resourceType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = compliance?.hashCode() ?: 0
result = 31 * result + (resourceId?.hashCode() ?: 0)
result = 31 * result + (resourceType?.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 ComplianceByResource
if (compliance != other.compliance) return false
if (resourceId != other.resourceId) return false
if (resourceType != other.resourceType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.ComplianceByResource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates whether the Amazon Web Services resource complies with all of the Config rules that evaluated it.
*/
public var compliance: aws.sdk.kotlin.services.configservice.model.Compliance? = null
/**
* The ID of the Amazon Web Services resource that was evaluated.
*/
public var resourceId: kotlin.String? = null
/**
* The type of the Amazon Web Services resource that was evaluated.
*/
public var resourceType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.ComplianceByResource) : this() {
this.compliance = x.compliance
this.resourceId = x.resourceId
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.ComplianceByResource = ComplianceByResource(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
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy