{-# 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.HealthLake.Types.SseConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.HealthLake.Types.KmsEncryptionConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SseConfiguration = SseConfiguration'
{
SseConfiguration -> KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
}
deriving (SseConfiguration -> SseConfiguration -> Bool
(SseConfiguration -> SseConfiguration -> Bool)
-> (SseConfiguration -> SseConfiguration -> Bool)
-> Eq SseConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SseConfiguration -> SseConfiguration -> Bool
$c/= :: SseConfiguration -> SseConfiguration -> Bool
== :: SseConfiguration -> SseConfiguration -> Bool
$c== :: SseConfiguration -> SseConfiguration -> Bool
Prelude.Eq, ReadPrec [SseConfiguration]
ReadPrec SseConfiguration
Int -> ReadS SseConfiguration
ReadS [SseConfiguration]
(Int -> ReadS SseConfiguration)
-> ReadS [SseConfiguration]
-> ReadPrec SseConfiguration
-> ReadPrec [SseConfiguration]
-> Read SseConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SseConfiguration]
$creadListPrec :: ReadPrec [SseConfiguration]
readPrec :: ReadPrec SseConfiguration
$creadPrec :: ReadPrec SseConfiguration
readList :: ReadS [SseConfiguration]
$creadList :: ReadS [SseConfiguration]
readsPrec :: Int -> ReadS SseConfiguration
$creadsPrec :: Int -> ReadS SseConfiguration
Prelude.Read, Int -> SseConfiguration -> ShowS
[SseConfiguration] -> ShowS
SseConfiguration -> String
(Int -> SseConfiguration -> ShowS)
-> (SseConfiguration -> String)
-> ([SseConfiguration] -> ShowS)
-> Show SseConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SseConfiguration] -> ShowS
$cshowList :: [SseConfiguration] -> ShowS
show :: SseConfiguration -> String
$cshow :: SseConfiguration -> String
showsPrec :: Int -> SseConfiguration -> ShowS
$cshowsPrec :: Int -> SseConfiguration -> ShowS
Prelude.Show, (forall x. SseConfiguration -> Rep SseConfiguration x)
-> (forall x. Rep SseConfiguration x -> SseConfiguration)
-> Generic SseConfiguration
forall x. Rep SseConfiguration x -> SseConfiguration
forall x. SseConfiguration -> Rep SseConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SseConfiguration x -> SseConfiguration
$cfrom :: forall x. SseConfiguration -> Rep SseConfiguration x
Prelude.Generic)
newSseConfiguration ::
KmsEncryptionConfig ->
SseConfiguration
newSseConfiguration :: KmsEncryptionConfig -> SseConfiguration
newSseConfiguration KmsEncryptionConfig
pKmsEncryptionConfig_ =
SseConfiguration' :: KmsEncryptionConfig -> SseConfiguration
SseConfiguration'
{ $sel:kmsEncryptionConfig:SseConfiguration' :: KmsEncryptionConfig
kmsEncryptionConfig =
KmsEncryptionConfig
pKmsEncryptionConfig_
}
sseConfiguration_kmsEncryptionConfig :: Lens.Lens' SseConfiguration KmsEncryptionConfig
sseConfiguration_kmsEncryptionConfig :: (KmsEncryptionConfig -> f KmsEncryptionConfig)
-> SseConfiguration -> f SseConfiguration
sseConfiguration_kmsEncryptionConfig = (SseConfiguration -> KmsEncryptionConfig)
-> (SseConfiguration -> KmsEncryptionConfig -> SseConfiguration)
-> Lens
SseConfiguration
SseConfiguration
KmsEncryptionConfig
KmsEncryptionConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SseConfiguration' {KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
$sel:kmsEncryptionConfig:SseConfiguration' :: SseConfiguration -> KmsEncryptionConfig
kmsEncryptionConfig} -> KmsEncryptionConfig
kmsEncryptionConfig) (\s :: SseConfiguration
s@SseConfiguration' {} KmsEncryptionConfig
a -> SseConfiguration
s {$sel:kmsEncryptionConfig:SseConfiguration' :: KmsEncryptionConfig
kmsEncryptionConfig = KmsEncryptionConfig
a} :: SseConfiguration)
instance Core.FromJSON SseConfiguration where
parseJSON :: Value -> Parser SseConfiguration
parseJSON =
String
-> (Object -> Parser SseConfiguration)
-> Value
-> Parser SseConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SseConfiguration"
( \Object
x ->
KmsEncryptionConfig -> SseConfiguration
SseConfiguration'
(KmsEncryptionConfig -> SseConfiguration)
-> Parser KmsEncryptionConfig -> Parser SseConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser KmsEncryptionConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"KmsEncryptionConfig")
)
instance Prelude.Hashable SseConfiguration
instance Prelude.NFData SseConfiguration
instance Core.ToJSON SseConfiguration where
toJSON :: SseConfiguration -> Value
toJSON SseConfiguration' {KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
$sel:kmsEncryptionConfig:SseConfiguration' :: SseConfiguration -> KmsEncryptionConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"KmsEncryptionConfig" Text -> KmsEncryptionConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= KmsEncryptionConfig
kmsEncryptionConfig)
]
)