{-# 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.StreamingSessionStorageRoot where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data StreamingSessionStorageRoot = StreamingSessionStorageRoot'
{
StreamingSessionStorageRoot -> Maybe (Sensitive Text)
linux :: Prelude.Maybe (Data.Sensitive Prelude.Text),
StreamingSessionStorageRoot -> Maybe (Sensitive Text)
windows :: Prelude.Maybe (Data.Sensitive Prelude.Text)
}
deriving (StreamingSessionStorageRoot -> StreamingSessionStorageRoot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingSessionStorageRoot -> StreamingSessionStorageRoot -> Bool
$c/= :: StreamingSessionStorageRoot -> StreamingSessionStorageRoot -> Bool
== :: StreamingSessionStorageRoot -> StreamingSessionStorageRoot -> Bool
$c== :: StreamingSessionStorageRoot -> StreamingSessionStorageRoot -> Bool
Prelude.Eq, Int -> StreamingSessionStorageRoot -> ShowS
[StreamingSessionStorageRoot] -> ShowS
StreamingSessionStorageRoot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingSessionStorageRoot] -> ShowS
$cshowList :: [StreamingSessionStorageRoot] -> ShowS
show :: StreamingSessionStorageRoot -> String
$cshow :: StreamingSessionStorageRoot -> String
showsPrec :: Int -> StreamingSessionStorageRoot -> ShowS
$cshowsPrec :: Int -> StreamingSessionStorageRoot -> ShowS
Prelude.Show, forall x.
Rep StreamingSessionStorageRoot x -> StreamingSessionStorageRoot
forall x.
StreamingSessionStorageRoot -> Rep StreamingSessionStorageRoot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StreamingSessionStorageRoot x -> StreamingSessionStorageRoot
$cfrom :: forall x.
StreamingSessionStorageRoot -> Rep StreamingSessionStorageRoot x
Prelude.Generic)
newStreamingSessionStorageRoot ::
StreamingSessionStorageRoot
newStreamingSessionStorageRoot :: StreamingSessionStorageRoot
newStreamingSessionStorageRoot =
StreamingSessionStorageRoot'
{ $sel:linux:StreamingSessionStorageRoot' :: Maybe (Sensitive Text)
linux =
forall a. Maybe a
Prelude.Nothing,
$sel:windows:StreamingSessionStorageRoot' :: Maybe (Sensitive Text)
windows = forall a. Maybe a
Prelude.Nothing
}
streamingSessionStorageRoot_linux :: Lens.Lens' StreamingSessionStorageRoot (Prelude.Maybe Prelude.Text)
streamingSessionStorageRoot_linux :: Lens' StreamingSessionStorageRoot (Maybe Text)
streamingSessionStorageRoot_linux = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStorageRoot' {Maybe (Sensitive Text)
linux :: Maybe (Sensitive Text)
$sel:linux:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
linux} -> Maybe (Sensitive Text)
linux) (\s :: StreamingSessionStorageRoot
s@StreamingSessionStorageRoot' {} Maybe (Sensitive Text)
a -> StreamingSessionStorageRoot
s {$sel:linux:StreamingSessionStorageRoot' :: Maybe (Sensitive Text)
linux = Maybe (Sensitive Text)
a} :: StreamingSessionStorageRoot) 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. Iso' (Sensitive a) a
Data._Sensitive
streamingSessionStorageRoot_windows :: Lens.Lens' StreamingSessionStorageRoot (Prelude.Maybe Prelude.Text)
streamingSessionStorageRoot_windows :: Lens' StreamingSessionStorageRoot (Maybe Text)
streamingSessionStorageRoot_windows = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStorageRoot' {Maybe (Sensitive Text)
windows :: Maybe (Sensitive Text)
$sel:windows:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
windows} -> Maybe (Sensitive Text)
windows) (\s :: StreamingSessionStorageRoot
s@StreamingSessionStorageRoot' {} Maybe (Sensitive Text)
a -> StreamingSessionStorageRoot
s {$sel:windows:StreamingSessionStorageRoot' :: Maybe (Sensitive Text)
windows = Maybe (Sensitive Text)
a} :: StreamingSessionStorageRoot) 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. Iso' (Sensitive a) a
Data._Sensitive
instance Data.FromJSON StreamingSessionStorageRoot where
parseJSON :: Value -> Parser StreamingSessionStorageRoot
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StreamingSessionStorageRoot"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> StreamingSessionStorageRoot
StreamingSessionStorageRoot'
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
"linux")
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
"windows")
)
instance Prelude.Hashable StreamingSessionStorageRoot where
hashWithSalt :: Int -> StreamingSessionStorageRoot -> Int
hashWithSalt Int
_salt StreamingSessionStorageRoot' {Maybe (Sensitive Text)
windows :: Maybe (Sensitive Text)
linux :: Maybe (Sensitive Text)
$sel:windows:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
$sel:linux:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
linux
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
windows
instance Prelude.NFData StreamingSessionStorageRoot where
rnf :: StreamingSessionStorageRoot -> ()
rnf StreamingSessionStorageRoot' {Maybe (Sensitive Text)
windows :: Maybe (Sensitive Text)
linux :: Maybe (Sensitive Text)
$sel:windows:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
$sel:linux:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
linux seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
windows
instance Data.ToJSON StreamingSessionStorageRoot where
toJSON :: StreamingSessionStorageRoot -> Value
toJSON StreamingSessionStorageRoot' {Maybe (Sensitive Text)
windows :: Maybe (Sensitive Text)
linux :: Maybe (Sensitive Text)
$sel:windows:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
$sel:linux:StreamingSessionStorageRoot' :: StreamingSessionStorageRoot -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"linux" 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 (Sensitive Text)
linux,
(Key
"windows" 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 (Sensitive Text)
windows
]
)