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