{-# 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.Signer.Types.SigningConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Signer.Types.EncryptionAlgorithmOptions
import Amazonka.Signer.Types.HashAlgorithmOptions
data SigningConfiguration = SigningConfiguration'
{
SigningConfiguration -> EncryptionAlgorithmOptions
encryptionAlgorithmOptions :: EncryptionAlgorithmOptions,
SigningConfiguration -> HashAlgorithmOptions
hashAlgorithmOptions :: HashAlgorithmOptions
}
deriving (SigningConfiguration -> SigningConfiguration -> Bool
(SigningConfiguration -> SigningConfiguration -> Bool)
-> (SigningConfiguration -> SigningConfiguration -> Bool)
-> Eq SigningConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigningConfiguration -> SigningConfiguration -> Bool
$c/= :: SigningConfiguration -> SigningConfiguration -> Bool
== :: SigningConfiguration -> SigningConfiguration -> Bool
$c== :: SigningConfiguration -> SigningConfiguration -> Bool
Prelude.Eq, ReadPrec [SigningConfiguration]
ReadPrec SigningConfiguration
Int -> ReadS SigningConfiguration
ReadS [SigningConfiguration]
(Int -> ReadS SigningConfiguration)
-> ReadS [SigningConfiguration]
-> ReadPrec SigningConfiguration
-> ReadPrec [SigningConfiguration]
-> Read SigningConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SigningConfiguration]
$creadListPrec :: ReadPrec [SigningConfiguration]
readPrec :: ReadPrec SigningConfiguration
$creadPrec :: ReadPrec SigningConfiguration
readList :: ReadS [SigningConfiguration]
$creadList :: ReadS [SigningConfiguration]
readsPrec :: Int -> ReadS SigningConfiguration
$creadsPrec :: Int -> ReadS SigningConfiguration
Prelude.Read, Int -> SigningConfiguration -> ShowS
[SigningConfiguration] -> ShowS
SigningConfiguration -> String
(Int -> SigningConfiguration -> ShowS)
-> (SigningConfiguration -> String)
-> ([SigningConfiguration] -> ShowS)
-> Show SigningConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigningConfiguration] -> ShowS
$cshowList :: [SigningConfiguration] -> ShowS
show :: SigningConfiguration -> String
$cshow :: SigningConfiguration -> String
showsPrec :: Int -> SigningConfiguration -> ShowS
$cshowsPrec :: Int -> SigningConfiguration -> ShowS
Prelude.Show, (forall x. SigningConfiguration -> Rep SigningConfiguration x)
-> (forall x. Rep SigningConfiguration x -> SigningConfiguration)
-> Generic SigningConfiguration
forall x. Rep SigningConfiguration x -> SigningConfiguration
forall x. SigningConfiguration -> Rep SigningConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SigningConfiguration x -> SigningConfiguration
$cfrom :: forall x. SigningConfiguration -> Rep SigningConfiguration x
Prelude.Generic)
newSigningConfiguration ::
EncryptionAlgorithmOptions ->
HashAlgorithmOptions ->
SigningConfiguration
newSigningConfiguration :: EncryptionAlgorithmOptions
-> HashAlgorithmOptions -> SigningConfiguration
newSigningConfiguration
EncryptionAlgorithmOptions
pEncryptionAlgorithmOptions_
HashAlgorithmOptions
pHashAlgorithmOptions_ =
SigningConfiguration' :: EncryptionAlgorithmOptions
-> HashAlgorithmOptions -> SigningConfiguration
SigningConfiguration'
{ $sel:encryptionAlgorithmOptions:SigningConfiguration' :: EncryptionAlgorithmOptions
encryptionAlgorithmOptions =
EncryptionAlgorithmOptions
pEncryptionAlgorithmOptions_,
$sel:hashAlgorithmOptions:SigningConfiguration' :: HashAlgorithmOptions
hashAlgorithmOptions = HashAlgorithmOptions
pHashAlgorithmOptions_
}
signingConfiguration_encryptionAlgorithmOptions :: Lens.Lens' SigningConfiguration EncryptionAlgorithmOptions
signingConfiguration_encryptionAlgorithmOptions :: (EncryptionAlgorithmOptions -> f EncryptionAlgorithmOptions)
-> SigningConfiguration -> f SigningConfiguration
signingConfiguration_encryptionAlgorithmOptions = (SigningConfiguration -> EncryptionAlgorithmOptions)
-> (SigningConfiguration
-> EncryptionAlgorithmOptions -> SigningConfiguration)
-> Lens
SigningConfiguration
SigningConfiguration
EncryptionAlgorithmOptions
EncryptionAlgorithmOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningConfiguration' {EncryptionAlgorithmOptions
encryptionAlgorithmOptions :: EncryptionAlgorithmOptions
$sel:encryptionAlgorithmOptions:SigningConfiguration' :: SigningConfiguration -> EncryptionAlgorithmOptions
encryptionAlgorithmOptions} -> EncryptionAlgorithmOptions
encryptionAlgorithmOptions) (\s :: SigningConfiguration
s@SigningConfiguration' {} EncryptionAlgorithmOptions
a -> SigningConfiguration
s {$sel:encryptionAlgorithmOptions:SigningConfiguration' :: EncryptionAlgorithmOptions
encryptionAlgorithmOptions = EncryptionAlgorithmOptions
a} :: SigningConfiguration)
signingConfiguration_hashAlgorithmOptions :: Lens.Lens' SigningConfiguration HashAlgorithmOptions
signingConfiguration_hashAlgorithmOptions :: (HashAlgorithmOptions -> f HashAlgorithmOptions)
-> SigningConfiguration -> f SigningConfiguration
signingConfiguration_hashAlgorithmOptions = (SigningConfiguration -> HashAlgorithmOptions)
-> (SigningConfiguration
-> HashAlgorithmOptions -> SigningConfiguration)
-> Lens
SigningConfiguration
SigningConfiguration
HashAlgorithmOptions
HashAlgorithmOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningConfiguration' {HashAlgorithmOptions
hashAlgorithmOptions :: HashAlgorithmOptions
$sel:hashAlgorithmOptions:SigningConfiguration' :: SigningConfiguration -> HashAlgorithmOptions
hashAlgorithmOptions} -> HashAlgorithmOptions
hashAlgorithmOptions) (\s :: SigningConfiguration
s@SigningConfiguration' {} HashAlgorithmOptions
a -> SigningConfiguration
s {$sel:hashAlgorithmOptions:SigningConfiguration' :: HashAlgorithmOptions
hashAlgorithmOptions = HashAlgorithmOptions
a} :: SigningConfiguration)
instance Core.FromJSON SigningConfiguration where
parseJSON :: Value -> Parser SigningConfiguration
parseJSON =
String
-> (Object -> Parser SigningConfiguration)
-> Value
-> Parser SigningConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SigningConfiguration"
( \Object
x ->
EncryptionAlgorithmOptions
-> HashAlgorithmOptions -> SigningConfiguration
SigningConfiguration'
(EncryptionAlgorithmOptions
-> HashAlgorithmOptions -> SigningConfiguration)
-> Parser EncryptionAlgorithmOptions
-> Parser (HashAlgorithmOptions -> SigningConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser EncryptionAlgorithmOptions
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"encryptionAlgorithmOptions")
Parser (HashAlgorithmOptions -> SigningConfiguration)
-> Parser HashAlgorithmOptions -> Parser SigningConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser HashAlgorithmOptions
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"hashAlgorithmOptions")
)
instance Prelude.Hashable SigningConfiguration
instance Prelude.NFData SigningConfiguration