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

commonMain.aws.sdk.kotlin.services.deadline.model.SessionActionDefinition.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 session action.
 */
public sealed class SessionActionDefinition {
    /**
     * The environment to enter into.
     */
    public data class EnvEnter(val value: aws.sdk.kotlin.services.deadline.model.EnvironmentEnterSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.SessionActionDefinition() {
    }

    /**
     * The environment to exit from.
     */
    public data class EnvExit(val value: aws.sdk.kotlin.services.deadline.model.EnvironmentExitSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.SessionActionDefinition() {
    }

    /**
     * The job attachments to sync with a session action.
     */
    public data class SyncInputJobAttachments(val value: aws.sdk.kotlin.services.deadline.model.SyncInputJobAttachmentsSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.SessionActionDefinition() {
    }

    /**
     * The task run in the session.
     */
    public data class TaskRun(val value: aws.sdk.kotlin.services.deadline.model.TaskRunSessionActionDefinition) : aws.sdk.kotlin.services.deadline.model.SessionActionDefinition() {
    }

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy