commonMain.aws.sdk.kotlin.services.configservice.model.ExternalEvaluation.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Identifies an Amazon Web Services resource and indicates whether it complies with the Config rule that it was evaluated against.
*/
public class ExternalEvaluation private constructor(builder: Builder) {
/**
* Supplementary information about the reason of compliance. For example, this task was completed on a specific date.
*/
public val annotation: kotlin.String? = builder.annotation
/**
* The evaluated compliance resource ID. Config accepts only Amazon Web Services account ID.
*/
public val complianceResourceId: kotlin.String = requireNotNull(builder.complianceResourceId) { "A non-null value must be provided for complianceResourceId" }
/**
* The evaluated compliance resource type. Config accepts `AWS::::Account` resource type.
*/
public val complianceResourceType: kotlin.String = requireNotNull(builder.complianceResourceType) { "A non-null value must be provided for complianceResourceType" }
/**
* The compliance of the Amazon Web Services resource. The valid values are `COMPLIANT, NON_COMPLIANT, ` and `NOT_APPLICABLE`.
*/
public val complianceType: aws.sdk.kotlin.services.configservice.model.ComplianceType = requireNotNull(builder.complianceType) { "A non-null value must be provided for complianceType" }
/**
* The time when the compliance was recorded.
*/
public val orderingTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.orderingTimestamp) { "A non-null value must be provided for orderingTimestamp" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.ExternalEvaluation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExternalEvaluation(")
append("annotation=$annotation,")
append("complianceResourceId=$complianceResourceId,")
append("complianceResourceType=$complianceResourceType,")
append("complianceType=$complianceType,")
append("orderingTimestamp=$orderingTimestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = annotation?.hashCode() ?: 0
result = 31 * result + (complianceResourceId.hashCode())
result = 31 * result + (complianceResourceType.hashCode())
result = 31 * result + (complianceType.hashCode())
result = 31 * result + (orderingTimestamp.hashCode())
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 ExternalEvaluation
if (annotation != other.annotation) return false
if (complianceResourceId != other.complianceResourceId) return false
if (complianceResourceType != other.complianceResourceType) return false
if (complianceType != other.complianceType) return false
if (orderingTimestamp != other.orderingTimestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.ExternalEvaluation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Supplementary information about the reason of compliance. For example, this task was completed on a specific date.
*/
public var annotation: kotlin.String? = null
/**
* The evaluated compliance resource ID. Config accepts only Amazon Web Services account ID.
*/
public var complianceResourceId: kotlin.String? = null
/**
* The evaluated compliance resource type. Config accepts `AWS::::Account` resource type.
*/
public var complianceResourceType: kotlin.String? = null
/**
* The compliance of the Amazon Web Services resource. The valid values are `COMPLIANT, NON_COMPLIANT, ` and `NOT_APPLICABLE`.
*/
public var complianceType: aws.sdk.kotlin.services.configservice.model.ComplianceType? = null
/**
* The time when the compliance was recorded.
*/
public var orderingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.ExternalEvaluation) : this() {
this.annotation = x.annotation
this.complianceResourceId = x.complianceResourceId
this.complianceResourceType = x.complianceResourceType
this.complianceType = x.complianceType
this.orderingTimestamp = x.orderingTimestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.ExternalEvaluation = ExternalEvaluation(this)
internal fun correctErrors(): Builder {
if (complianceResourceId == null) complianceResourceId = ""
if (complianceResourceType == null) complianceResourceType = ""
if (complianceType == null) complianceType = ComplianceType.SdkUnknown("no value provided")
if (orderingTimestamp == null) orderingTimestamp = Instant.fromEpochSeconds(0)
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy