commonMain.aws.sdk.kotlin.services.deadline.model.AssignedSessionAction.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
/**
* The action for a session defined by the session action ID.
*/
public class AssignedSessionAction private constructor(builder: Builder) {
/**
* The definition of the assigned session action.
*/
public val definition: aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition? = builder.definition
/**
* The session action ID for the assigned session.
*/
public val sessionActionId: kotlin.String = requireNotNull(builder.sessionActionId) { "A non-null value must be provided for sessionActionId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.AssignedSessionAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssignedSessionAction(")
append("definition=$definition,")
append("sessionActionId=$sessionActionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = definition?.hashCode() ?: 0
result = 31 * result + (sessionActionId.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 AssignedSessionAction
if (definition != other.definition) return false
if (sessionActionId != other.sessionActionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.AssignedSessionAction = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The definition of the assigned session action.
*/
public var definition: aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition? = null
/**
* The session action ID for the assigned session.
*/
public var sessionActionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.AssignedSessionAction) : this() {
this.definition = x.definition
this.sessionActionId = x.sessionActionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.AssignedSessionAction = AssignedSessionAction(this)
internal fun correctErrors(): Builder {
if (sessionActionId == null) sessionActionId = ""
return this
}
}
}