{-# 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.S3.Types.SSEKMS 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
import Amazonka.S3.Internal
data SSEKMS = SSEKMS'
{
SSEKMS -> Sensitive Text
keyId :: Data.Sensitive Prelude.Text
}
deriving (SSEKMS -> SSEKMS -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SSEKMS -> SSEKMS -> Bool
$c/= :: SSEKMS -> SSEKMS -> Bool
== :: SSEKMS -> SSEKMS -> Bool
$c== :: SSEKMS -> SSEKMS -> Bool
Prelude.Eq, Int -> SSEKMS -> ShowS
[SSEKMS] -> ShowS
SSEKMS -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SSEKMS] -> ShowS
$cshowList :: [SSEKMS] -> ShowS
show :: SSEKMS -> String
$cshow :: SSEKMS -> String
showsPrec :: Int -> SSEKMS -> ShowS
$cshowsPrec :: Int -> SSEKMS -> ShowS
Prelude.Show, forall x. Rep SSEKMS x -> SSEKMS
forall x. SSEKMS -> Rep SSEKMS x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SSEKMS x -> SSEKMS
$cfrom :: forall x. SSEKMS -> Rep SSEKMS x
Prelude.Generic)
newSSEKMS ::
Prelude.Text ->
SSEKMS
newSSEKMS :: Text -> SSEKMS
newSSEKMS Text
pKeyId_ =
SSEKMS' {$sel:keyId:SSEKMS' :: Sensitive Text
keyId = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pKeyId_}
ssekms_keyId :: Lens.Lens' SSEKMS Prelude.Text
ssekms_keyId :: Lens' SSEKMS Text
ssekms_keyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSEKMS' {Sensitive Text
keyId :: Sensitive Text
$sel:keyId:SSEKMS' :: SSEKMS -> Sensitive Text
keyId} -> Sensitive Text
keyId) (\s :: SSEKMS
s@SSEKMS' {} Sensitive Text
a -> SSEKMS
s {$sel:keyId:SSEKMS' :: Sensitive Text
keyId = Sensitive Text
a} :: SSEKMS) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance Data.FromXML SSEKMS where
parseXML :: [Node] -> Either String SSEKMS
parseXML [Node]
x = Sensitive Text -> SSEKMS
SSEKMS' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"KeyId")
instance Prelude.Hashable SSEKMS where
hashWithSalt :: Int -> SSEKMS -> Int
hashWithSalt Int
_salt SSEKMS' {Sensitive Text
keyId :: Sensitive Text
$sel:keyId:SSEKMS' :: SSEKMS -> Sensitive Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
keyId
instance Prelude.NFData SSEKMS where
rnf :: SSEKMS -> ()
rnf SSEKMS' {Sensitive Text
keyId :: Sensitive Text
$sel:keyId:SSEKMS' :: SSEKMS -> Sensitive Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
keyId
instance Data.ToXML SSEKMS where
toXML :: SSEKMS -> XML
toXML SSEKMS' {Sensitive Text
keyId :: Sensitive Text
$sel:keyId:SSEKMS' :: SSEKMS -> Sensitive Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"KeyId" forall a. ToXML a => Name -> a -> XML
Data.@= Sensitive Text
keyId]