All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier.kt Maven / Gradle / Ivy

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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Uniquely identifies an evaluation result.
 */
public class EvaluationResultIdentifier private constructor(builder: Builder) {
    /**
     * Identifies an Config rule used to evaluate an Amazon Web Services resource, and provides the type and ID of the evaluated resource.
     */
    public val evaluationResultQualifier: aws.sdk.kotlin.services.configservice.model.EvaluationResultQualifier? = builder.evaluationResultQualifier
    /**
     * The time of the event that triggered the evaluation of your Amazon Web Services resources. The time can indicate when Config delivered a configuration item change notification, or it can indicate when Config delivered the configuration snapshot, depending on which event triggered the evaluation.
     */
    public val orderingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.orderingTimestamp
    /**
     * A Unique ID for an evaluation result.
     */
    public val resourceEvaluationId: kotlin.String? = builder.resourceEvaluationId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("EvaluationResultIdentifier(")
        append("evaluationResultQualifier=$evaluationResultQualifier,")
        append("orderingTimestamp=$orderingTimestamp,")
        append("resourceEvaluationId=$resourceEvaluationId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = evaluationResultQualifier?.hashCode() ?: 0
        result = 31 * result + (orderingTimestamp?.hashCode() ?: 0)
        result = 31 * result + (resourceEvaluationId?.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 EvaluationResultIdentifier

        if (evaluationResultQualifier != other.evaluationResultQualifier) return false
        if (orderingTimestamp != other.orderingTimestamp) return false
        if (resourceEvaluationId != other.resourceEvaluationId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Identifies an Config rule used to evaluate an Amazon Web Services resource, and provides the type and ID of the evaluated resource.
         */
        public var evaluationResultQualifier: aws.sdk.kotlin.services.configservice.model.EvaluationResultQualifier? = null
        /**
         * The time of the event that triggered the evaluation of your Amazon Web Services resources. The time can indicate when Config delivered a configuration item change notification, or it can indicate when Config delivered the configuration snapshot, depending on which event triggered the evaluation.
         */
        public var orderingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A Unique ID for an evaluation result.
         */
        public var resourceEvaluationId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier) : this() {
            this.evaluationResultQualifier = x.evaluationResultQualifier
            this.orderingTimestamp = x.orderingTimestamp
            this.resourceEvaluationId = x.resourceEvaluationId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.configservice.model.EvaluationResultIdentifier = EvaluationResultIdentifier(this)

        /**
         * construct an [aws.sdk.kotlin.services.configservice.model.EvaluationResultQualifier] inside the given [block]
         */
        public fun evaluationResultQualifier(block: aws.sdk.kotlin.services.configservice.model.EvaluationResultQualifier.Builder.() -> kotlin.Unit) {
            this.evaluationResultQualifier = aws.sdk.kotlin.services.configservice.model.EvaluationResultQualifier.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy