
commonMain.aws.sdk.kotlin.services.batch.model.TerminateJobRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* Contains the parameters for `TerminateJob`.
*/
public class TerminateJobRequest private constructor(builder: Builder) {
/**
* The Batch job ID of the job to terminate.
*/
public val jobId: kotlin.String? = builder.jobId
/**
* A message to attach to the job that explains the reason for canceling it. This message is returned by future DescribeJobs operations on the job. This message is also recorded in the Batch activity logs.
*/
public val reason: kotlin.String? = builder.reason
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.TerminateJobRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TerminateJobRequest(")
append("jobId=$jobId,")
append("reason=$reason")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = jobId?.hashCode() ?: 0
result = 31 * result + (reason?.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 TerminateJobRequest
if (jobId != other.jobId) return false
if (reason != other.reason) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.TerminateJobRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Batch job ID of the job to terminate.
*/
public var jobId: kotlin.String? = null
/**
* A message to attach to the job that explains the reason for canceling it. This message is returned by future DescribeJobs operations on the job. This message is also recorded in the Batch activity logs.
*/
public var reason: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.TerminateJobRequest) : this() {
this.jobId = x.jobId
this.reason = x.reason
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.TerminateJobRequest = TerminateJobRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy