{-# 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.TransformEncryption where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.MLUserDataEncryption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TransformEncryption = TransformEncryption'
{
TransformEncryption -> Maybe MLUserDataEncryption
mlUserDataEncryption :: Prelude.Maybe MLUserDataEncryption,
TransformEncryption -> Maybe Text
taskRunSecurityConfigurationName :: Prelude.Maybe Prelude.Text
}
deriving (TransformEncryption -> TransformEncryption -> Bool
(TransformEncryption -> TransformEncryption -> Bool)
-> (TransformEncryption -> TransformEncryption -> Bool)
-> Eq TransformEncryption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransformEncryption -> TransformEncryption -> Bool
$c/= :: TransformEncryption -> TransformEncryption -> Bool
== :: TransformEncryption -> TransformEncryption -> Bool
$c== :: TransformEncryption -> TransformEncryption -> Bool
Prelude.Eq, ReadPrec [TransformEncryption]
ReadPrec TransformEncryption
Int -> ReadS TransformEncryption
ReadS [TransformEncryption]
(Int -> ReadS TransformEncryption)
-> ReadS [TransformEncryption]
-> ReadPrec TransformEncryption
-> ReadPrec [TransformEncryption]
-> Read TransformEncryption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransformEncryption]
$creadListPrec :: ReadPrec [TransformEncryption]
readPrec :: ReadPrec TransformEncryption
$creadPrec :: ReadPrec TransformEncryption
readList :: ReadS [TransformEncryption]
$creadList :: ReadS [TransformEncryption]
readsPrec :: Int -> ReadS TransformEncryption
$creadsPrec :: Int -> ReadS TransformEncryption
Prelude.Read, Int -> TransformEncryption -> ShowS
[TransformEncryption] -> ShowS
TransformEncryption -> String
(Int -> TransformEncryption -> ShowS)
-> (TransformEncryption -> String)
-> ([TransformEncryption] -> ShowS)
-> Show TransformEncryption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransformEncryption] -> ShowS
$cshowList :: [TransformEncryption] -> ShowS
show :: TransformEncryption -> String
$cshow :: TransformEncryption -> String
showsPrec :: Int -> TransformEncryption -> ShowS
$cshowsPrec :: Int -> TransformEncryption -> ShowS
Prelude.Show, (forall x. TransformEncryption -> Rep TransformEncryption x)
-> (forall x. Rep TransformEncryption x -> TransformEncryption)
-> Generic TransformEncryption
forall x. Rep TransformEncryption x -> TransformEncryption
forall x. TransformEncryption -> Rep TransformEncryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransformEncryption x -> TransformEncryption
$cfrom :: forall x. TransformEncryption -> Rep TransformEncryption x
Prelude.Generic)
newTransformEncryption ::
TransformEncryption
newTransformEncryption :: TransformEncryption
newTransformEncryption =
TransformEncryption' :: Maybe MLUserDataEncryption -> Maybe Text -> TransformEncryption
TransformEncryption'
{ $sel:mlUserDataEncryption:TransformEncryption' :: Maybe MLUserDataEncryption
mlUserDataEncryption =
Maybe MLUserDataEncryption
forall a. Maybe a
Prelude.Nothing,
$sel:taskRunSecurityConfigurationName:TransformEncryption' :: Maybe Text
taskRunSecurityConfigurationName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
transformEncryption_mlUserDataEncryption :: Lens.Lens' TransformEncryption (Prelude.Maybe MLUserDataEncryption)
transformEncryption_mlUserDataEncryption :: (Maybe MLUserDataEncryption -> f (Maybe MLUserDataEncryption))
-> TransformEncryption -> f TransformEncryption
transformEncryption_mlUserDataEncryption = (TransformEncryption -> Maybe MLUserDataEncryption)
-> (TransformEncryption
-> Maybe MLUserDataEncryption -> TransformEncryption)
-> Lens
TransformEncryption
TransformEncryption
(Maybe MLUserDataEncryption)
(Maybe MLUserDataEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformEncryption' {Maybe MLUserDataEncryption
mlUserDataEncryption :: Maybe MLUserDataEncryption
$sel:mlUserDataEncryption:TransformEncryption' :: TransformEncryption -> Maybe MLUserDataEncryption
mlUserDataEncryption} -> Maybe MLUserDataEncryption
mlUserDataEncryption) (\s :: TransformEncryption
s@TransformEncryption' {} Maybe MLUserDataEncryption
a -> TransformEncryption
s {$sel:mlUserDataEncryption:TransformEncryption' :: Maybe MLUserDataEncryption
mlUserDataEncryption = Maybe MLUserDataEncryption
a} :: TransformEncryption)
transformEncryption_taskRunSecurityConfigurationName :: Lens.Lens' TransformEncryption (Prelude.Maybe Prelude.Text)
transformEncryption_taskRunSecurityConfigurationName :: (Maybe Text -> f (Maybe Text))
-> TransformEncryption -> f TransformEncryption
transformEncryption_taskRunSecurityConfigurationName = (TransformEncryption -> Maybe Text)
-> (TransformEncryption -> Maybe Text -> TransformEncryption)
-> Lens
TransformEncryption TransformEncryption (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformEncryption' {Maybe Text
taskRunSecurityConfigurationName :: Maybe Text
$sel:taskRunSecurityConfigurationName:TransformEncryption' :: TransformEncryption -> Maybe Text
taskRunSecurityConfigurationName} -> Maybe Text
taskRunSecurityConfigurationName) (\s :: TransformEncryption
s@TransformEncryption' {} Maybe Text
a -> TransformEncryption
s {$sel:taskRunSecurityConfigurationName:TransformEncryption' :: Maybe Text
taskRunSecurityConfigurationName = Maybe Text
a} :: TransformEncryption)
instance Core.FromJSON TransformEncryption where
parseJSON :: Value -> Parser TransformEncryption
parseJSON =
String
-> (Object -> Parser TransformEncryption)
-> Value
-> Parser TransformEncryption
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TransformEncryption"
( \Object
x ->
Maybe MLUserDataEncryption -> Maybe Text -> TransformEncryption
TransformEncryption'
(Maybe MLUserDataEncryption -> Maybe Text -> TransformEncryption)
-> Parser (Maybe MLUserDataEncryption)
-> Parser (Maybe Text -> TransformEncryption)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MLUserDataEncryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MlUserDataEncryption")
Parser (Maybe Text -> TransformEncryption)
-> Parser (Maybe Text) -> Parser TransformEncryption
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TaskRunSecurityConfigurationName")
)
instance Prelude.Hashable TransformEncryption
instance Prelude.NFData TransformEncryption
instance Core.ToJSON TransformEncryption where
toJSON :: TransformEncryption -> Value
toJSON TransformEncryption' {Maybe Text
Maybe MLUserDataEncryption
taskRunSecurityConfigurationName :: Maybe Text
mlUserDataEncryption :: Maybe MLUserDataEncryption
$sel:taskRunSecurityConfigurationName:TransformEncryption' :: TransformEncryption -> Maybe Text
$sel:mlUserDataEncryption:TransformEncryption' :: TransformEncryption -> Maybe MLUserDataEncryption
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MlUserDataEncryption" Text -> MLUserDataEncryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MLUserDataEncryption -> Pair)
-> Maybe MLUserDataEncryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MLUserDataEncryption
mlUserDataEncryption,
(Text
"TaskRunSecurityConfigurationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
taskRunSecurityConfigurationName
]
)