commonMain.aws.sdk.kotlin.services.codepipeline.model.FailureDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline-jvm Show documentation
Show all versions of codepipeline-jvm Show documentation
The AWS SDK for Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Represents information about failure details.
*/
public class FailureDetails private constructor(builder: Builder) {
/**
* The external ID of the run of the action that failed.
*/
public val externalExecutionId: kotlin.String? = builder.externalExecutionId
/**
* The message about the failure.
*/
public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
/**
* The type of the failure.
*/
public val type: aws.sdk.kotlin.services.codepipeline.model.FailureType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codepipeline.model.FailureDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FailureDetails(")
append("externalExecutionId=$externalExecutionId,")
append("message=$message,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = externalExecutionId?.hashCode() ?: 0
result = 31 * result + (message.hashCode())
result = 31 * result + (type.hashCode())
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 FailureDetails
if (externalExecutionId != other.externalExecutionId) return false
if (message != other.message) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codepipeline.model.FailureDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The external ID of the run of the action that failed.
*/
public var externalExecutionId: kotlin.String? = null
/**
* The message about the failure.
*/
public var message: kotlin.String? = null
/**
* The type of the failure.
*/
public var type: aws.sdk.kotlin.services.codepipeline.model.FailureType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.FailureDetails) : this() {
this.externalExecutionId = x.externalExecutionId
this.message = x.message
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codepipeline.model.FailureDetails = FailureDetails(this)
internal fun correctErrors(): Builder {
if (message == null) message = ""
if (type == null) type = FailureType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy