commonMain.aws.sdk.kotlin.services.configservice.model.EvaluationResult.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* The details of an Config evaluation. Provides the Amazon Web Services resource that was evaluated, the compliance of the resource, related time stamps, and supplementary information.
*/
public class EvaluationResult private constructor(builder: Builder) {
/**
* Supplementary information about how the evaluation determined the compliance.
*/
public val annotation: kotlin.String? = builder.annotation
/**
* Indicates whether the Amazon Web Services resource complies with the Config rule that evaluated it.
*
* For the `EvaluationResult` data type, Config supports only the `COMPLIANT`, `NON_COMPLIANT`, and `NOT_APPLICABLE` values. Config does not support the `INSUFFICIENT_DATA` value for the `EvaluationResult` data type.
*/
public val complianceType: aws.sdk.kotlin.services.configservice.model.ComplianceType? = builder.complianceType
/**
* The time when the Config rule evaluated the Amazon Web Services resource.
*/
public val configRuleInvokedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.configRuleInvokedTime
/**
* Uniquely identifies the evaluation result.
*/
public val evaluationResultIdentifier: aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier? = builder.evaluationResultIdentifier
/**
* The time when Config recorded the evaluation result.
*/
public val resultRecordedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.resultRecordedTime
/**
* An encrypted token that associates an evaluation with an Config rule. The token identifies the rule, the Amazon Web Services resource being evaluated, and the event that triggered the evaluation.
*/
public val resultToken: kotlin.String? = builder.resultToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.EvaluationResult = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EvaluationResult(")
append("annotation=$annotation,")
append("complianceType=$complianceType,")
append("configRuleInvokedTime=$configRuleInvokedTime,")
append("evaluationResultIdentifier=$evaluationResultIdentifier,")
append("resultRecordedTime=$resultRecordedTime,")
append("resultToken=$resultToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = annotation?.hashCode() ?: 0
result = 31 * result + (complianceType?.hashCode() ?: 0)
result = 31 * result + (configRuleInvokedTime?.hashCode() ?: 0)
result = 31 * result + (evaluationResultIdentifier?.hashCode() ?: 0)
result = 31 * result + (resultRecordedTime?.hashCode() ?: 0)
result = 31 * result + (resultToken?.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 EvaluationResult
if (annotation != other.annotation) return false
if (complianceType != other.complianceType) return false
if (configRuleInvokedTime != other.configRuleInvokedTime) return false
if (evaluationResultIdentifier != other.evaluationResultIdentifier) return false
if (resultRecordedTime != other.resultRecordedTime) return false
if (resultToken != other.resultToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.EvaluationResult = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Supplementary information about how the evaluation determined the compliance.
*/
public var annotation: kotlin.String? = null
/**
* Indicates whether the Amazon Web Services resource complies with the Config rule that evaluated it.
*
* For the `EvaluationResult` data type, Config supports only the `COMPLIANT`, `NON_COMPLIANT`, and `NOT_APPLICABLE` values. Config does not support the `INSUFFICIENT_DATA` value for the `EvaluationResult` data type.
*/
public var complianceType: aws.sdk.kotlin.services.configservice.model.ComplianceType? = null
/**
* The time when the Config rule evaluated the Amazon Web Services resource.
*/
public var configRuleInvokedTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Uniquely identifies the evaluation result.
*/
public var evaluationResultIdentifier: aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier? = null
/**
* The time when Config recorded the evaluation result.
*/
public var resultRecordedTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* An encrypted token that associates an evaluation with an Config rule. The token identifies the rule, the Amazon Web Services resource being evaluated, and the event that triggered the evaluation.
*/
public var resultToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.EvaluationResult) : this() {
this.annotation = x.annotation
this.complianceType = x.complianceType
this.configRuleInvokedTime = x.configRuleInvokedTime
this.evaluationResultIdentifier = x.evaluationResultIdentifier
this.resultRecordedTime = x.resultRecordedTime
this.resultToken = x.resultToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.EvaluationResult = EvaluationResult(this)
/**
* construct an [aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier] inside the given [block]
*/
public fun evaluationResultIdentifier(block: aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier.Builder.() -> kotlin.Unit) {
this.evaluationResultIdentifier = aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}