
commonMain.aws.sdk.kotlin.services.braket.model.CancelJobResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.braket.model
public class CancelJobResponse private constructor(builder: Builder) {
/**
* The status of the job cancellation request.
*/
public val cancellationStatus: aws.sdk.kotlin.services.braket.model.CancellationStatus = requireNotNull(builder.cancellationStatus) { "A non-null value must be provided for cancellationStatus" }
/**
* The ARN of the Amazon Braket job.
*/
public val jobArn: kotlin.String = requireNotNull(builder.jobArn) { "A non-null value must be provided for jobArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.braket.model.CancelJobResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CancelJobResponse(")
append("cancellationStatus=$cancellationStatus,")
append("jobArn=$jobArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cancellationStatus.hashCode()
result = 31 * result + (jobArn.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 CancelJobResponse
if (cancellationStatus != other.cancellationStatus) return false
if (jobArn != other.jobArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.braket.model.CancelJobResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The status of the job cancellation request.
*/
public var cancellationStatus: aws.sdk.kotlin.services.braket.model.CancellationStatus? = null
/**
* The ARN of the Amazon Braket job.
*/
public var jobArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.braket.model.CancelJobResponse) : this() {
this.cancellationStatus = x.cancellationStatus
this.jobArn = x.jobArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.braket.model.CancelJobResponse = CancelJobResponse(this)
internal fun correctErrors(): Builder {
if (cancellationStatus == null) cancellationStatus = CancellationStatus.SdkUnknown("no value provided")
if (jobArn == null) jobArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy