{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Nimble.Types.StreamingSession
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Nimble.Types.StreamingSession where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types.AutomaticTerminationMode
import Amazonka.Nimble.Types.SessionBackupMode
import Amazonka.Nimble.Types.SessionPersistenceMode
import Amazonka.Nimble.Types.StreamingSessionState
import Amazonka.Nimble.Types.StreamingSessionStatusCode
import Amazonka.Nimble.Types.VolumeConfiguration
import Amazonka.Nimble.Types.VolumeRetentionMode
import qualified Amazonka.Prelude as Prelude

-- | A streaming session is a virtual workstation created using a particular
-- launch profile.
--
-- /See:/ 'newStreamingSession' smart constructor.
data StreamingSession = StreamingSession'
  { -- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
    -- uniquely identifies it. ARNs are unique across all Regions.
    StreamingSession -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | 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@.
    StreamingSession -> Maybe AutomaticTerminationMode
automaticTerminationMode :: Prelude.Maybe AutomaticTerminationMode,
    -- | Shows the current backup setting of the session.
    StreamingSession -> Maybe SessionBackupMode
backupMode :: Prelude.Maybe SessionBackupMode,
    -- | The ISO timestamp in seconds for when the resource was created.
    StreamingSession -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The user ID of the user that created the streaming session.
    StreamingSession -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The EC2 Instance type used for the streaming session.
    StreamingSession -> Maybe Text
ec2InstanceType :: Prelude.Maybe Prelude.Text,
    -- | The ID of the launch profile used to control access from the streaming
    -- session.
    StreamingSession -> Maybe Text
launchProfileId :: Prelude.Maybe Prelude.Text,
    -- | 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.
    StreamingSession -> Maybe Natural
maxBackupsToRetain :: Prelude.Maybe Prelude.Natural,
    -- | 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.
    StreamingSession -> Maybe Text
ownedBy :: Prelude.Maybe Prelude.Text,
    -- | The session ID.
    StreamingSession -> Maybe Text
sessionId :: Prelude.Maybe Prelude.Text,
    -- | Determine if a streaming session created from this launch profile can
    -- configure persistent storage. This means that @volumeConfiguration@ and
    -- @automaticTerminationMode@ are configured.
    StreamingSession -> Maybe SessionPersistenceMode
sessionPersistenceMode :: Prelude.Maybe SessionPersistenceMode,
    -- | The time the session entered @START_IN_PROGRESS@ state.
    StreamingSession -> Maybe ISO8601
startedAt :: Prelude.Maybe Data.ISO8601,
    -- | The user ID of the user that started the streaming session.
    StreamingSession -> Maybe Text
startedBy :: Prelude.Maybe Prelude.Text,
    -- | The backup ID used to restore a streaming session.
    StreamingSession -> Maybe Text
startedFromBackupId :: Prelude.Maybe Prelude.Text,
    -- | The current state.
    StreamingSession -> Maybe StreamingSessionState
state :: Prelude.Maybe StreamingSessionState,
    -- | The status code.
    StreamingSession -> Maybe StreamingSessionStatusCode
statusCode :: Prelude.Maybe StreamingSessionStatusCode,
    -- | The status message for the streaming session.
    StreamingSession -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The time the streaming session will automatically be stopped if the user
    -- doesn’t stop the session themselves.
    StreamingSession -> Maybe ISO8601
stopAt :: Prelude.Maybe Data.ISO8601,
    -- | The time the session entered @STOP_IN_PROGRESS@ state.
    StreamingSession -> Maybe ISO8601
stoppedAt :: Prelude.Maybe Data.ISO8601,
    -- | The user ID of the user that stopped the streaming session.
    StreamingSession -> Maybe Text
stoppedBy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the streaming image.
    StreamingSession -> Maybe Text
streamingImageId :: Prelude.Maybe Prelude.Text,
    -- | A collection of labels, in the form of key-value pairs, that apply to
    -- this resource.
    StreamingSession -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The time the streaming session will automatically terminate if not
    -- terminated by the user.
    StreamingSession -> Maybe ISO8601
terminateAt :: Prelude.Maybe Data.ISO8601,
    -- | The ISO timestamp in seconds for when the resource was updated.
    StreamingSession -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601,
    -- | The user ID of the user that most recently updated the resource.
    StreamingSession -> Maybe Text
updatedBy :: Prelude.Maybe Prelude.Text,
    -- | Custom volume configuration for the root volumes that are attached to
    -- streaming sessions.
    --
    -- This parameter is only allowed when @sessionPersistenceMode@ is
    -- @ACTIVATED@.
    StreamingSession -> Maybe VolumeConfiguration
volumeConfiguration :: Prelude.Maybe VolumeConfiguration,
    -- | Determine if an EBS volume created from this streaming session will be
    -- backed up.
    StreamingSession -> Maybe VolumeRetentionMode
volumeRetentionMode :: Prelude.Maybe VolumeRetentionMode
  }
  deriving (StreamingSession -> StreamingSession -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingSession -> StreamingSession -> Bool
$c/= :: StreamingSession -> StreamingSession -> Bool
== :: StreamingSession -> StreamingSession -> Bool
$c== :: StreamingSession -> StreamingSession -> Bool
Prelude.Eq, ReadPrec [StreamingSession]
ReadPrec StreamingSession
Int -> ReadS StreamingSession
ReadS [StreamingSession]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamingSession]
$creadListPrec :: ReadPrec [StreamingSession]
readPrec :: ReadPrec StreamingSession
$creadPrec :: ReadPrec StreamingSession
readList :: ReadS [StreamingSession]
$creadList :: ReadS [StreamingSession]
readsPrec :: Int -> ReadS StreamingSession
$creadsPrec :: Int -> ReadS StreamingSession
Prelude.Read, Int -> StreamingSession -> ShowS
[StreamingSession] -> ShowS
StreamingSession -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingSession] -> ShowS
$cshowList :: [StreamingSession] -> ShowS
show :: StreamingSession -> String
$cshow :: StreamingSession -> String
showsPrec :: Int -> StreamingSession -> ShowS
$cshowsPrec :: Int -> StreamingSession -> ShowS
Prelude.Show, forall x. Rep StreamingSession x -> StreamingSession
forall x. StreamingSession -> Rep StreamingSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamingSession x -> StreamingSession
$cfrom :: forall x. StreamingSession -> Rep StreamingSession x
Prelude.Generic)

-- |
-- Create a value of 'StreamingSession' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'streamingSession_arn' - The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
--
-- 'automaticTerminationMode', 'streamingSession_automaticTerminationMode' - 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@.
--
-- 'backupMode', 'streamingSession_backupMode' - Shows the current backup setting of the session.
--
-- 'createdAt', 'streamingSession_createdAt' - The ISO timestamp in seconds for when the resource was created.
--
-- 'createdBy', 'streamingSession_createdBy' - The user ID of the user that created the streaming session.
--
-- 'ec2InstanceType', 'streamingSession_ec2InstanceType' - The EC2 Instance type used for the streaming session.
--
-- 'launchProfileId', 'streamingSession_launchProfileId' - The ID of the launch profile used to control access from the streaming
-- session.
--
-- 'maxBackupsToRetain', 'streamingSession_maxBackupsToRetain' - 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.
--
-- 'ownedBy', 'streamingSession_ownedBy' - 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.
--
-- 'sessionId', 'streamingSession_sessionId' - The session ID.
--
-- 'sessionPersistenceMode', 'streamingSession_sessionPersistenceMode' - Determine if a streaming session created from this launch profile can
-- configure persistent storage. This means that @volumeConfiguration@ and
-- @automaticTerminationMode@ are configured.
--
-- 'startedAt', 'streamingSession_startedAt' - The time the session entered @START_IN_PROGRESS@ state.
--
-- 'startedBy', 'streamingSession_startedBy' - The user ID of the user that started the streaming session.
--
-- 'startedFromBackupId', 'streamingSession_startedFromBackupId' - The backup ID used to restore a streaming session.
--
-- 'state', 'streamingSession_state' - The current state.
--
-- 'statusCode', 'streamingSession_statusCode' - The status code.
--
-- 'statusMessage', 'streamingSession_statusMessage' - The status message for the streaming session.
--
-- 'stopAt', 'streamingSession_stopAt' - The time the streaming session will automatically be stopped if the user
-- doesn’t stop the session themselves.
--
-- 'stoppedAt', 'streamingSession_stoppedAt' - The time the session entered @STOP_IN_PROGRESS@ state.
--
-- 'stoppedBy', 'streamingSession_stoppedBy' - The user ID of the user that stopped the streaming session.
--
-- 'streamingImageId', 'streamingSession_streamingImageId' - The ID of the streaming image.
--
-- 'tags', 'streamingSession_tags' - A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
--
-- 'terminateAt', 'streamingSession_terminateAt' - The time the streaming session will automatically terminate if not
-- terminated by the user.
--
-- 'updatedAt', 'streamingSession_updatedAt' - The ISO timestamp in seconds for when the resource was updated.
--
-- 'updatedBy', 'streamingSession_updatedBy' - The user ID of the user that most recently updated the resource.
--
-- 'volumeConfiguration', 'streamingSession_volumeConfiguration' - Custom volume configuration for the root volumes that are attached to
-- streaming sessions.
--
-- This parameter is only allowed when @sessionPersistenceMode@ is
-- @ACTIVATED@.
--
-- 'volumeRetentionMode', 'streamingSession_volumeRetentionMode' - Determine if an EBS volume created from this streaming session will be
-- backed up.
newStreamingSession ::
  StreamingSession
newStreamingSession :: StreamingSession
newStreamingSession =
  StreamingSession'
    { $sel:arn:StreamingSession' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:automaticTerminationMode:StreamingSession' :: Maybe AutomaticTerminationMode
automaticTerminationMode = forall a. Maybe a
Prelude.Nothing,
      $sel:backupMode:StreamingSession' :: Maybe SessionBackupMode
backupMode = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:StreamingSession' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:StreamingSession' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceType:StreamingSession' :: Maybe Text
ec2InstanceType = forall a. Maybe a
Prelude.Nothing,
      $sel:launchProfileId:StreamingSession' :: Maybe Text
launchProfileId = forall a. Maybe a
Prelude.Nothing,
      $sel:maxBackupsToRetain:StreamingSession' :: Maybe Natural
maxBackupsToRetain = forall a. Maybe a
Prelude.Nothing,
      $sel:ownedBy:StreamingSession' :: Maybe Text
ownedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:sessionId:StreamingSession' :: Maybe Text
sessionId = forall a. Maybe a
Prelude.Nothing,
      $sel:sessionPersistenceMode:StreamingSession' :: Maybe SessionPersistenceMode
sessionPersistenceMode = forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:StreamingSession' :: Maybe ISO8601
startedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:startedBy:StreamingSession' :: Maybe Text
startedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:startedFromBackupId:StreamingSession' :: Maybe Text
startedFromBackupId = forall a. Maybe a
Prelude.Nothing,
      $sel:state:StreamingSession' :: Maybe StreamingSessionState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:StreamingSession' :: Maybe StreamingSessionStatusCode
statusCode = forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:StreamingSession' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:stopAt:StreamingSession' :: Maybe ISO8601
stopAt = forall a. Maybe a
Prelude.Nothing,
      $sel:stoppedAt:StreamingSession' :: Maybe ISO8601
stoppedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:stoppedBy:StreamingSession' :: Maybe Text
stoppedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:streamingImageId:StreamingSession' :: Maybe Text
streamingImageId = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StreamingSession' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:terminateAt:StreamingSession' :: Maybe ISO8601
terminateAt = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:StreamingSession' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedBy:StreamingSession' :: Maybe Text
updatedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeConfiguration:StreamingSession' :: Maybe VolumeConfiguration
volumeConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeRetentionMode:StreamingSession' :: Maybe VolumeRetentionMode
volumeRetentionMode = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
streamingSession_arn :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_arn :: Lens' StreamingSession (Maybe Text)
streamingSession_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
arn :: Maybe Text
$sel:arn:StreamingSession' :: StreamingSession -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:arn:StreamingSession' :: Maybe Text
arn = Maybe Text
a} :: StreamingSession)

-- | 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@.
streamingSession_automaticTerminationMode :: Lens.Lens' StreamingSession (Prelude.Maybe AutomaticTerminationMode)
streamingSession_automaticTerminationMode :: Lens' StreamingSession (Maybe AutomaticTerminationMode)
streamingSession_automaticTerminationMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe AutomaticTerminationMode
automaticTerminationMode :: Maybe AutomaticTerminationMode
$sel:automaticTerminationMode:StreamingSession' :: StreamingSession -> Maybe AutomaticTerminationMode
automaticTerminationMode} -> Maybe AutomaticTerminationMode
automaticTerminationMode) (\s :: StreamingSession
s@StreamingSession' {} Maybe AutomaticTerminationMode
a -> StreamingSession
s {$sel:automaticTerminationMode:StreamingSession' :: Maybe AutomaticTerminationMode
automaticTerminationMode = Maybe AutomaticTerminationMode
a} :: StreamingSession)

-- | Shows the current backup setting of the session.
streamingSession_backupMode :: Lens.Lens' StreamingSession (Prelude.Maybe SessionBackupMode)
streamingSession_backupMode :: Lens' StreamingSession (Maybe SessionBackupMode)
streamingSession_backupMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe SessionBackupMode
backupMode :: Maybe SessionBackupMode
$sel:backupMode:StreamingSession' :: StreamingSession -> Maybe SessionBackupMode
backupMode} -> Maybe SessionBackupMode
backupMode) (\s :: StreamingSession
s@StreamingSession' {} Maybe SessionBackupMode
a -> StreamingSession
s {$sel:backupMode:StreamingSession' :: Maybe SessionBackupMode
backupMode = Maybe SessionBackupMode
a} :: StreamingSession)

-- | The ISO timestamp in seconds for when the resource was created.
streamingSession_createdAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_createdAt :: Lens' StreamingSession (Maybe UTCTime)
streamingSession_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe ISO8601
a -> StreamingSession
s {$sel:createdAt:StreamingSession' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user ID of the user that created the streaming session.
streamingSession_createdBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_createdBy :: Lens' StreamingSession (Maybe Text)
streamingSession_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:StreamingSession' :: StreamingSession -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:createdBy:StreamingSession' :: Maybe Text
createdBy = Maybe Text
a} :: StreamingSession)

-- | The EC2 Instance type used for the streaming session.
streamingSession_ec2InstanceType :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_ec2InstanceType :: Lens' StreamingSession (Maybe Text)
streamingSession_ec2InstanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
ec2InstanceType :: Maybe Text
$sel:ec2InstanceType:StreamingSession' :: StreamingSession -> Maybe Text
ec2InstanceType} -> Maybe Text
ec2InstanceType) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:ec2InstanceType:StreamingSession' :: Maybe Text
ec2InstanceType = Maybe Text
a} :: StreamingSession)

-- | The ID of the launch profile used to control access from the streaming
-- session.
streamingSession_launchProfileId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_launchProfileId :: Lens' StreamingSession (Maybe Text)
streamingSession_launchProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
launchProfileId :: Maybe Text
$sel:launchProfileId:StreamingSession' :: StreamingSession -> Maybe Text
launchProfileId} -> Maybe Text
launchProfileId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:launchProfileId:StreamingSession' :: Maybe Text
launchProfileId = Maybe Text
a} :: StreamingSession)

-- | 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.
streamingSession_maxBackupsToRetain :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Natural)
streamingSession_maxBackupsToRetain :: Lens' StreamingSession (Maybe Natural)
streamingSession_maxBackupsToRetain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Natural
maxBackupsToRetain :: Maybe Natural
$sel:maxBackupsToRetain:StreamingSession' :: StreamingSession -> Maybe Natural
maxBackupsToRetain} -> Maybe Natural
maxBackupsToRetain) (\s :: StreamingSession
s@StreamingSession' {} Maybe Natural
a -> StreamingSession
s {$sel:maxBackupsToRetain:StreamingSession' :: Maybe Natural
maxBackupsToRetain = Maybe Natural
a} :: StreamingSession)

-- | 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.
streamingSession_ownedBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_ownedBy :: Lens' StreamingSession (Maybe Text)
streamingSession_ownedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
ownedBy :: Maybe Text
$sel:ownedBy:StreamingSession' :: StreamingSession -> Maybe Text
ownedBy} -> Maybe Text
ownedBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:ownedBy:StreamingSession' :: Maybe Text
ownedBy = Maybe Text
a} :: StreamingSession)

-- | The session ID.
streamingSession_sessionId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_sessionId :: Lens' StreamingSession (Maybe Text)
streamingSession_sessionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
sessionId :: Maybe Text
$sel:sessionId:StreamingSession' :: StreamingSession -> Maybe Text
sessionId} -> Maybe Text
sessionId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:sessionId:StreamingSession' :: Maybe Text
sessionId = Maybe Text
a} :: StreamingSession)

-- | Determine if a streaming session created from this launch profile can
-- configure persistent storage. This means that @volumeConfiguration@ and
-- @automaticTerminationMode@ are configured.
streamingSession_sessionPersistenceMode :: Lens.Lens' StreamingSession (Prelude.Maybe SessionPersistenceMode)
streamingSession_sessionPersistenceMode :: Lens' StreamingSession (Maybe SessionPersistenceMode)
streamingSession_sessionPersistenceMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe SessionPersistenceMode
sessionPersistenceMode :: Maybe SessionPersistenceMode
$sel:sessionPersistenceMode:StreamingSession' :: StreamingSession -> Maybe SessionPersistenceMode
sessionPersistenceMode} -> Maybe SessionPersistenceMode
sessionPersistenceMode) (\s :: StreamingSession
s@StreamingSession' {} Maybe SessionPersistenceMode
a -> StreamingSession
s {$sel:sessionPersistenceMode:StreamingSession' :: Maybe SessionPersistenceMode
sessionPersistenceMode = Maybe SessionPersistenceMode
a} :: StreamingSession)

-- | The time the session entered @START_IN_PROGRESS@ state.
streamingSession_startedAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_startedAt :: Lens' StreamingSession (Maybe UTCTime)
streamingSession_startedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe ISO8601
startedAt :: Maybe ISO8601
$sel:startedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
startedAt} -> Maybe ISO8601
startedAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe ISO8601
a -> StreamingSession
s {$sel:startedAt:StreamingSession' :: Maybe ISO8601
startedAt = Maybe ISO8601
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user ID of the user that started the streaming session.
streamingSession_startedBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_startedBy :: Lens' StreamingSession (Maybe Text)
streamingSession_startedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
startedBy :: Maybe Text
$sel:startedBy:StreamingSession' :: StreamingSession -> Maybe Text
startedBy} -> Maybe Text
startedBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:startedBy:StreamingSession' :: Maybe Text
startedBy = Maybe Text
a} :: StreamingSession)

-- | The backup ID used to restore a streaming session.
streamingSession_startedFromBackupId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_startedFromBackupId :: Lens' StreamingSession (Maybe Text)
streamingSession_startedFromBackupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
startedFromBackupId :: Maybe Text
$sel:startedFromBackupId:StreamingSession' :: StreamingSession -> Maybe Text
startedFromBackupId} -> Maybe Text
startedFromBackupId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:startedFromBackupId:StreamingSession' :: Maybe Text
startedFromBackupId = Maybe Text
a} :: StreamingSession)

-- | The current state.
streamingSession_state :: Lens.Lens' StreamingSession (Prelude.Maybe StreamingSessionState)
streamingSession_state :: Lens' StreamingSession (Maybe StreamingSessionState)
streamingSession_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe StreamingSessionState
state :: Maybe StreamingSessionState
$sel:state:StreamingSession' :: StreamingSession -> Maybe StreamingSessionState
state} -> Maybe StreamingSessionState
state) (\s :: StreamingSession
s@StreamingSession' {} Maybe StreamingSessionState
a -> StreamingSession
s {$sel:state:StreamingSession' :: Maybe StreamingSessionState
state = Maybe StreamingSessionState
a} :: StreamingSession)

-- | The status code.
streamingSession_statusCode :: Lens.Lens' StreamingSession (Prelude.Maybe StreamingSessionStatusCode)
streamingSession_statusCode :: Lens' StreamingSession (Maybe StreamingSessionStatusCode)
streamingSession_statusCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe StreamingSessionStatusCode
statusCode :: Maybe StreamingSessionStatusCode
$sel:statusCode:StreamingSession' :: StreamingSession -> Maybe StreamingSessionStatusCode
statusCode} -> Maybe StreamingSessionStatusCode
statusCode) (\s :: StreamingSession
s@StreamingSession' {} Maybe StreamingSessionStatusCode
a -> StreamingSession
s {$sel:statusCode:StreamingSession' :: Maybe StreamingSessionStatusCode
statusCode = Maybe StreamingSessionStatusCode
a} :: StreamingSession)

-- | The status message for the streaming session.
streamingSession_statusMessage :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_statusMessage :: Lens' StreamingSession (Maybe Text)
streamingSession_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:StreamingSession' :: StreamingSession -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:statusMessage:StreamingSession' :: Maybe Text
statusMessage = Maybe Text
a} :: StreamingSession)

-- | The time the streaming session will automatically be stopped if the user
-- doesn’t stop the session themselves.
streamingSession_stopAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_stopAt :: Lens' StreamingSession (Maybe UTCTime)
streamingSession_stopAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe ISO8601
stopAt :: Maybe ISO8601
$sel:stopAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
stopAt} -> Maybe ISO8601
stopAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe ISO8601
a -> StreamingSession
s {$sel:stopAt:StreamingSession' :: Maybe ISO8601
stopAt = Maybe ISO8601
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The time the session entered @STOP_IN_PROGRESS@ state.
streamingSession_stoppedAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_stoppedAt :: Lens' StreamingSession (Maybe UTCTime)
streamingSession_stoppedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe ISO8601
stoppedAt :: Maybe ISO8601
$sel:stoppedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
stoppedAt} -> Maybe ISO8601
stoppedAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe ISO8601
a -> StreamingSession
s {$sel:stoppedAt:StreamingSession' :: Maybe ISO8601
stoppedAt = Maybe ISO8601
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user ID of the user that stopped the streaming session.
streamingSession_stoppedBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_stoppedBy :: Lens' StreamingSession (Maybe Text)
streamingSession_stoppedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
stoppedBy :: Maybe Text
$sel:stoppedBy:StreamingSession' :: StreamingSession -> Maybe Text
stoppedBy} -> Maybe Text
stoppedBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:stoppedBy:StreamingSession' :: Maybe Text
stoppedBy = Maybe Text
a} :: StreamingSession)

-- | The ID of the streaming image.
streamingSession_streamingImageId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_streamingImageId :: Lens' StreamingSession (Maybe Text)
streamingSession_streamingImageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
streamingImageId :: Maybe Text
$sel:streamingImageId:StreamingSession' :: StreamingSession -> Maybe Text
streamingImageId} -> Maybe Text
streamingImageId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:streamingImageId:StreamingSession' :: Maybe Text
streamingImageId = Maybe Text
a} :: StreamingSession)

-- | A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
streamingSession_tags :: Lens.Lens' StreamingSession (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
streamingSession_tags :: Lens' StreamingSession (Maybe (HashMap Text Text))
streamingSession_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StreamingSession' :: StreamingSession -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StreamingSession
s@StreamingSession' {} Maybe (HashMap Text Text)
a -> StreamingSession
s {$sel:tags:StreamingSession' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time the streaming session will automatically terminate if not
-- terminated by the user.
streamingSession_terminateAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_terminateAt :: Lens' StreamingSession (Maybe UTCTime)
streamingSession_terminateAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe ISO8601
terminateAt :: Maybe ISO8601
$sel:terminateAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
terminateAt} -> Maybe ISO8601
terminateAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe ISO8601
a -> StreamingSession
s {$sel:terminateAt:StreamingSession' :: Maybe ISO8601
terminateAt = Maybe ISO8601
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ISO timestamp in seconds for when the resource was updated.
streamingSession_updatedAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_updatedAt :: Lens' StreamingSession (Maybe UTCTime)
streamingSession_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe ISO8601
a -> StreamingSession
s {$sel:updatedAt:StreamingSession' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: StreamingSession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user ID of the user that most recently updated the resource.
streamingSession_updatedBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_updatedBy :: Lens' StreamingSession (Maybe Text)
streamingSession_updatedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
updatedBy :: Maybe Text
$sel:updatedBy:StreamingSession' :: StreamingSession -> Maybe Text
updatedBy} -> Maybe Text
updatedBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:updatedBy:StreamingSession' :: Maybe Text
updatedBy = Maybe Text
a} :: StreamingSession)

-- | Custom volume configuration for the root volumes that are attached to
-- streaming sessions.
--
-- This parameter is only allowed when @sessionPersistenceMode@ is
-- @ACTIVATED@.
streamingSession_volumeConfiguration :: Lens.Lens' StreamingSession (Prelude.Maybe VolumeConfiguration)
streamingSession_volumeConfiguration :: Lens' StreamingSession (Maybe VolumeConfiguration)
streamingSession_volumeConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe VolumeConfiguration
volumeConfiguration :: Maybe VolumeConfiguration
$sel:volumeConfiguration:StreamingSession' :: StreamingSession -> Maybe VolumeConfiguration
volumeConfiguration} -> Maybe VolumeConfiguration
volumeConfiguration) (\s :: StreamingSession
s@StreamingSession' {} Maybe VolumeConfiguration
a -> StreamingSession
s {$sel:volumeConfiguration:StreamingSession' :: Maybe VolumeConfiguration
volumeConfiguration = Maybe VolumeConfiguration
a} :: StreamingSession)

-- | Determine if an EBS volume created from this streaming session will be
-- backed up.
streamingSession_volumeRetentionMode :: Lens.Lens' StreamingSession (Prelude.Maybe VolumeRetentionMode)
streamingSession_volumeRetentionMode :: Lens' StreamingSession (Maybe VolumeRetentionMode)
streamingSession_volumeRetentionMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe VolumeRetentionMode
volumeRetentionMode :: Maybe VolumeRetentionMode
$sel:volumeRetentionMode:StreamingSession' :: StreamingSession -> Maybe VolumeRetentionMode
volumeRetentionMode} -> Maybe VolumeRetentionMode
volumeRetentionMode) (\s :: StreamingSession
s@StreamingSession' {} Maybe VolumeRetentionMode
a -> StreamingSession
s {$sel:volumeRetentionMode:StreamingSession' :: Maybe VolumeRetentionMode
volumeRetentionMode = Maybe VolumeRetentionMode
a} :: StreamingSession)

instance Data.FromJSON StreamingSession where
  parseJSON :: Value -> Parser StreamingSession
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"StreamingSession"
      ( \Object
x ->
          Maybe Text
-> Maybe AutomaticTerminationMode
-> Maybe SessionBackupMode
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe SessionPersistenceMode
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionState
-> Maybe StreamingSessionStatusCode
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe Text
-> Maybe VolumeConfiguration
-> Maybe VolumeRetentionMode
-> StreamingSession
StreamingSession'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"automaticTerminationMode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"backupMode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ec2InstanceType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"launchProfileId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"maxBackupsToRetain")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ownedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sessionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sessionPersistenceMode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"startedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"startedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"startedFromBackupId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusMessage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stopAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stoppedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stoppedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"streamingImageId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"terminateAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"updatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"updatedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"volumeConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"volumeRetentionMode")
      )

instance Prelude.Hashable StreamingSession where
  hashWithSalt :: Int -> StreamingSession -> Int
hashWithSalt Int
_salt StreamingSession' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe AutomaticTerminationMode
Maybe SessionBackupMode
Maybe SessionPersistenceMode
Maybe StreamingSessionState
Maybe StreamingSessionStatusCode
Maybe VolumeConfiguration
Maybe VolumeRetentionMode
volumeRetentionMode :: Maybe VolumeRetentionMode
volumeConfiguration :: Maybe VolumeConfiguration
updatedBy :: Maybe Text
updatedAt :: Maybe ISO8601
terminateAt :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
streamingImageId :: Maybe Text
stoppedBy :: Maybe Text
stoppedAt :: Maybe ISO8601
stopAt :: Maybe ISO8601
statusMessage :: Maybe Text
statusCode :: Maybe StreamingSessionStatusCode
state :: Maybe StreamingSessionState
startedFromBackupId :: Maybe Text
startedBy :: Maybe Text
startedAt :: Maybe ISO8601
sessionPersistenceMode :: Maybe SessionPersistenceMode
sessionId :: Maybe Text
ownedBy :: Maybe Text
maxBackupsToRetain :: Maybe Natural
launchProfileId :: Maybe Text
ec2InstanceType :: Maybe Text
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
backupMode :: Maybe SessionBackupMode
automaticTerminationMode :: Maybe AutomaticTerminationMode
arn :: Maybe Text
$sel:volumeRetentionMode:StreamingSession' :: StreamingSession -> Maybe VolumeRetentionMode
$sel:volumeConfiguration:StreamingSession' :: StreamingSession -> Maybe VolumeConfiguration
$sel:updatedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:updatedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:terminateAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:tags:StreamingSession' :: StreamingSession -> Maybe (HashMap Text Text)
$sel:streamingImageId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:stoppedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:stoppedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:stopAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:statusMessage:StreamingSession' :: StreamingSession -> Maybe Text
$sel:statusCode:StreamingSession' :: StreamingSession -> Maybe StreamingSessionStatusCode
$sel:state:StreamingSession' :: StreamingSession -> Maybe StreamingSessionState
$sel:startedFromBackupId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:startedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:startedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:sessionPersistenceMode:StreamingSession' :: StreamingSession -> Maybe SessionPersistenceMode
$sel:sessionId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:ownedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:maxBackupsToRetain:StreamingSession' :: StreamingSession -> Maybe Natural
$sel:launchProfileId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:ec2InstanceType:StreamingSession' :: StreamingSession -> Maybe Text
$sel:createdBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:createdAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:backupMode:StreamingSession' :: StreamingSession -> Maybe SessionBackupMode
$sel:automaticTerminationMode:StreamingSession' :: StreamingSession -> Maybe AutomaticTerminationMode
$sel:arn:StreamingSession' :: StreamingSession -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutomaticTerminationMode
automaticTerminationMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SessionBackupMode
backupMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ec2InstanceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
launchProfileId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxBackupsToRetain
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sessionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SessionPersistenceMode
sessionPersistenceMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
startedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
startedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
startedFromBackupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingSessionState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingSessionStatusCode
statusCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
stopAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
stoppedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stoppedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamingImageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
terminateAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
updatedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
updatedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VolumeConfiguration
volumeConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VolumeRetentionMode
volumeRetentionMode

instance Prelude.NFData StreamingSession where
  rnf :: StreamingSession -> ()
rnf StreamingSession' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe AutomaticTerminationMode
Maybe SessionBackupMode
Maybe SessionPersistenceMode
Maybe StreamingSessionState
Maybe StreamingSessionStatusCode
Maybe VolumeConfiguration
Maybe VolumeRetentionMode
volumeRetentionMode :: Maybe VolumeRetentionMode
volumeConfiguration :: Maybe VolumeConfiguration
updatedBy :: Maybe Text
updatedAt :: Maybe ISO8601
terminateAt :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
streamingImageId :: Maybe Text
stoppedBy :: Maybe Text
stoppedAt :: Maybe ISO8601
stopAt :: Maybe ISO8601
statusMessage :: Maybe Text
statusCode :: Maybe StreamingSessionStatusCode
state :: Maybe StreamingSessionState
startedFromBackupId :: Maybe Text
startedBy :: Maybe Text
startedAt :: Maybe ISO8601
sessionPersistenceMode :: Maybe SessionPersistenceMode
sessionId :: Maybe Text
ownedBy :: Maybe Text
maxBackupsToRetain :: Maybe Natural
launchProfileId :: Maybe Text
ec2InstanceType :: Maybe Text
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
backupMode :: Maybe SessionBackupMode
automaticTerminationMode :: Maybe AutomaticTerminationMode
arn :: Maybe Text
$sel:volumeRetentionMode:StreamingSession' :: StreamingSession -> Maybe VolumeRetentionMode
$sel:volumeConfiguration:StreamingSession' :: StreamingSession -> Maybe VolumeConfiguration
$sel:updatedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:updatedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:terminateAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:tags:StreamingSession' :: StreamingSession -> Maybe (HashMap Text Text)
$sel:streamingImageId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:stoppedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:stoppedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:stopAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:statusMessage:StreamingSession' :: StreamingSession -> Maybe Text
$sel:statusCode:StreamingSession' :: StreamingSession -> Maybe StreamingSessionStatusCode
$sel:state:StreamingSession' :: StreamingSession -> Maybe StreamingSessionState
$sel:startedFromBackupId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:startedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:startedAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:sessionPersistenceMode:StreamingSession' :: StreamingSession -> Maybe SessionPersistenceMode
$sel:sessionId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:ownedBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:maxBackupsToRetain:StreamingSession' :: StreamingSession -> Maybe Natural
$sel:launchProfileId:StreamingSession' :: StreamingSession -> Maybe Text
$sel:ec2InstanceType:StreamingSession' :: StreamingSession -> Maybe Text
$sel:createdBy:StreamingSession' :: StreamingSession -> Maybe Text
$sel:createdAt:StreamingSession' :: StreamingSession -> Maybe ISO8601
$sel:backupMode:StreamingSession' :: StreamingSession -> Maybe SessionBackupMode
$sel:automaticTerminationMode:StreamingSession' :: StreamingSession -> Maybe AutomaticTerminationMode
$sel:arn:StreamingSession' :: StreamingSession -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AutomaticTerminationMode
automaticTerminationMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SessionBackupMode
backupMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ec2InstanceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
launchProfileId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxBackupsToRetain
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sessionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SessionPersistenceMode
sessionPersistenceMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
startedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startedFromBackupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingSessionState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingSessionStatusCode
statusCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
stopAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
stoppedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stoppedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamingImageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
terminateAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
updatedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe VolumeConfiguration
volumeConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe VolumeRetentionMode
volumeRetentionMode