{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.HealthLake.Types.KmsEncryptionConfig
import qualified Amazonka.Prelude as Prelude
data SseConfiguration = SseConfiguration'
{
SseConfiguration -> KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
}
deriving (SseConfiguration -> SseConfiguration -> Bool
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]
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
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. 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'
{ $sel:kmsEncryptionConfig:SseConfiguration' :: KmsEncryptionConfig
kmsEncryptionConfig =
KmsEncryptionConfig
pKmsEncryptionConfig_
}
sseConfiguration_kmsEncryptionConfig :: Lens.Lens' SseConfiguration KmsEncryptionConfig
sseConfiguration_kmsEncryptionConfig :: Lens' SseConfiguration KmsEncryptionConfig
sseConfiguration_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 Data.FromJSON SseConfiguration where
parseJSON :: Value -> Parser SseConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SseConfiguration"
( \Object
x ->
KmsEncryptionConfig -> SseConfiguration
SseConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"KmsEncryptionConfig")
)
instance Prelude.Hashable SseConfiguration where
hashWithSalt :: Int -> SseConfiguration -> Int
hashWithSalt Int
_salt SseConfiguration' {KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
$sel:kmsEncryptionConfig:SseConfiguration' :: SseConfiguration -> KmsEncryptionConfig
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` KmsEncryptionConfig
kmsEncryptionConfig
instance Prelude.NFData SseConfiguration where
rnf :: SseConfiguration -> ()
rnf SseConfiguration' {KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
$sel:kmsEncryptionConfig:SseConfiguration' :: SseConfiguration -> KmsEncryptionConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf KmsEncryptionConfig
kmsEncryptionConfig
instance Data.ToJSON SseConfiguration where
toJSON :: SseConfiguration -> Value
toJSON SseConfiguration' {KmsEncryptionConfig
kmsEncryptionConfig :: KmsEncryptionConfig
$sel:kmsEncryptionConfig:SseConfiguration' :: SseConfiguration -> KmsEncryptionConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"KmsEncryptionConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= KmsEncryptionConfig
kmsEncryptionConfig)
]
)