{-# 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.KMS.Types.XksProxyAuthenticationCredentialType 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 XksProxyAuthenticationCredentialType = XksProxyAuthenticationCredentialType'
{
XksProxyAuthenticationCredentialType -> Sensitive Text
accessKeyId :: Data.Sensitive Prelude.Text,
XksProxyAuthenticationCredentialType -> Sensitive Text
rawSecretAccessKey :: Data.Sensitive Prelude.Text
}
deriving (XksProxyAuthenticationCredentialType
-> XksProxyAuthenticationCredentialType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XksProxyAuthenticationCredentialType
-> XksProxyAuthenticationCredentialType -> Bool
$c/= :: XksProxyAuthenticationCredentialType
-> XksProxyAuthenticationCredentialType -> Bool
== :: XksProxyAuthenticationCredentialType
-> XksProxyAuthenticationCredentialType -> Bool
$c== :: XksProxyAuthenticationCredentialType
-> XksProxyAuthenticationCredentialType -> Bool
Prelude.Eq, Int -> XksProxyAuthenticationCredentialType -> ShowS
[XksProxyAuthenticationCredentialType] -> ShowS
XksProxyAuthenticationCredentialType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XksProxyAuthenticationCredentialType] -> ShowS
$cshowList :: [XksProxyAuthenticationCredentialType] -> ShowS
show :: XksProxyAuthenticationCredentialType -> String
$cshow :: XksProxyAuthenticationCredentialType -> String
showsPrec :: Int -> XksProxyAuthenticationCredentialType -> ShowS
$cshowsPrec :: Int -> XksProxyAuthenticationCredentialType -> ShowS
Prelude.Show, forall x.
Rep XksProxyAuthenticationCredentialType x
-> XksProxyAuthenticationCredentialType
forall x.
XksProxyAuthenticationCredentialType
-> Rep XksProxyAuthenticationCredentialType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep XksProxyAuthenticationCredentialType x
-> XksProxyAuthenticationCredentialType
$cfrom :: forall x.
XksProxyAuthenticationCredentialType
-> Rep XksProxyAuthenticationCredentialType x
Prelude.Generic)
newXksProxyAuthenticationCredentialType ::
Prelude.Text ->
Prelude.Text ->
XksProxyAuthenticationCredentialType
newXksProxyAuthenticationCredentialType :: Text -> Text -> XksProxyAuthenticationCredentialType
newXksProxyAuthenticationCredentialType
Text
pAccessKeyId_
Text
pRawSecretAccessKey_ =
XksProxyAuthenticationCredentialType'
{ $sel:accessKeyId:XksProxyAuthenticationCredentialType' :: Sensitive Text
accessKeyId =
forall a. Iso' (Sensitive a) a
Data._Sensitive
forall t b. AReview t b -> b -> t
Lens.# Text
pAccessKeyId_,
$sel:rawSecretAccessKey:XksProxyAuthenticationCredentialType' :: Sensitive Text
rawSecretAccessKey =
forall a. Iso' (Sensitive a) a
Data._Sensitive
forall t b. AReview t b -> b -> t
Lens.# Text
pRawSecretAccessKey_
}
xksProxyAuthenticationCredentialType_accessKeyId :: Lens.Lens' XksProxyAuthenticationCredentialType Prelude.Text
xksProxyAuthenticationCredentialType_accessKeyId :: Lens' XksProxyAuthenticationCredentialType Text
xksProxyAuthenticationCredentialType_accessKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XksProxyAuthenticationCredentialType' {Sensitive Text
accessKeyId :: Sensitive Text
$sel:accessKeyId:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
accessKeyId} -> Sensitive Text
accessKeyId) (\s :: XksProxyAuthenticationCredentialType
s@XksProxyAuthenticationCredentialType' {} Sensitive Text
a -> XksProxyAuthenticationCredentialType
s {$sel:accessKeyId:XksProxyAuthenticationCredentialType' :: Sensitive Text
accessKeyId = Sensitive Text
a} :: XksProxyAuthenticationCredentialType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
xksProxyAuthenticationCredentialType_rawSecretAccessKey :: Lens.Lens' XksProxyAuthenticationCredentialType Prelude.Text
xksProxyAuthenticationCredentialType_rawSecretAccessKey :: Lens' XksProxyAuthenticationCredentialType Text
xksProxyAuthenticationCredentialType_rawSecretAccessKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XksProxyAuthenticationCredentialType' {Sensitive Text
rawSecretAccessKey :: Sensitive Text
$sel:rawSecretAccessKey:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
rawSecretAccessKey} -> Sensitive Text
rawSecretAccessKey) (\s :: XksProxyAuthenticationCredentialType
s@XksProxyAuthenticationCredentialType' {} Sensitive Text
a -> XksProxyAuthenticationCredentialType
s {$sel:rawSecretAccessKey:XksProxyAuthenticationCredentialType' :: Sensitive Text
rawSecretAccessKey = Sensitive Text
a} :: XksProxyAuthenticationCredentialType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance
Prelude.Hashable
XksProxyAuthenticationCredentialType
where
hashWithSalt :: Int -> XksProxyAuthenticationCredentialType -> Int
hashWithSalt
Int
_salt
XksProxyAuthenticationCredentialType' {Sensitive Text
rawSecretAccessKey :: Sensitive Text
accessKeyId :: Sensitive Text
$sel:rawSecretAccessKey:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
$sel:accessKeyId:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
accessKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
rawSecretAccessKey
instance
Prelude.NFData
XksProxyAuthenticationCredentialType
where
rnf :: XksProxyAuthenticationCredentialType -> ()
rnf XksProxyAuthenticationCredentialType' {Sensitive Text
rawSecretAccessKey :: Sensitive Text
accessKeyId :: Sensitive Text
$sel:rawSecretAccessKey:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
$sel:accessKeyId:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
accessKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
rawSecretAccessKey
instance
Data.ToJSON
XksProxyAuthenticationCredentialType
where
toJSON :: XksProxyAuthenticationCredentialType -> Value
toJSON XksProxyAuthenticationCredentialType' {Sensitive Text
rawSecretAccessKey :: Sensitive Text
accessKeyId :: Sensitive Text
$sel:rawSecretAccessKey:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
$sel:accessKeyId:XksProxyAuthenticationCredentialType' :: XksProxyAuthenticationCredentialType -> Sensitive Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"AccessKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
accessKeyId),
forall a. a -> Maybe a
Prelude.Just
(Key
"RawSecretAccessKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
rawSecretAccessKey)
]
)