commonMain.aws.sdk.kotlin.services.nimble.model.StreamingSession.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nimble-jvm Show documentation
Show all versions of nimble-jvm Show documentation
The AWS SDK for Kotlin client for nimble
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.nimble.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A streaming session is a virtual workstation created using a particular launch profile.
*/
public class StreamingSession private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely identifies it. ARNs are unique across all Regions.
*/
public val arn: kotlin.String? = builder.arn
/**
* Indicates if a streaming session created from this launch profile should be terminated automatically or retained without termination after being in a `STOPPED` state.
* + When `ACTIVATED`, the streaming session is scheduled for termination after being in the `STOPPED` state for the time specified in `maxStoppedSessionLengthInMinutes`.
* + When `DEACTIVATED`, the streaming session can remain in the `STOPPED` state indefinitely.
*
* This parameter is only allowed when `sessionPersistenceMode` is `ACTIVATED`. When allowed, the default value for this parameter is `DEACTIVATED`.
*/
public val automaticTerminationMode: aws.sdk.kotlin.services.nimble.model.AutomaticTerminationMode? = builder.automaticTerminationMode
/**
* Shows the current backup setting of the session.
*/
public val backupMode: aws.sdk.kotlin.services.nimble.model.SessionBackupMode? = builder.backupMode
/**
* The ISO timestamp in seconds for when the resource was created.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
/**
* The user ID of the user that created the streaming session.
*/
public val createdBy: kotlin.String? = builder.createdBy
/**
* The EC2 Instance type used for the streaming session.
*/
public val ec2InstanceType: kotlin.String? = builder.ec2InstanceType
/**
* The ID of the launch profile used to control access from the streaming session.
*/
public val launchProfileId: kotlin.String? = builder.launchProfileId
/**
* The maximum number of backups of a streaming session that you can have. When the maximum number of backups is reached, the oldest backup is deleted.
*/
public val maxBackupsToRetain: kotlin.Int = builder.maxBackupsToRetain
/**
* The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.
*/
public val ownedBy: kotlin.String? = builder.ownedBy
/**
* The session ID.
*/
public val sessionId: kotlin.String? = builder.sessionId
/**
* Determine if a streaming session created from this launch profile can configure persistent storage. This means that `volumeConfiguration` and `automaticTerminationMode` are configured.
*/
public val sessionPersistenceMode: aws.sdk.kotlin.services.nimble.model.SessionPersistenceMode? = builder.sessionPersistenceMode
/**
* The time the session entered `START_IN_PROGRESS` state.
*/
public val startedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startedAt
/**
* The user ID of the user that started the streaming session.
*/
public val startedBy: kotlin.String? = builder.startedBy
/**
* The backup ID used to restore a streaming session.
*/
public val startedFromBackupId: kotlin.String? = builder.startedFromBackupId
/**
* The current state.
*/
public val state: aws.sdk.kotlin.services.nimble.model.StreamingSessionState? = builder.state
/**
* The status code.
*/
public val statusCode: aws.sdk.kotlin.services.nimble.model.StreamingSessionStatusCode? = builder.statusCode
/**
* The status message for the streaming session.
*/
public val statusMessage: kotlin.String? = builder.statusMessage
/**
* The time the streaming session will automatically be stopped if the user doesn’t stop the session themselves.
*/
public val stopAt: aws.smithy.kotlin.runtime.time.Instant? = builder.stopAt
/**
* The time the session entered `STOP_IN_PROGRESS` state.
*/
public val stoppedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.stoppedAt
/**
* The user ID of the user that stopped the streaming session.
*/
public val stoppedBy: kotlin.String? = builder.stoppedBy
/**
* The ID of the streaming image.
*/
public val streamingImageId: kotlin.String? = builder.streamingImageId
/**
* A collection of labels, in the form of key-value pairs, that apply to this resource.
*/
public val tags: Map? = builder.tags
/**
* The time the streaming session will automatically terminate if not terminated by the user.
*/
public val terminateAt: aws.smithy.kotlin.runtime.time.Instant? = builder.terminateAt
/**
* The ISO timestamp in seconds for when the resource was updated.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
/**
* The user ID of the user that most recently updated the resource.
*/
public val updatedBy: kotlin.String? = builder.updatedBy
/**
* Custom volume configuration for the root volumes that are attached to streaming sessions.
*
* This parameter is only allowed when `sessionPersistenceMode` is `ACTIVATED`.
*/
public val volumeConfiguration: aws.sdk.kotlin.services.nimble.model.VolumeConfiguration? = builder.volumeConfiguration
/**
* Determine if an EBS volume created from this streaming session will be backed up.
*/
public val volumeRetentionMode: aws.sdk.kotlin.services.nimble.model.VolumeRetentionMode? = builder.volumeRetentionMode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.nimble.model.StreamingSession = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StreamingSession(")
append("arn=$arn,")
append("automaticTerminationMode=$automaticTerminationMode,")
append("backupMode=$backupMode,")
append("createdAt=$createdAt,")
append("createdBy=$createdBy,")
append("ec2InstanceType=$ec2InstanceType,")
append("launchProfileId=$launchProfileId,")
append("maxBackupsToRetain=$maxBackupsToRetain,")
append("ownedBy=$ownedBy,")
append("sessionId=$sessionId,")
append("sessionPersistenceMode=$sessionPersistenceMode,")
append("startedAt=$startedAt,")
append("startedBy=$startedBy,")
append("startedFromBackupId=$startedFromBackupId,")
append("state=$state,")
append("statusCode=$statusCode,")
append("statusMessage=$statusMessage,")
append("stopAt=$stopAt,")
append("stoppedAt=$stoppedAt,")
append("stoppedBy=$stoppedBy,")
append("streamingImageId=$streamingImageId,")
append("tags=$tags,")
append("terminateAt=$terminateAt,")
append("updatedAt=$updatedAt,")
append("updatedBy=$updatedBy,")
append("volumeConfiguration=$volumeConfiguration,")
append("volumeRetentionMode=$volumeRetentionMode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (automaticTerminationMode?.hashCode() ?: 0)
result = 31 * result + (backupMode?.hashCode() ?: 0)
result = 31 * result + (createdAt?.hashCode() ?: 0)
result = 31 * result + (createdBy?.hashCode() ?: 0)
result = 31 * result + (ec2InstanceType?.hashCode() ?: 0)
result = 31 * result + (launchProfileId?.hashCode() ?: 0)
result = 31 * result + (maxBackupsToRetain)
result = 31 * result + (ownedBy?.hashCode() ?: 0)
result = 31 * result + (sessionId?.hashCode() ?: 0)
result = 31 * result + (sessionPersistenceMode?.hashCode() ?: 0)
result = 31 * result + (startedAt?.hashCode() ?: 0)
result = 31 * result + (startedBy?.hashCode() ?: 0)
result = 31 * result + (startedFromBackupId?.hashCode() ?: 0)
result = 31 * result + (state?.hashCode() ?: 0)
result = 31 * result + (statusCode?.hashCode() ?: 0)
result = 31 * result + (statusMessage?.hashCode() ?: 0)
result = 31 * result + (stopAt?.hashCode() ?: 0)
result = 31 * result + (stoppedAt?.hashCode() ?: 0)
result = 31 * result + (stoppedBy?.hashCode() ?: 0)
result = 31 * result + (streamingImageId?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (terminateAt?.hashCode() ?: 0)
result = 31 * result + (updatedAt?.hashCode() ?: 0)
result = 31 * result + (updatedBy?.hashCode() ?: 0)
result = 31 * result + (volumeConfiguration?.hashCode() ?: 0)
result = 31 * result + (volumeRetentionMode?.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 StreamingSession
if (arn != other.arn) return false
if (automaticTerminationMode != other.automaticTerminationMode) return false
if (backupMode != other.backupMode) return false
if (createdAt != other.createdAt) return false
if (createdBy != other.createdBy) return false
if (ec2InstanceType != other.ec2InstanceType) return false
if (launchProfileId != other.launchProfileId) return false
if (maxBackupsToRetain != other.maxBackupsToRetain) return false
if (ownedBy != other.ownedBy) return false
if (sessionId != other.sessionId) return false
if (sessionPersistenceMode != other.sessionPersistenceMode) return false
if (startedAt != other.startedAt) return false
if (startedBy != other.startedBy) return false
if (startedFromBackupId != other.startedFromBackupId) return false
if (state != other.state) return false
if (statusCode != other.statusCode) return false
if (statusMessage != other.statusMessage) return false
if (stopAt != other.stopAt) return false
if (stoppedAt != other.stoppedAt) return false
if (stoppedBy != other.stoppedBy) return false
if (streamingImageId != other.streamingImageId) return false
if (tags != other.tags) return false
if (terminateAt != other.terminateAt) return false
if (updatedAt != other.updatedAt) return false
if (updatedBy != other.updatedBy) return false
if (volumeConfiguration != other.volumeConfiguration) return false
if (volumeRetentionMode != other.volumeRetentionMode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.nimble.model.StreamingSession = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely identifies it. ARNs are unique across all Regions.
*/
public var arn: kotlin.String? = null
/**
* Indicates if a streaming session created from this launch profile should be terminated automatically or retained without termination after being in a `STOPPED` state.
* + When `ACTIVATED`, the streaming session is scheduled for termination after being in the `STOPPED` state for the time specified in `maxStoppedSessionLengthInMinutes`.
* + When `DEACTIVATED`, the streaming session can remain in the `STOPPED` state indefinitely.
*
* This parameter is only allowed when `sessionPersistenceMode` is `ACTIVATED`. When allowed, the default value for this parameter is `DEACTIVATED`.
*/
public var automaticTerminationMode: aws.sdk.kotlin.services.nimble.model.AutomaticTerminationMode? = null
/**
* Shows the current backup setting of the session.
*/
public var backupMode: aws.sdk.kotlin.services.nimble.model.SessionBackupMode? = null
/**
* The ISO timestamp in seconds for when the resource was created.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user ID of the user that created the streaming session.
*/
public var createdBy: kotlin.String? = null
/**
* The EC2 Instance type used for the streaming session.
*/
public var ec2InstanceType: kotlin.String? = null
/**
* The ID of the launch profile used to control access from the streaming session.
*/
public var launchProfileId: kotlin.String? = null
/**
* The maximum number of backups of a streaming session that you can have. When the maximum number of backups is reached, the oldest backup is deleted.
*/
public var maxBackupsToRetain: kotlin.Int = 0
/**
* The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.
*/
public var ownedBy: kotlin.String? = null
/**
* The session ID.
*/
public var sessionId: kotlin.String? = null
/**
* Determine if a streaming session created from this launch profile can configure persistent storage. This means that `volumeConfiguration` and `automaticTerminationMode` are configured.
*/
public var sessionPersistenceMode: aws.sdk.kotlin.services.nimble.model.SessionPersistenceMode? = null
/**
* The time the session entered `START_IN_PROGRESS` state.
*/
public var startedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user ID of the user that started the streaming session.
*/
public var startedBy: kotlin.String? = null
/**
* The backup ID used to restore a streaming session.
*/
public var startedFromBackupId: kotlin.String? = null
/**
* The current state.
*/
public var state: aws.sdk.kotlin.services.nimble.model.StreamingSessionState? = null
/**
* The status code.
*/
public var statusCode: aws.sdk.kotlin.services.nimble.model.StreamingSessionStatusCode? = null
/**
* The status message for the streaming session.
*/
public var statusMessage: kotlin.String? = null
/**
* The time the streaming session will automatically be stopped if the user doesn’t stop the session themselves.
*/
public var stopAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time the session entered `STOP_IN_PROGRESS` state.
*/
public var stoppedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user ID of the user that stopped the streaming session.
*/
public var stoppedBy: kotlin.String? = null
/**
* The ID of the streaming image.
*/
public var streamingImageId: kotlin.String? = null
/**
* A collection of labels, in the form of key-value pairs, that apply to this resource.
*/
public var tags: Map? = null
/**
* The time the streaming session will automatically terminate if not terminated by the user.
*/
public var terminateAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ISO timestamp in seconds for when the resource was updated.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user ID of the user that most recently updated the resource.
*/
public var updatedBy: kotlin.String? = null
/**
* Custom volume configuration for the root volumes that are attached to streaming sessions.
*
* This parameter is only allowed when `sessionPersistenceMode` is `ACTIVATED`.
*/
public var volumeConfiguration: aws.sdk.kotlin.services.nimble.model.VolumeConfiguration? = null
/**
* Determine if an EBS volume created from this streaming session will be backed up.
*/
public var volumeRetentionMode: aws.sdk.kotlin.services.nimble.model.VolumeRetentionMode? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.nimble.model.StreamingSession) : this() {
this.arn = x.arn
this.automaticTerminationMode = x.automaticTerminationMode
this.backupMode = x.backupMode
this.createdAt = x.createdAt
this.createdBy = x.createdBy
this.ec2InstanceType = x.ec2InstanceType
this.launchProfileId = x.launchProfileId
this.maxBackupsToRetain = x.maxBackupsToRetain
this.ownedBy = x.ownedBy
this.sessionId = x.sessionId
this.sessionPersistenceMode = x.sessionPersistenceMode
this.startedAt = x.startedAt
this.startedBy = x.startedBy
this.startedFromBackupId = x.startedFromBackupId
this.state = x.state
this.statusCode = x.statusCode
this.statusMessage = x.statusMessage
this.stopAt = x.stopAt
this.stoppedAt = x.stoppedAt
this.stoppedBy = x.stoppedBy
this.streamingImageId = x.streamingImageId
this.tags = x.tags
this.terminateAt = x.terminateAt
this.updatedAt = x.updatedAt
this.updatedBy = x.updatedBy
this.volumeConfiguration = x.volumeConfiguration
this.volumeRetentionMode = x.volumeRetentionMode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.nimble.model.StreamingSession = StreamingSession(this)
/**
* construct an [aws.sdk.kotlin.services.nimble.model.VolumeConfiguration] inside the given [block]
*/
public fun volumeConfiguration(block: aws.sdk.kotlin.services.nimble.model.VolumeConfiguration.Builder.() -> kotlin.Unit) {
this.volumeConfiguration = aws.sdk.kotlin.services.nimble.model.VolumeConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}