commonMain.aws.sdk.kotlin.services.deadline.model.UpdateWorkerScheduleResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateWorkerScheduleResponse private constructor(builder: Builder) {
/**
* The assigned sessions to update.
*/
public val assignedSessions: Map = requireNotNull(builder.assignedSessions) { "A non-null value must be provided for assignedSessions" }
/**
* The session actions associated with the worker schedule to cancel.
*/
public val cancelSessionActions: Map> = requireNotNull(builder.cancelSessionActions) { "A non-null value must be provided for cancelSessionActions" }
/**
* The status to update the worker to.
*/
public val desiredWorkerStatus: aws.sdk.kotlin.services.deadline.model.DesiredWorkerStatus? = builder.desiredWorkerStatus
/**
* Updates the time interval (in seconds) for the schedule.
*/
public val updateIntervalSeconds: kotlin.Int = requireNotNull(builder.updateIntervalSeconds) { "A non-null value must be provided for updateIntervalSeconds" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.UpdateWorkerScheduleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateWorkerScheduleResponse(")
append("assignedSessions=$assignedSessions,")
append("cancelSessionActions=$cancelSessionActions,")
append("desiredWorkerStatus=$desiredWorkerStatus,")
append("updateIntervalSeconds=$updateIntervalSeconds")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assignedSessions.hashCode()
result = 31 * result + (cancelSessionActions.hashCode())
result = 31 * result + (desiredWorkerStatus?.hashCode() ?: 0)
result = 31 * result + (updateIntervalSeconds)
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 UpdateWorkerScheduleResponse
if (assignedSessions != other.assignedSessions) return false
if (cancelSessionActions != other.cancelSessionActions) return false
if (desiredWorkerStatus != other.desiredWorkerStatus) return false
if (updateIntervalSeconds != other.updateIntervalSeconds) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.UpdateWorkerScheduleResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The assigned sessions to update.
*/
public var assignedSessions: Map? = null
/**
* The session actions associated with the worker schedule to cancel.
*/
public var cancelSessionActions: Map>? = null
/**
* The status to update the worker to.
*/
public var desiredWorkerStatus: aws.sdk.kotlin.services.deadline.model.DesiredWorkerStatus? = null
/**
* Updates the time interval (in seconds) for the schedule.
*/
public var updateIntervalSeconds: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.UpdateWorkerScheduleResponse) : this() {
this.assignedSessions = x.assignedSessions
this.cancelSessionActions = x.cancelSessionActions
this.desiredWorkerStatus = x.desiredWorkerStatus
this.updateIntervalSeconds = x.updateIntervalSeconds
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.UpdateWorkerScheduleResponse = UpdateWorkerScheduleResponse(this)
internal fun correctErrors(): Builder {
if (assignedSessions == null) assignedSessions = emptyMap()
if (cancelSessionActions == null) cancelSessionActions = emptyMap()
if (updateIntervalSeconds == null) updateIntervalSeconds = 0
return this
}
}
}