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

commonMain.aws.sdk.kotlin.services.iotjobsdataplane.model.UpdateJobExecutionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iotjobsdataplane.model



public class UpdateJobExecutionRequest private constructor(builder: Builder) {
    /**
     * Optional. A number that identifies a particular job execution on a particular device.
     */
    public val executionNumber: kotlin.Long? = builder.executionNumber
    /**
     * Optional. The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
     */
    public val expectedVersion: kotlin.Long? = builder.expectedVersion
    /**
     * Optional. When set to true, the response contains the job document. The default is false.
     */
    public val includeJobDocument: kotlin.Boolean? = builder.includeJobDocument
    /**
     * Optional. When included and set to true, the response contains the JobExecutionState data. The default is false.
     */
    public val includeJobExecutionState: kotlin.Boolean? = builder.includeJobExecutionState
    /**
     * The unique identifier assigned to this job when it was created.
     */
    public val jobId: kotlin.String? = builder.jobId
    /**
     * The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED). This must be specified on every update.
     */
    public val status: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionStatus? = builder.status
    /**
     * Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
     */
    public val statusDetails: Map? = builder.statusDetails
    /**
     * Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling `UpdateJobExecution`, setting the status to `IN_PROGRESS` and specifying a new timeout value in this field) the job execution status will be automatically set to `TIMED_OUT`. Note that setting or resetting this timeout has no effect on that job execution timeout which may have been specified when the job was created (`CreateJob` using field `timeoutConfig`).
     */
    public val stepTimeoutInMinutes: kotlin.Long? = builder.stepTimeoutInMinutes
    /**
     * The name of the thing associated with the device.
     */
    public val thingName: kotlin.String? = builder.thingName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateJobExecutionRequest(")
        append("executionNumber=$executionNumber,")
        append("expectedVersion=$expectedVersion,")
        append("includeJobDocument=$includeJobDocument,")
        append("includeJobExecutionState=$includeJobExecutionState,")
        append("jobId=$jobId,")
        append("status=$status,")
        append("statusDetails=$statusDetails,")
        append("stepTimeoutInMinutes=$stepTimeoutInMinutes,")
        append("thingName=$thingName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = executionNumber?.hashCode() ?: 0
        result = 31 * result + (expectedVersion?.hashCode() ?: 0)
        result = 31 * result + (includeJobDocument?.hashCode() ?: 0)
        result = 31 * result + (includeJobExecutionState?.hashCode() ?: 0)
        result = 31 * result + (jobId?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (statusDetails?.hashCode() ?: 0)
        result = 31 * result + (stepTimeoutInMinutes?.hashCode() ?: 0)
        result = 31 * result + (thingName?.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 UpdateJobExecutionRequest

        if (executionNumber != other.executionNumber) return false
        if (expectedVersion != other.expectedVersion) return false
        if (includeJobDocument != other.includeJobDocument) return false
        if (includeJobExecutionState != other.includeJobExecutionState) return false
        if (jobId != other.jobId) return false
        if (status != other.status) return false
        if (statusDetails != other.statusDetails) return false
        if (stepTimeoutInMinutes != other.stepTimeoutInMinutes) return false
        if (thingName != other.thingName) return false

        return true
    }

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

    public class Builder {
        /**
         * Optional. A number that identifies a particular job execution on a particular device.
         */
        public var executionNumber: kotlin.Long? = null
        /**
         * Optional. The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
         */
        public var expectedVersion: kotlin.Long? = null
        /**
         * Optional. When set to true, the response contains the job document. The default is false.
         */
        public var includeJobDocument: kotlin.Boolean? = null
        /**
         * Optional. When included and set to true, the response contains the JobExecutionState data. The default is false.
         */
        public var includeJobExecutionState: kotlin.Boolean? = null
        /**
         * The unique identifier assigned to this job when it was created.
         */
        public var jobId: kotlin.String? = null
        /**
         * The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED). This must be specified on every update.
         */
        public var status: aws.sdk.kotlin.services.iotjobsdataplane.model.JobExecutionStatus? = null
        /**
         * Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
         */
        public var statusDetails: Map? = null
        /**
         * Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling `UpdateJobExecution`, setting the status to `IN_PROGRESS` and specifying a new timeout value in this field) the job execution status will be automatically set to `TIMED_OUT`. Note that setting or resetting this timeout has no effect on that job execution timeout which may have been specified when the job was created (`CreateJob` using field `timeoutConfig`).
         */
        public var stepTimeoutInMinutes: kotlin.Long? = null
        /**
         * The name of the thing associated with the device.
         */
        public var thingName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotjobsdataplane.model.UpdateJobExecutionRequest) : this() {
            this.executionNumber = x.executionNumber
            this.expectedVersion = x.expectedVersion
            this.includeJobDocument = x.includeJobDocument
            this.includeJobExecutionState = x.includeJobExecutionState
            this.jobId = x.jobId
            this.status = x.status
            this.statusDetails = x.statusDetails
            this.stepTimeoutInMinutes = x.stepTimeoutInMinutes
            this.thingName = x.thingName
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy