commonMain.aws.sdk.kotlin.services.cloudwatch.model.PartialFailure.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatch-jvm Show documentation
Show all versions of cloudwatch-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatch.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* 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()
@SdkDsl
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
}
}
}