{-# 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.VoiceId.Types.ServerSideEncryptionConfiguration 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 ServerSideEncryptionConfiguration = ServerSideEncryptionConfiguration'
{
ServerSideEncryptionConfiguration -> Text
kmsKeyId :: Prelude.Text
}
deriving (ServerSideEncryptionConfiguration
-> ServerSideEncryptionConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerSideEncryptionConfiguration
-> ServerSideEncryptionConfiguration -> Bool
$c/= :: ServerSideEncryptionConfiguration
-> ServerSideEncryptionConfiguration -> Bool
== :: ServerSideEncryptionConfiguration
-> ServerSideEncryptionConfiguration -> Bool
$c== :: ServerSideEncryptionConfiguration
-> ServerSideEncryptionConfiguration -> Bool
Prelude.Eq, ReadPrec [ServerSideEncryptionConfiguration]
ReadPrec ServerSideEncryptionConfiguration
Int -> ReadS ServerSideEncryptionConfiguration
ReadS [ServerSideEncryptionConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServerSideEncryptionConfiguration]
$creadListPrec :: ReadPrec [ServerSideEncryptionConfiguration]
readPrec :: ReadPrec ServerSideEncryptionConfiguration
$creadPrec :: ReadPrec ServerSideEncryptionConfiguration
readList :: ReadS [ServerSideEncryptionConfiguration]
$creadList :: ReadS [ServerSideEncryptionConfiguration]
readsPrec :: Int -> ReadS ServerSideEncryptionConfiguration
$creadsPrec :: Int -> ReadS ServerSideEncryptionConfiguration
Prelude.Read, Int -> ServerSideEncryptionConfiguration -> ShowS
[ServerSideEncryptionConfiguration] -> ShowS
ServerSideEncryptionConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerSideEncryptionConfiguration] -> ShowS
$cshowList :: [ServerSideEncryptionConfiguration] -> ShowS
show :: ServerSideEncryptionConfiguration -> String
$cshow :: ServerSideEncryptionConfiguration -> String
showsPrec :: Int -> ServerSideEncryptionConfiguration -> ShowS
$cshowsPrec :: Int -> ServerSideEncryptionConfiguration -> ShowS
Prelude.Show, forall x.
Rep ServerSideEncryptionConfiguration x
-> ServerSideEncryptionConfiguration
forall x.
ServerSideEncryptionConfiguration
-> Rep ServerSideEncryptionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServerSideEncryptionConfiguration x
-> ServerSideEncryptionConfiguration
$cfrom :: forall x.
ServerSideEncryptionConfiguration
-> Rep ServerSideEncryptionConfiguration x
Prelude.Generic)
newServerSideEncryptionConfiguration ::
Prelude.Text ->
ServerSideEncryptionConfiguration
newServerSideEncryptionConfiguration :: Text -> ServerSideEncryptionConfiguration
newServerSideEncryptionConfiguration Text
pKmsKeyId_ =
ServerSideEncryptionConfiguration'
{ $sel:kmsKeyId:ServerSideEncryptionConfiguration' :: Text
kmsKeyId =
Text
pKmsKeyId_
}
serverSideEncryptionConfiguration_kmsKeyId :: Lens.Lens' ServerSideEncryptionConfiguration Prelude.Text
serverSideEncryptionConfiguration_kmsKeyId :: Lens' ServerSideEncryptionConfiguration Text
serverSideEncryptionConfiguration_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerSideEncryptionConfiguration' {Text
kmsKeyId :: Text
$sel:kmsKeyId:ServerSideEncryptionConfiguration' :: ServerSideEncryptionConfiguration -> Text
kmsKeyId} -> Text
kmsKeyId) (\s :: ServerSideEncryptionConfiguration
s@ServerSideEncryptionConfiguration' {} Text
a -> ServerSideEncryptionConfiguration
s {$sel:kmsKeyId:ServerSideEncryptionConfiguration' :: Text
kmsKeyId = Text
a} :: ServerSideEncryptionConfiguration)
instance
Data.FromJSON
ServerSideEncryptionConfiguration
where
parseJSON :: Value -> Parser ServerSideEncryptionConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServerSideEncryptionConfiguration"
( \Object
x ->
Text -> ServerSideEncryptionConfiguration
ServerSideEncryptionConfiguration'
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
"KmsKeyId")
)
instance
Prelude.Hashable
ServerSideEncryptionConfiguration
where
hashWithSalt :: Int -> ServerSideEncryptionConfiguration -> Int
hashWithSalt
Int
_salt
ServerSideEncryptionConfiguration' {Text
kmsKeyId :: Text
$sel:kmsKeyId:ServerSideEncryptionConfiguration' :: ServerSideEncryptionConfiguration -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
kmsKeyId
instance
Prelude.NFData
ServerSideEncryptionConfiguration
where
rnf :: ServerSideEncryptionConfiguration -> ()
rnf ServerSideEncryptionConfiguration' {Text
kmsKeyId :: Text
$sel:kmsKeyId:ServerSideEncryptionConfiguration' :: ServerSideEncryptionConfiguration -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
kmsKeyId
instance
Data.ToJSON
ServerSideEncryptionConfiguration
where
toJSON :: ServerSideEncryptionConfiguration -> Value
toJSON ServerSideEncryptionConfiguration' {Text
kmsKeyId :: Text
$sel:kmsKeyId:ServerSideEncryptionConfiguration' :: ServerSideEncryptionConfiguration -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"KmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
kmsKeyId)]
)