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

commonMain.aws.sdk.kotlin.services.vpclattice.model.RuleUpdateFailure.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.vpclattice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a rule update that failed.
 */
public class RuleUpdateFailure private constructor(builder: Builder) {
    /**
     * The failure code.
     */
    public val failureCode: kotlin.String? = builder.failureCode
    /**
     * The failure message.
     */
    public val failureMessage: kotlin.String? = builder.failureMessage
    /**
     * The ID or Amazon Resource Name (ARN) of the rule.
     */
    public val ruleIdentifier: kotlin.String? = builder.ruleIdentifier

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

    override fun toString(): kotlin.String = buildString {
        append("RuleUpdateFailure(")
        append("failureCode=$failureCode,")
        append("failureMessage=$failureMessage,")
        append("ruleIdentifier=$ruleIdentifier")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = failureCode?.hashCode() ?: 0
        result = 31 * result + (failureMessage?.hashCode() ?: 0)
        result = 31 * result + (ruleIdentifier?.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 RuleUpdateFailure

        if (failureCode != other.failureCode) return false
        if (failureMessage != other.failureMessage) return false
        if (ruleIdentifier != other.ruleIdentifier) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The failure code.
         */
        public var failureCode: kotlin.String? = null
        /**
         * The failure message.
         */
        public var failureMessage: kotlin.String? = null
        /**
         * The ID or Amazon Resource Name (ARN) of the rule.
         */
        public var ruleIdentifier: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.RuleUpdateFailure) : this() {
            this.failureCode = x.failureCode
            this.failureMessage = x.failureMessage
            this.ruleIdentifier = x.ruleIdentifier
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy