{-# 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.Glue.Types.ConnectionPasswordEncryption 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 ConnectionPasswordEncryption = ConnectionPasswordEncryption'
{
ConnectionPasswordEncryption -> Maybe Text
awsKmsKeyId :: Prelude.Maybe Prelude.Text,
ConnectionPasswordEncryption -> Bool
returnConnectionPasswordEncrypted :: Prelude.Bool
}
deriving (ConnectionPasswordEncryption
-> ConnectionPasswordEncryption -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionPasswordEncryption
-> ConnectionPasswordEncryption -> Bool
$c/= :: ConnectionPasswordEncryption
-> ConnectionPasswordEncryption -> Bool
== :: ConnectionPasswordEncryption
-> ConnectionPasswordEncryption -> Bool
$c== :: ConnectionPasswordEncryption
-> ConnectionPasswordEncryption -> Bool
Prelude.Eq, ReadPrec [ConnectionPasswordEncryption]
ReadPrec ConnectionPasswordEncryption
Int -> ReadS ConnectionPasswordEncryption
ReadS [ConnectionPasswordEncryption]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionPasswordEncryption]
$creadListPrec :: ReadPrec [ConnectionPasswordEncryption]
readPrec :: ReadPrec ConnectionPasswordEncryption
$creadPrec :: ReadPrec ConnectionPasswordEncryption
readList :: ReadS [ConnectionPasswordEncryption]
$creadList :: ReadS [ConnectionPasswordEncryption]
readsPrec :: Int -> ReadS ConnectionPasswordEncryption
$creadsPrec :: Int -> ReadS ConnectionPasswordEncryption
Prelude.Read, Int -> ConnectionPasswordEncryption -> ShowS
[ConnectionPasswordEncryption] -> ShowS
ConnectionPasswordEncryption -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionPasswordEncryption] -> ShowS
$cshowList :: [ConnectionPasswordEncryption] -> ShowS
show :: ConnectionPasswordEncryption -> String
$cshow :: ConnectionPasswordEncryption -> String
showsPrec :: Int -> ConnectionPasswordEncryption -> ShowS
$cshowsPrec :: Int -> ConnectionPasswordEncryption -> ShowS
Prelude.Show, forall x.
Rep ConnectionPasswordEncryption x -> ConnectionPasswordEncryption
forall x.
ConnectionPasswordEncryption -> Rep ConnectionPasswordEncryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConnectionPasswordEncryption x -> ConnectionPasswordEncryption
$cfrom :: forall x.
ConnectionPasswordEncryption -> Rep ConnectionPasswordEncryption x
Prelude.Generic)
newConnectionPasswordEncryption ::
Prelude.Bool ->
ConnectionPasswordEncryption
newConnectionPasswordEncryption :: Bool -> ConnectionPasswordEncryption
newConnectionPasswordEncryption
Bool
pReturnConnectionPasswordEncrypted_ =
ConnectionPasswordEncryption'
{ $sel:awsKmsKeyId:ConnectionPasswordEncryption' :: Maybe Text
awsKmsKeyId =
forall a. Maybe a
Prelude.Nothing,
$sel:returnConnectionPasswordEncrypted:ConnectionPasswordEncryption' :: Bool
returnConnectionPasswordEncrypted =
Bool
pReturnConnectionPasswordEncrypted_
}
connectionPasswordEncryption_awsKmsKeyId :: Lens.Lens' ConnectionPasswordEncryption (Prelude.Maybe Prelude.Text)
connectionPasswordEncryption_awsKmsKeyId :: Lens' ConnectionPasswordEncryption (Maybe Text)
connectionPasswordEncryption_awsKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionPasswordEncryption' {Maybe Text
awsKmsKeyId :: Maybe Text
$sel:awsKmsKeyId:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Maybe Text
awsKmsKeyId} -> Maybe Text
awsKmsKeyId) (\s :: ConnectionPasswordEncryption
s@ConnectionPasswordEncryption' {} Maybe Text
a -> ConnectionPasswordEncryption
s {$sel:awsKmsKeyId:ConnectionPasswordEncryption' :: Maybe Text
awsKmsKeyId = Maybe Text
a} :: ConnectionPasswordEncryption)
connectionPasswordEncryption_returnConnectionPasswordEncrypted :: Lens.Lens' ConnectionPasswordEncryption Prelude.Bool
connectionPasswordEncryption_returnConnectionPasswordEncrypted :: Lens' ConnectionPasswordEncryption Bool
connectionPasswordEncryption_returnConnectionPasswordEncrypted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionPasswordEncryption' {Bool
returnConnectionPasswordEncrypted :: Bool
$sel:returnConnectionPasswordEncrypted:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Bool
returnConnectionPasswordEncrypted} -> Bool
returnConnectionPasswordEncrypted) (\s :: ConnectionPasswordEncryption
s@ConnectionPasswordEncryption' {} Bool
a -> ConnectionPasswordEncryption
s {$sel:returnConnectionPasswordEncrypted:ConnectionPasswordEncryption' :: Bool
returnConnectionPasswordEncrypted = Bool
a} :: ConnectionPasswordEncryption)
instance Data.FromJSON ConnectionPasswordEncryption where
parseJSON :: Value -> Parser ConnectionPasswordEncryption
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConnectionPasswordEncryption"
( \Object
x ->
Maybe Text -> Bool -> ConnectionPasswordEncryption
ConnectionPasswordEncryption'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AwsKmsKeyId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ReturnConnectionPasswordEncrypted")
)
instance
Prelude.Hashable
ConnectionPasswordEncryption
where
hashWithSalt :: Int -> ConnectionPasswordEncryption -> Int
hashWithSalt Int
_salt ConnectionPasswordEncryption' {Bool
Maybe Text
returnConnectionPasswordEncrypted :: Bool
awsKmsKeyId :: Maybe Text
$sel:returnConnectionPasswordEncrypted:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Bool
$sel:awsKmsKeyId:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsKmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
returnConnectionPasswordEncrypted
instance Prelude.NFData ConnectionPasswordEncryption where
rnf :: ConnectionPasswordEncryption -> ()
rnf ConnectionPasswordEncryption' {Bool
Maybe Text
returnConnectionPasswordEncrypted :: Bool
awsKmsKeyId :: Maybe Text
$sel:returnConnectionPasswordEncrypted:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Bool
$sel:awsKmsKeyId:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsKmsKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
returnConnectionPasswordEncrypted
instance Data.ToJSON ConnectionPasswordEncryption where
toJSON :: ConnectionPasswordEncryption -> Value
toJSON ConnectionPasswordEncryption' {Bool
Maybe Text
returnConnectionPasswordEncrypted :: Bool
awsKmsKeyId :: Maybe Text
$sel:returnConnectionPasswordEncrypted:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Bool
$sel:awsKmsKeyId:ConnectionPasswordEncryption' :: ConnectionPasswordEncryption -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AwsKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
awsKmsKeyId,
forall a. a -> Maybe a
Prelude.Just
( Key
"ReturnConnectionPasswordEncrypted"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
returnConnectionPasswordEncrypted
)
]
)