{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data EncryptionAtRest = EncryptionAtRest'
{
EncryptionAtRest -> Text
dataVolumeKMSKeyId :: Prelude.Text
}
deriving (EncryptionAtRest -> EncryptionAtRest -> Bool
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]
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
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. 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'
{ $sel:dataVolumeKMSKeyId:EncryptionAtRest' :: Text
dataVolumeKMSKeyId =
Text
pDataVolumeKMSKeyId_
}
encryptionAtRest_dataVolumeKMSKeyId :: Lens.Lens' EncryptionAtRest Prelude.Text
encryptionAtRest_dataVolumeKMSKeyId :: Lens' EncryptionAtRest Text
encryptionAtRest_dataVolumeKMSKeyId = 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 Data.FromJSON EncryptionAtRest where
parseJSON :: Value -> Parser EncryptionAtRest
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EncryptionAtRest"
( \Object
x ->
Text -> EncryptionAtRest
EncryptionAtRest'
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
"dataVolumeKMSKeyId")
)
instance Prelude.Hashable EncryptionAtRest where
hashWithSalt :: Int -> EncryptionAtRest -> Int
hashWithSalt Int
_salt EncryptionAtRest' {Text
dataVolumeKMSKeyId :: Text
$sel:dataVolumeKMSKeyId:EncryptionAtRest' :: EncryptionAtRest -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataVolumeKMSKeyId
instance Prelude.NFData EncryptionAtRest where
rnf :: EncryptionAtRest -> ()
rnf EncryptionAtRest' {Text
dataVolumeKMSKeyId :: Text
$sel:dataVolumeKMSKeyId:EncryptionAtRest' :: EncryptionAtRest -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
dataVolumeKMSKeyId
instance Data.ToJSON EncryptionAtRest where
toJSON :: EncryptionAtRest -> Value
toJSON EncryptionAtRest' {Text
dataVolumeKMSKeyId :: Text
$sel:dataVolumeKMSKeyId:EncryptionAtRest' :: EncryptionAtRest -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"dataVolumeKMSKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataVolumeKMSKeyId)
]
)