{-# 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.StreamConfigurationCreate
-- 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.StreamConfigurationCreate 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.SessionPersistenceMode
import Amazonka.Nimble.Types.StreamConfigurationSessionBackup
import Amazonka.Nimble.Types.StreamConfigurationSessionStorage
import Amazonka.Nimble.Types.StreamingClipboardMode
import Amazonka.Nimble.Types.StreamingInstanceType
import Amazonka.Nimble.Types.VolumeConfiguration
import qualified Amazonka.Prelude as Prelude

-- | Configuration for streaming workstations created using this launch
-- profile.
--
-- /See:/ 'newStreamConfigurationCreate' smart constructor.
data StreamConfigurationCreate = StreamConfigurationCreate'
  { -- | 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@.
    StreamConfigurationCreate -> Maybe AutomaticTerminationMode
automaticTerminationMode :: Prelude.Maybe AutomaticTerminationMode,
    -- | The length of time, in minutes, that a streaming session can be active
    -- before it is stopped or terminated. After this point, Nimble Studio
    -- automatically terminates or stops the session. The default length of
    -- time is 690 minutes, and the maximum length of time is 30 days.
    StreamConfigurationCreate -> Maybe Natural
maxSessionLengthInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | Integer that determines if you can start and stop your sessions and how
    -- long a session can stay in the @STOPPED@ state. The default value is 0.
    -- The maximum value is 5760.
    --
    -- This field is allowed only when @sessionPersistenceMode@ is @ACTIVATED@
    -- and @automaticTerminationMode@ is @ACTIVATED@.
    --
    -- If the value is set to 0, your sessions can’t be @STOPPED@. If you then
    -- call @StopStreamingSession@, the session fails. If the time that a
    -- session stays in the @READY@ state exceeds the
    -- @maxSessionLengthInMinutes@ value, the session will automatically be
    -- terminated (instead of @STOPPED@).
    --
    -- If the value is set to a positive number, the session can be stopped.
    -- You can call @StopStreamingSession@ to stop sessions in the @READY@
    -- state. If the time that a session stays in the @READY@ state exceeds the
    -- @maxSessionLengthInMinutes@ value, the session will automatically be
    -- stopped (instead of terminated).
    StreamConfigurationCreate -> Maybe Natural
maxStoppedSessionLengthInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | Configures how streaming sessions are backed up when launched from this
    -- launch profile.
    StreamConfigurationCreate -> Maybe StreamConfigurationSessionBackup
sessionBackup :: Prelude.Maybe StreamConfigurationSessionBackup,
    -- | Determine if a streaming session created from this launch profile can
    -- configure persistent storage. This means that @volumeConfiguration@ and
    -- @automaticTerminationMode@ are configured.
    StreamConfigurationCreate -> Maybe SessionPersistenceMode
sessionPersistenceMode :: Prelude.Maybe SessionPersistenceMode,
    -- | The upload storage for a streaming workstation that is created using
    -- this launch profile.
    StreamConfigurationCreate
-> Maybe StreamConfigurationSessionStorage
sessionStorage :: Prelude.Maybe StreamConfigurationSessionStorage,
    -- | Custom volume configuration for the root volumes that are attached to
    -- streaming sessions.
    --
    -- This parameter is only allowed when @sessionPersistenceMode@ is
    -- @ACTIVATED@.
    StreamConfigurationCreate -> Maybe VolumeConfiguration
volumeConfiguration :: Prelude.Maybe VolumeConfiguration,
    -- | Allows or deactivates the use of the system clipboard to copy and paste
    -- between the streaming session and streaming client.
    StreamConfigurationCreate -> StreamingClipboardMode
clipboardMode :: StreamingClipboardMode,
    -- | The EC2 instance types that users can select from when launching a
    -- streaming session with this launch profile.
    StreamConfigurationCreate -> NonEmpty StreamingInstanceType
ec2InstanceTypes :: Prelude.NonEmpty StreamingInstanceType,
    -- | The streaming images that users can select from when launching a
    -- streaming session with this launch profile.
    StreamConfigurationCreate -> NonEmpty Text
streamingImageIds :: Prelude.NonEmpty Prelude.Text
  }
  deriving (StreamConfigurationCreate -> StreamConfigurationCreate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamConfigurationCreate -> StreamConfigurationCreate -> Bool
$c/= :: StreamConfigurationCreate -> StreamConfigurationCreate -> Bool
== :: StreamConfigurationCreate -> StreamConfigurationCreate -> Bool
$c== :: StreamConfigurationCreate -> StreamConfigurationCreate -> Bool
Prelude.Eq, Int -> StreamConfigurationCreate -> ShowS
[StreamConfigurationCreate] -> ShowS
StreamConfigurationCreate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamConfigurationCreate] -> ShowS
$cshowList :: [StreamConfigurationCreate] -> ShowS
show :: StreamConfigurationCreate -> String
$cshow :: StreamConfigurationCreate -> String
showsPrec :: Int -> StreamConfigurationCreate -> ShowS
$cshowsPrec :: Int -> StreamConfigurationCreate -> ShowS
Prelude.Show, forall x.
Rep StreamConfigurationCreate x -> StreamConfigurationCreate
forall x.
StreamConfigurationCreate -> Rep StreamConfigurationCreate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StreamConfigurationCreate x -> StreamConfigurationCreate
$cfrom :: forall x.
StreamConfigurationCreate -> Rep StreamConfigurationCreate x
Prelude.Generic)

-- |
-- Create a value of 'StreamConfigurationCreate' 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:
--
-- 'automaticTerminationMode', 'streamConfigurationCreate_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@.
--
-- 'maxSessionLengthInMinutes', 'streamConfigurationCreate_maxSessionLengthInMinutes' - The length of time, in minutes, that a streaming session can be active
-- before it is stopped or terminated. After this point, Nimble Studio
-- automatically terminates or stops the session. The default length of
-- time is 690 minutes, and the maximum length of time is 30 days.
--
-- 'maxStoppedSessionLengthInMinutes', 'streamConfigurationCreate_maxStoppedSessionLengthInMinutes' - Integer that determines if you can start and stop your sessions and how
-- long a session can stay in the @STOPPED@ state. The default value is 0.
-- The maximum value is 5760.
--
-- This field is allowed only when @sessionPersistenceMode@ is @ACTIVATED@
-- and @automaticTerminationMode@ is @ACTIVATED@.
--
-- If the value is set to 0, your sessions can’t be @STOPPED@. If you then
-- call @StopStreamingSession@, the session fails. If the time that a
-- session stays in the @READY@ state exceeds the
-- @maxSessionLengthInMinutes@ value, the session will automatically be
-- terminated (instead of @STOPPED@).
--
-- If the value is set to a positive number, the session can be stopped.
-- You can call @StopStreamingSession@ to stop sessions in the @READY@
-- state. If the time that a session stays in the @READY@ state exceeds the
-- @maxSessionLengthInMinutes@ value, the session will automatically be
-- stopped (instead of terminated).
--
-- 'sessionBackup', 'streamConfigurationCreate_sessionBackup' - Configures how streaming sessions are backed up when launched from this
-- launch profile.
--
-- 'sessionPersistenceMode', 'streamConfigurationCreate_sessionPersistenceMode' - Determine if a streaming session created from this launch profile can
-- configure persistent storage. This means that @volumeConfiguration@ and
-- @automaticTerminationMode@ are configured.
--
-- 'sessionStorage', 'streamConfigurationCreate_sessionStorage' - The upload storage for a streaming workstation that is created using
-- this launch profile.
--
-- 'volumeConfiguration', 'streamConfigurationCreate_volumeConfiguration' - Custom volume configuration for the root volumes that are attached to
-- streaming sessions.
--
-- This parameter is only allowed when @sessionPersistenceMode@ is
-- @ACTIVATED@.
--
-- 'clipboardMode', 'streamConfigurationCreate_clipboardMode' - Allows or deactivates the use of the system clipboard to copy and paste
-- between the streaming session and streaming client.
--
-- 'ec2InstanceTypes', 'streamConfigurationCreate_ec2InstanceTypes' - The EC2 instance types that users can select from when launching a
-- streaming session with this launch profile.
--
-- 'streamingImageIds', 'streamConfigurationCreate_streamingImageIds' - The streaming images that users can select from when launching a
-- streaming session with this launch profile.
newStreamConfigurationCreate ::
  -- | 'clipboardMode'
  StreamingClipboardMode ->
  -- | 'ec2InstanceTypes'
  Prelude.NonEmpty StreamingInstanceType ->
  -- | 'streamingImageIds'
  Prelude.NonEmpty Prelude.Text ->
  StreamConfigurationCreate
newStreamConfigurationCreate :: StreamingClipboardMode
-> NonEmpty StreamingInstanceType
-> NonEmpty Text
-> StreamConfigurationCreate
newStreamConfigurationCreate
  StreamingClipboardMode
pClipboardMode_
  NonEmpty StreamingInstanceType
pEc2InstanceTypes_
  NonEmpty Text
pStreamingImageIds_ =
    StreamConfigurationCreate'
      { $sel:automaticTerminationMode:StreamConfigurationCreate' :: Maybe AutomaticTerminationMode
automaticTerminationMode =
          forall a. Maybe a
Prelude.Nothing,
        $sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: Maybe Natural
maxSessionLengthInMinutes = forall a. Maybe a
Prelude.Nothing,
        $sel:maxStoppedSessionLengthInMinutes:StreamConfigurationCreate' :: Maybe Natural
maxStoppedSessionLengthInMinutes =
          forall a. Maybe a
Prelude.Nothing,
        $sel:sessionBackup:StreamConfigurationCreate' :: Maybe StreamConfigurationSessionBackup
sessionBackup = forall a. Maybe a
Prelude.Nothing,
        $sel:sessionPersistenceMode:StreamConfigurationCreate' :: Maybe SessionPersistenceMode
sessionPersistenceMode = forall a. Maybe a
Prelude.Nothing,
        $sel:sessionStorage:StreamConfigurationCreate' :: Maybe StreamConfigurationSessionStorage
sessionStorage = forall a. Maybe a
Prelude.Nothing,
        $sel:volumeConfiguration:StreamConfigurationCreate' :: Maybe VolumeConfiguration
volumeConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:clipboardMode:StreamConfigurationCreate' :: StreamingClipboardMode
clipboardMode = StreamingClipboardMode
pClipboardMode_,
        $sel:ec2InstanceTypes:StreamConfigurationCreate' :: NonEmpty StreamingInstanceType
ec2InstanceTypes =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty StreamingInstanceType
pEc2InstanceTypes_,
        $sel:streamingImageIds:StreamConfigurationCreate' :: NonEmpty Text
streamingImageIds =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pStreamingImageIds_
      }

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

-- | The length of time, in minutes, that a streaming session can be active
-- before it is stopped or terminated. After this point, Nimble Studio
-- automatically terminates or stops the session. The default length of
-- time is 690 minutes, and the maximum length of time is 30 days.
streamConfigurationCreate_maxSessionLengthInMinutes :: Lens.Lens' StreamConfigurationCreate (Prelude.Maybe Prelude.Natural)
streamConfigurationCreate_maxSessionLengthInMinutes :: Lens' StreamConfigurationCreate (Maybe Natural)
streamConfigurationCreate_maxSessionLengthInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {Maybe Natural
maxSessionLengthInMinutes :: Maybe Natural
$sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
maxSessionLengthInMinutes} -> Maybe Natural
maxSessionLengthInMinutes) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} Maybe Natural
a -> StreamConfigurationCreate
s {$sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: Maybe Natural
maxSessionLengthInMinutes = Maybe Natural
a} :: StreamConfigurationCreate)

-- | Integer that determines if you can start and stop your sessions and how
-- long a session can stay in the @STOPPED@ state. The default value is 0.
-- The maximum value is 5760.
--
-- This field is allowed only when @sessionPersistenceMode@ is @ACTIVATED@
-- and @automaticTerminationMode@ is @ACTIVATED@.
--
-- If the value is set to 0, your sessions can’t be @STOPPED@. If you then
-- call @StopStreamingSession@, the session fails. If the time that a
-- session stays in the @READY@ state exceeds the
-- @maxSessionLengthInMinutes@ value, the session will automatically be
-- terminated (instead of @STOPPED@).
--
-- If the value is set to a positive number, the session can be stopped.
-- You can call @StopStreamingSession@ to stop sessions in the @READY@
-- state. If the time that a session stays in the @READY@ state exceeds the
-- @maxSessionLengthInMinutes@ value, the session will automatically be
-- stopped (instead of terminated).
streamConfigurationCreate_maxStoppedSessionLengthInMinutes :: Lens.Lens' StreamConfigurationCreate (Prelude.Maybe Prelude.Natural)
streamConfigurationCreate_maxStoppedSessionLengthInMinutes :: Lens' StreamConfigurationCreate (Maybe Natural)
streamConfigurationCreate_maxStoppedSessionLengthInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {Maybe Natural
maxStoppedSessionLengthInMinutes :: Maybe Natural
$sel:maxStoppedSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
maxStoppedSessionLengthInMinutes} -> Maybe Natural
maxStoppedSessionLengthInMinutes) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} Maybe Natural
a -> StreamConfigurationCreate
s {$sel:maxStoppedSessionLengthInMinutes:StreamConfigurationCreate' :: Maybe Natural
maxStoppedSessionLengthInMinutes = Maybe Natural
a} :: StreamConfigurationCreate)

-- | Configures how streaming sessions are backed up when launched from this
-- launch profile.
streamConfigurationCreate_sessionBackup :: Lens.Lens' StreamConfigurationCreate (Prelude.Maybe StreamConfigurationSessionBackup)
streamConfigurationCreate_sessionBackup :: Lens'
  StreamConfigurationCreate (Maybe StreamConfigurationSessionBackup)
streamConfigurationCreate_sessionBackup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {Maybe StreamConfigurationSessionBackup
sessionBackup :: Maybe StreamConfigurationSessionBackup
$sel:sessionBackup:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe StreamConfigurationSessionBackup
sessionBackup} -> Maybe StreamConfigurationSessionBackup
sessionBackup) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} Maybe StreamConfigurationSessionBackup
a -> StreamConfigurationCreate
s {$sel:sessionBackup:StreamConfigurationCreate' :: Maybe StreamConfigurationSessionBackup
sessionBackup = Maybe StreamConfigurationSessionBackup
a} :: StreamConfigurationCreate)

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

-- | The upload storage for a streaming workstation that is created using
-- this launch profile.
streamConfigurationCreate_sessionStorage :: Lens.Lens' StreamConfigurationCreate (Prelude.Maybe StreamConfigurationSessionStorage)
streamConfigurationCreate_sessionStorage :: Lens'
  StreamConfigurationCreate (Maybe StreamConfigurationSessionStorage)
streamConfigurationCreate_sessionStorage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {Maybe StreamConfigurationSessionStorage
sessionStorage :: Maybe StreamConfigurationSessionStorage
$sel:sessionStorage:StreamConfigurationCreate' :: StreamConfigurationCreate
-> Maybe StreamConfigurationSessionStorage
sessionStorage} -> Maybe StreamConfigurationSessionStorage
sessionStorage) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} Maybe StreamConfigurationSessionStorage
a -> StreamConfigurationCreate
s {$sel:sessionStorage:StreamConfigurationCreate' :: Maybe StreamConfigurationSessionStorage
sessionStorage = Maybe StreamConfigurationSessionStorage
a} :: StreamConfigurationCreate)

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

-- | Allows or deactivates the use of the system clipboard to copy and paste
-- between the streaming session and streaming client.
streamConfigurationCreate_clipboardMode :: Lens.Lens' StreamConfigurationCreate StreamingClipboardMode
streamConfigurationCreate_clipboardMode :: Lens' StreamConfigurationCreate StreamingClipboardMode
streamConfigurationCreate_clipboardMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {StreamingClipboardMode
clipboardMode :: StreamingClipboardMode
$sel:clipboardMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> StreamingClipboardMode
clipboardMode} -> StreamingClipboardMode
clipboardMode) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} StreamingClipboardMode
a -> StreamConfigurationCreate
s {$sel:clipboardMode:StreamConfigurationCreate' :: StreamingClipboardMode
clipboardMode = StreamingClipboardMode
a} :: StreamConfigurationCreate)

-- | The EC2 instance types that users can select from when launching a
-- streaming session with this launch profile.
streamConfigurationCreate_ec2InstanceTypes :: Lens.Lens' StreamConfigurationCreate (Prelude.NonEmpty StreamingInstanceType)
streamConfigurationCreate_ec2InstanceTypes :: Lens' StreamConfigurationCreate (NonEmpty StreamingInstanceType)
streamConfigurationCreate_ec2InstanceTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {NonEmpty StreamingInstanceType
ec2InstanceTypes :: NonEmpty StreamingInstanceType
$sel:ec2InstanceTypes:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty StreamingInstanceType
ec2InstanceTypes} -> NonEmpty StreamingInstanceType
ec2InstanceTypes) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} NonEmpty StreamingInstanceType
a -> StreamConfigurationCreate
s {$sel:ec2InstanceTypes:StreamConfigurationCreate' :: NonEmpty StreamingInstanceType
ec2InstanceTypes = NonEmpty StreamingInstanceType
a} :: StreamConfigurationCreate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The streaming images that users can select from when launching a
-- streaming session with this launch profile.
streamConfigurationCreate_streamingImageIds :: Lens.Lens' StreamConfigurationCreate (Prelude.NonEmpty Prelude.Text)
streamConfigurationCreate_streamingImageIds :: Lens' StreamConfigurationCreate (NonEmpty Text)
streamConfigurationCreate_streamingImageIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {NonEmpty Text
streamingImageIds :: NonEmpty Text
$sel:streamingImageIds:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty Text
streamingImageIds} -> NonEmpty Text
streamingImageIds) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} NonEmpty Text
a -> StreamConfigurationCreate
s {$sel:streamingImageIds:StreamConfigurationCreate' :: NonEmpty Text
streamingImageIds = NonEmpty Text
a} :: StreamConfigurationCreate) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.Hashable StreamConfigurationCreate where
  hashWithSalt :: Int -> StreamConfigurationCreate -> Int
hashWithSalt Int
_salt StreamConfigurationCreate' {Maybe Natural
Maybe AutomaticTerminationMode
Maybe SessionPersistenceMode
Maybe StreamConfigurationSessionBackup
Maybe StreamConfigurationSessionStorage
Maybe VolumeConfiguration
NonEmpty Text
NonEmpty StreamingInstanceType
StreamingClipboardMode
streamingImageIds :: NonEmpty Text
ec2InstanceTypes :: NonEmpty StreamingInstanceType
clipboardMode :: StreamingClipboardMode
volumeConfiguration :: Maybe VolumeConfiguration
sessionStorage :: Maybe StreamConfigurationSessionStorage
sessionPersistenceMode :: Maybe SessionPersistenceMode
sessionBackup :: Maybe StreamConfigurationSessionBackup
maxStoppedSessionLengthInMinutes :: Maybe Natural
maxSessionLengthInMinutes :: Maybe Natural
automaticTerminationMode :: Maybe AutomaticTerminationMode
$sel:streamingImageIds:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty Text
$sel:ec2InstanceTypes:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty StreamingInstanceType
$sel:clipboardMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> StreamingClipboardMode
$sel:volumeConfiguration:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe VolumeConfiguration
$sel:sessionStorage:StreamConfigurationCreate' :: StreamConfigurationCreate
-> Maybe StreamConfigurationSessionStorage
$sel:sessionPersistenceMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe SessionPersistenceMode
$sel:sessionBackup:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe StreamConfigurationSessionBackup
$sel:maxStoppedSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
$sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
$sel:automaticTerminationMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe AutomaticTerminationMode
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutomaticTerminationMode
automaticTerminationMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxSessionLengthInMinutes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxStoppedSessionLengthInMinutes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamConfigurationSessionBackup
sessionBackup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SessionPersistenceMode
sessionPersistenceMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamConfigurationSessionStorage
sessionStorage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VolumeConfiguration
volumeConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StreamingClipboardMode
clipboardMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty StreamingInstanceType
ec2InstanceTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
streamingImageIds

instance Prelude.NFData StreamConfigurationCreate where
  rnf :: StreamConfigurationCreate -> ()
rnf StreamConfigurationCreate' {Maybe Natural
Maybe AutomaticTerminationMode
Maybe SessionPersistenceMode
Maybe StreamConfigurationSessionBackup
Maybe StreamConfigurationSessionStorage
Maybe VolumeConfiguration
NonEmpty Text
NonEmpty StreamingInstanceType
StreamingClipboardMode
streamingImageIds :: NonEmpty Text
ec2InstanceTypes :: NonEmpty StreamingInstanceType
clipboardMode :: StreamingClipboardMode
volumeConfiguration :: Maybe VolumeConfiguration
sessionStorage :: Maybe StreamConfigurationSessionStorage
sessionPersistenceMode :: Maybe SessionPersistenceMode
sessionBackup :: Maybe StreamConfigurationSessionBackup
maxStoppedSessionLengthInMinutes :: Maybe Natural
maxSessionLengthInMinutes :: Maybe Natural
automaticTerminationMode :: Maybe AutomaticTerminationMode
$sel:streamingImageIds:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty Text
$sel:ec2InstanceTypes:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty StreamingInstanceType
$sel:clipboardMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> StreamingClipboardMode
$sel:volumeConfiguration:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe VolumeConfiguration
$sel:sessionStorage:StreamConfigurationCreate' :: StreamConfigurationCreate
-> Maybe StreamConfigurationSessionStorage
$sel:sessionPersistenceMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe SessionPersistenceMode
$sel:sessionBackup:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe StreamConfigurationSessionBackup
$sel:maxStoppedSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
$sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
$sel:automaticTerminationMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe AutomaticTerminationMode
..} =
    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 Natural
maxSessionLengthInMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxStoppedSessionLengthInMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamConfigurationSessionBackup
sessionBackup
      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 StreamConfigurationSessionStorage
sessionStorage
      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 StreamingClipboardMode
clipboardMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty StreamingInstanceType
ec2InstanceTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
streamingImageIds

instance Data.ToJSON StreamConfigurationCreate where
  toJSON :: StreamConfigurationCreate -> Value
toJSON StreamConfigurationCreate' {Maybe Natural
Maybe AutomaticTerminationMode
Maybe SessionPersistenceMode
Maybe StreamConfigurationSessionBackup
Maybe StreamConfigurationSessionStorage
Maybe VolumeConfiguration
NonEmpty Text
NonEmpty StreamingInstanceType
StreamingClipboardMode
streamingImageIds :: NonEmpty Text
ec2InstanceTypes :: NonEmpty StreamingInstanceType
clipboardMode :: StreamingClipboardMode
volumeConfiguration :: Maybe VolumeConfiguration
sessionStorage :: Maybe StreamConfigurationSessionStorage
sessionPersistenceMode :: Maybe SessionPersistenceMode
sessionBackup :: Maybe StreamConfigurationSessionBackup
maxStoppedSessionLengthInMinutes :: Maybe Natural
maxSessionLengthInMinutes :: Maybe Natural
automaticTerminationMode :: Maybe AutomaticTerminationMode
$sel:streamingImageIds:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty Text
$sel:ec2InstanceTypes:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty StreamingInstanceType
$sel:clipboardMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> StreamingClipboardMode
$sel:volumeConfiguration:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe VolumeConfiguration
$sel:sessionStorage:StreamConfigurationCreate' :: StreamConfigurationCreate
-> Maybe StreamConfigurationSessionStorage
$sel:sessionPersistenceMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe SessionPersistenceMode
$sel:sessionBackup:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe StreamConfigurationSessionBackup
$sel:maxStoppedSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
$sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
$sel:automaticTerminationMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe AutomaticTerminationMode
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"automaticTerminationMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutomaticTerminationMode
automaticTerminationMode,
            (Key
"maxSessionLengthInMinutes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxSessionLengthInMinutes,
            (Key
"maxStoppedSessionLengthInMinutes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxStoppedSessionLengthInMinutes,
            (Key
"sessionBackup" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StreamConfigurationSessionBackup
sessionBackup,
            (Key
"sessionPersistenceMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SessionPersistenceMode
sessionPersistenceMode,
            (Key
"sessionStorage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StreamConfigurationSessionStorage
sessionStorage,
            (Key
"volumeConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VolumeConfiguration
volumeConfiguration,
            forall a. a -> Maybe a
Prelude.Just (Key
"clipboardMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= StreamingClipboardMode
clipboardMode),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ec2InstanceTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty StreamingInstanceType
ec2InstanceTypes),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"streamingImageIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
streamingImageIds)
          ]
      )