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

commonMain.aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.deadline.model



/**
 * The definition of the assigned session action.
 */
public sealed class AssignedSessionActionDefinition {
    /**
     * The environment a session starts on.
     */
    public data class EnvEnter(val value: aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentEnterSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition() {
    }

    /**
     * The environment a session exits from.
     */
    public data class EnvExit(val value: aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentExitSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition() {
    }

    /**
     * The job attachment to sync with an assigned session action.
     */
    public data class SyncInputJobAttachments(val value: aws.sdk.kotlin.services.deadline.model.AssignedSyncInputJobAttachmentsSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition() {
    }

    /**
     * The task run.
     */
    public data class TaskRun(val value: aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.deadline.model.AssignedSessionActionDefinition() {
    }

    /**
     * Casts this [AssignedSessionActionDefinition] as a [EnvEnter] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentEnterSessionActionDefinition] value. Throws an exception if the [AssignedSessionActionDefinition] is not a
     * [EnvEnter].
     */
    public fun asEnvEnter(): aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentEnterSessionActionDefinition = (this as AssignedSessionActionDefinition.EnvEnter).value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [EnvEnter] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentEnterSessionActionDefinition] value. Returns null if the [AssignedSessionActionDefinition] is not a [EnvEnter].
     */
    public fun asEnvEnterOrNull(): aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentEnterSessionActionDefinition? = (this as? AssignedSessionActionDefinition.EnvEnter)?.value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [EnvExit] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentExitSessionActionDefinition] value. Throws an exception if the [AssignedSessionActionDefinition] is not a
     * [EnvExit].
     */
    public fun asEnvExit(): aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentExitSessionActionDefinition = (this as AssignedSessionActionDefinition.EnvExit).value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [EnvExit] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentExitSessionActionDefinition] value. Returns null if the [AssignedSessionActionDefinition] is not a [EnvExit].
     */
    public fun asEnvExitOrNull(): aws.sdk.kotlin.services.deadline.model.AssignedEnvironmentExitSessionActionDefinition? = (this as? AssignedSessionActionDefinition.EnvExit)?.value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [SyncInputJobAttachments] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedSyncInputJobAttachmentsSessionActionDefinition] value. Throws an exception if the [AssignedSessionActionDefinition] is not a
     * [SyncInputJobAttachments].
     */
    public fun asSyncInputJobAttachments(): aws.sdk.kotlin.services.deadline.model.AssignedSyncInputJobAttachmentsSessionActionDefinition = (this as AssignedSessionActionDefinition.SyncInputJobAttachments).value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [SyncInputJobAttachments] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedSyncInputJobAttachmentsSessionActionDefinition] value. Returns null if the [AssignedSessionActionDefinition] is not a [SyncInputJobAttachments].
     */
    public fun asSyncInputJobAttachmentsOrNull(): aws.sdk.kotlin.services.deadline.model.AssignedSyncInputJobAttachmentsSessionActionDefinition? = (this as? AssignedSessionActionDefinition.SyncInputJobAttachments)?.value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [TaskRun] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition] value. Throws an exception if the [AssignedSessionActionDefinition] is not a
     * [TaskRun].
     */
    public fun asTaskRun(): aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition = (this as AssignedSessionActionDefinition.TaskRun).value

    /**
     * Casts this [AssignedSessionActionDefinition] as a [TaskRun] and retrieves its [aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition] value. Returns null if the [AssignedSessionActionDefinition] is not a [TaskRun].
     */
    public fun asTaskRunOrNull(): aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition? = (this as? AssignedSessionActionDefinition.TaskRun)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy