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

commonMain.aws.sdk.kotlin.services.cloudwatch.model.PartialFailure.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudwatch.model



/**
 * This array is empty if the API operation was successful for all the rules specified in the request. If the operation could not process one of the rules, the following data is returned for each of those rules.
 */
public class PartialFailure private constructor(builder: Builder) {
    /**
     * The type of error.
     */
    public val exceptionType: kotlin.String? = builder.exceptionType
    /**
     * The code of the error.
     */
    public val failureCode: kotlin.String? = builder.failureCode
    /**
     * A description of the error.
     */
    public val failureDescription: kotlin.String? = builder.failureDescription
    /**
     * The specified rule that could not be deleted.
     */
    public val failureResource: kotlin.String? = builder.failureResource

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

    override fun toString(): kotlin.String = buildString {
        append("PartialFailure(")
        append("exceptionType=$exceptionType,")
        append("failureCode=$failureCode,")
        append("failureDescription=$failureDescription,")
        append("failureResource=$failureResource")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = exceptionType?.hashCode() ?: 0
        result = 31 * result + (failureCode?.hashCode() ?: 0)
        result = 31 * result + (failureDescription?.hashCode() ?: 0)
        result = 31 * result + (failureResource?.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 PartialFailure

        if (exceptionType != other.exceptionType) return false
        if (failureCode != other.failureCode) return false
        if (failureDescription != other.failureDescription) return false
        if (failureResource != other.failureResource) return false

        return true
    }

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

    public class Builder {
        /**
         * The type of error.
         */
        public var exceptionType: kotlin.String? = null
        /**
         * The code of the error.
         */
        public var failureCode: kotlin.String? = null
        /**
         * A description of the error.
         */
        public var failureDescription: kotlin.String? = null
        /**
         * The specified rule that could not be deleted.
         */
        public var failureResource: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.PartialFailure) : this() {
            this.exceptionType = x.exceptionType
            this.failureCode = x.failureCode
            this.failureDescription = x.failureDescription
            this.failureResource = x.failureResource
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy