{-# 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 #-}
module Amazonka.Nimble.Types.StreamConfigurationCreate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.StreamingClipboardMode
import Amazonka.Nimble.Types.StreamingInstanceType
import qualified Amazonka.Prelude as Prelude
data StreamConfigurationCreate = StreamConfigurationCreate'
{
StreamConfigurationCreate -> Maybe Natural
maxSessionLengthInMinutes :: Prelude.Maybe Prelude.Natural,
StreamConfigurationCreate -> StreamingClipboardMode
clipboardMode :: StreamingClipboardMode,
StreamConfigurationCreate -> [Text]
streamingImageIds :: [Prelude.Text],
StreamConfigurationCreate -> NonEmpty StreamingInstanceType
ec2InstanceTypes :: Prelude.NonEmpty StreamingInstanceType
}
deriving (StreamConfigurationCreate -> StreamConfigurationCreate -> Bool
(StreamConfigurationCreate -> StreamConfigurationCreate -> Bool)
-> (StreamConfigurationCreate -> StreamConfigurationCreate -> Bool)
-> Eq StreamConfigurationCreate
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, ReadPrec [StreamConfigurationCreate]
ReadPrec StreamConfigurationCreate
Int -> ReadS StreamConfigurationCreate
ReadS [StreamConfigurationCreate]
(Int -> ReadS StreamConfigurationCreate)
-> ReadS [StreamConfigurationCreate]
-> ReadPrec StreamConfigurationCreate
-> ReadPrec [StreamConfigurationCreate]
-> Read StreamConfigurationCreate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamConfigurationCreate]
$creadListPrec :: ReadPrec [StreamConfigurationCreate]
readPrec :: ReadPrec StreamConfigurationCreate
$creadPrec :: ReadPrec StreamConfigurationCreate
readList :: ReadS [StreamConfigurationCreate]
$creadList :: ReadS [StreamConfigurationCreate]
readsPrec :: Int -> ReadS StreamConfigurationCreate
$creadsPrec :: Int -> ReadS StreamConfigurationCreate
Prelude.Read, Int -> StreamConfigurationCreate -> ShowS
[StreamConfigurationCreate] -> ShowS
StreamConfigurationCreate -> String
(Int -> StreamConfigurationCreate -> ShowS)
-> (StreamConfigurationCreate -> String)
-> ([StreamConfigurationCreate] -> ShowS)
-> Show StreamConfigurationCreate
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.
StreamConfigurationCreate -> Rep StreamConfigurationCreate x)
-> (forall x.
Rep StreamConfigurationCreate x -> StreamConfigurationCreate)
-> Generic StreamConfigurationCreate
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)
newStreamConfigurationCreate ::
StreamingClipboardMode ->
Prelude.NonEmpty StreamingInstanceType ->
StreamConfigurationCreate
newStreamConfigurationCreate :: StreamingClipboardMode
-> NonEmpty StreamingInstanceType -> StreamConfigurationCreate
newStreamConfigurationCreate
StreamingClipboardMode
pClipboardMode_
NonEmpty StreamingInstanceType
pEc2InstanceTypes_ =
StreamConfigurationCreate' :: Maybe Natural
-> StreamingClipboardMode
-> [Text]
-> NonEmpty StreamingInstanceType
-> StreamConfigurationCreate
StreamConfigurationCreate'
{ $sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: Maybe Natural
maxSessionLengthInMinutes =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:clipboardMode:StreamConfigurationCreate' :: StreamingClipboardMode
clipboardMode = StreamingClipboardMode
pClipboardMode_,
$sel:streamingImageIds:StreamConfigurationCreate' :: [Text]
streamingImageIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:ec2InstanceTypes:StreamConfigurationCreate' :: NonEmpty StreamingInstanceType
ec2InstanceTypes =
Tagged
(NonEmpty StreamingInstanceType)
(Identity (NonEmpty StreamingInstanceType))
-> Tagged
(NonEmpty StreamingInstanceType)
(Identity (NonEmpty StreamingInstanceType))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty StreamingInstanceType)
(Identity (NonEmpty StreamingInstanceType))
-> Tagged
(NonEmpty StreamingInstanceType)
(Identity (NonEmpty StreamingInstanceType)))
-> NonEmpty StreamingInstanceType -> NonEmpty StreamingInstanceType
forall t b. AReview t b -> b -> t
Lens.# NonEmpty StreamingInstanceType
pEc2InstanceTypes_
}
streamConfigurationCreate_maxSessionLengthInMinutes :: Lens.Lens' StreamConfigurationCreate (Prelude.Maybe Prelude.Natural)
streamConfigurationCreate_maxSessionLengthInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> StreamConfigurationCreate -> f StreamConfigurationCreate
streamConfigurationCreate_maxSessionLengthInMinutes = (StreamConfigurationCreate -> Maybe Natural)
-> (StreamConfigurationCreate
-> Maybe Natural -> StreamConfigurationCreate)
-> Lens
StreamConfigurationCreate
StreamConfigurationCreate
(Maybe Natural)
(Maybe Natural)
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)
streamConfigurationCreate_clipboardMode :: Lens.Lens' StreamConfigurationCreate StreamingClipboardMode
streamConfigurationCreate_clipboardMode :: (StreamingClipboardMode -> f StreamingClipboardMode)
-> StreamConfigurationCreate -> f StreamConfigurationCreate
streamConfigurationCreate_clipboardMode = (StreamConfigurationCreate -> StreamingClipboardMode)
-> (StreamConfigurationCreate
-> StreamingClipboardMode -> StreamConfigurationCreate)
-> Lens
StreamConfigurationCreate
StreamConfigurationCreate
StreamingClipboardMode
StreamingClipboardMode
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)
streamConfigurationCreate_streamingImageIds :: Lens.Lens' StreamConfigurationCreate [Prelude.Text]
streamConfigurationCreate_streamingImageIds :: ([Text] -> f [Text])
-> StreamConfigurationCreate -> f StreamConfigurationCreate
streamConfigurationCreate_streamingImageIds = (StreamConfigurationCreate -> [Text])
-> (StreamConfigurationCreate
-> [Text] -> StreamConfigurationCreate)
-> Lens
StreamConfigurationCreate StreamConfigurationCreate [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamConfigurationCreate' {[Text]
streamingImageIds :: [Text]
$sel:streamingImageIds:StreamConfigurationCreate' :: StreamConfigurationCreate -> [Text]
streamingImageIds} -> [Text]
streamingImageIds) (\s :: StreamConfigurationCreate
s@StreamConfigurationCreate' {} [Text]
a -> StreamConfigurationCreate
s {$sel:streamingImageIds:StreamConfigurationCreate' :: [Text]
streamingImageIds = [Text]
a} :: StreamConfigurationCreate) (([Text] -> f [Text])
-> StreamConfigurationCreate -> f StreamConfigurationCreate)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> StreamConfigurationCreate
-> f StreamConfigurationCreate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
streamConfigurationCreate_ec2InstanceTypes :: Lens.Lens' StreamConfigurationCreate (Prelude.NonEmpty StreamingInstanceType)
streamConfigurationCreate_ec2InstanceTypes :: (NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType))
-> StreamConfigurationCreate -> f StreamConfigurationCreate
streamConfigurationCreate_ec2InstanceTypes = (StreamConfigurationCreate -> NonEmpty StreamingInstanceType)
-> (StreamConfigurationCreate
-> NonEmpty StreamingInstanceType -> StreamConfigurationCreate)
-> Lens
StreamConfigurationCreate
StreamConfigurationCreate
(NonEmpty StreamingInstanceType)
(NonEmpty StreamingInstanceType)
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) ((NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType))
-> StreamConfigurationCreate -> f StreamConfigurationCreate)
-> ((NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType))
-> NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType))
-> (NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType))
-> StreamConfigurationCreate
-> f StreamConfigurationCreate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType))
-> NonEmpty StreamingInstanceType
-> f (NonEmpty StreamingInstanceType)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable StreamConfigurationCreate
instance Prelude.NFData StreamConfigurationCreate
instance Core.ToJSON StreamConfigurationCreate where
toJSON :: StreamConfigurationCreate -> Value
toJSON StreamConfigurationCreate' {[Text]
Maybe Natural
NonEmpty StreamingInstanceType
StreamingClipboardMode
ec2InstanceTypes :: NonEmpty StreamingInstanceType
streamingImageIds :: [Text]
clipboardMode :: StreamingClipboardMode
maxSessionLengthInMinutes :: Maybe Natural
$sel:ec2InstanceTypes:StreamConfigurationCreate' :: StreamConfigurationCreate -> NonEmpty StreamingInstanceType
$sel:streamingImageIds:StreamConfigurationCreate' :: StreamConfigurationCreate -> [Text]
$sel:clipboardMode:StreamConfigurationCreate' :: StreamConfigurationCreate -> StreamingClipboardMode
$sel:maxSessionLengthInMinutes:StreamConfigurationCreate' :: StreamConfigurationCreate -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"maxSessionLengthInMinutes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxSessionLengthInMinutes,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clipboardMode" Text -> StreamingClipboardMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= StreamingClipboardMode
clipboardMode),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"streamingImageIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
streamingImageIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ec2InstanceTypes" Text -> NonEmpty StreamingInstanceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty StreamingInstanceType
ec2InstanceTypes)
]
)