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

commonMain.aws.sdk.kotlin.services.ssm.model.FailedCreateAssociation.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ssm.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a failed association.
 */
public class FailedCreateAssociation private constructor(builder: Builder) {
    /**
     * The association.
     */
    public val entry: aws.sdk.kotlin.services.ssm.model.CreateAssociationBatchRequestEntry? = builder.entry
    /**
     * The source of the failure.
     */
    public val fault: aws.sdk.kotlin.services.ssm.model.Fault? = builder.fault
    /**
     * A description of the failure.
     */
    public val message: kotlin.String? = builder.message

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

    override fun toString(): kotlin.String = buildString {
        append("FailedCreateAssociation(")
        append("entry=$entry,")
        append("fault=$fault,")
        append("message=$message")
        append(")")
    }

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

        if (entry != other.entry) return false
        if (fault != other.fault) return false
        if (message != other.message) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The association.
         */
        public var entry: aws.sdk.kotlin.services.ssm.model.CreateAssociationBatchRequestEntry? = null
        /**
         * The source of the failure.
         */
        public var fault: aws.sdk.kotlin.services.ssm.model.Fault? = null
        /**
         * A description of the failure.
         */
        public var message: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.FailedCreateAssociation) : this() {
            this.entry = x.entry
            this.fault = x.fault
            this.message = x.message
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy