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

commonMain.aws.sdk.kotlin.services.emrserverless.model.CancelJobRunResponse.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.emrserverless.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CancelJobRunResponse private constructor(builder: Builder) {
    /**
     * The output contains the application ID on which the job run is cancelled.
     */
    public val applicationId: kotlin.String = requireNotNull(builder.applicationId) { "A non-null value must be provided for applicationId" }
    /**
     * The output contains the ID of the cancelled job run.
     */
    public val jobRunId: kotlin.String = requireNotNull(builder.jobRunId) { "A non-null value must be provided for jobRunId" }

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

    override fun toString(): kotlin.String = buildString {
        append("CancelJobRunResponse(")
        append("applicationId=$applicationId,")
        append("jobRunId=$jobRunId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = applicationId.hashCode()
        result = 31 * result + (jobRunId.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 CancelJobRunResponse

        if (applicationId != other.applicationId) return false
        if (jobRunId != other.jobRunId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The output contains the application ID on which the job run is cancelled.
         */
        public var applicationId: kotlin.String? = null
        /**
         * The output contains the ID of the cancelled job run.
         */
        public var jobRunId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emrserverless.model.CancelJobRunResponse) : this() {
            this.applicationId = x.applicationId
            this.jobRunId = x.jobRunId
        }

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

        internal fun correctErrors(): Builder {
            if (applicationId == null) applicationId = ""
            if (jobRunId == null) jobRunId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy