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

commonMain.aws.sdk.kotlin.services.configservice.model.RemediationException.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.time.Instant

/**
 * An object that represents the details about the remediation exception. The details include the rule name, an explanation of an exception, the time when the exception will be deleted, the resource ID, and resource type.
 */
class RemediationException private constructor(builder: Builder) {
    /**
     * The name of the Config rule.
     */
    val configRuleName: kotlin.String? = builder.configRuleName
    /**
     * The time when the remediation exception will be deleted.
     */
    val expirationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.expirationTime
    /**
     * An explanation of an remediation exception.
     */
    val message: kotlin.String? = builder.message
    /**
     * The ID of the resource (for example., sg-xxxxxx).
     */
    val resourceId: kotlin.String? = builder.resourceId
    /**
     * The type of a resource.
     */
    val resourceType: kotlin.String? = builder.resourceType

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

    override fun toString(): kotlin.String = buildString {
        append("RemediationException(")
        append("configRuleName=$configRuleName,")
        append("expirationTime=$expirationTime,")
        append("message=$message,")
        append("resourceId=$resourceId,")
        append("resourceType=$resourceType)")
    }

    override fun hashCode(): kotlin.Int {
        var result = configRuleName?.hashCode() ?: 0
        result = 31 * result + (expirationTime?.hashCode() ?: 0)
        result = 31 * result + (message?.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 RemediationException

        if (configRuleName != other.configRuleName) return false
        if (expirationTime != other.expirationTime) return false
        if (message != other.message) return false
        if (resourceId != other.resourceId) return false
        if (resourceType != other.resourceType) return false

        return true
    }

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

    class Builder {
        /**
         * The name of the Config rule.
         */
        var configRuleName: kotlin.String? = null
        /**
         * The time when the remediation exception will be deleted.
         */
        var expirationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * An explanation of an remediation exception.
         */
        var message: kotlin.String? = null
        /**
         * The ID of the resource (for example., sg-xxxxxx).
         */
        var resourceId: kotlin.String? = null
        /**
         * The type of a resource.
         */
        var resourceType: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.RemediationException) : this() {
            this.configRuleName = x.configRuleName
            this.expirationTime = x.expirationTime
            this.message = x.message
            this.resourceId = x.resourceId
            this.resourceType = x.resourceType
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy