{-# 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.EMRContainers.Types.SparkSubmitJobDriver where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SparkSubmitJobDriver = SparkSubmitJobDriver'
{
SparkSubmitJobDriver -> Maybe (Sensitive Text)
sparkSubmitParameters :: Prelude.Maybe (Core.Sensitive Prelude.Text),
SparkSubmitJobDriver -> Maybe [Sensitive Text]
entryPointArguments :: Prelude.Maybe [Core.Sensitive Prelude.Text],
SparkSubmitJobDriver -> Sensitive Text
entryPoint :: Core.Sensitive Prelude.Text
}
deriving (SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool
(SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool)
-> (SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool)
-> Eq SparkSubmitJobDriver
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool
$c/= :: SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool
== :: SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool
$c== :: SparkSubmitJobDriver -> SparkSubmitJobDriver -> Bool
Prelude.Eq, Int -> SparkSubmitJobDriver -> ShowS
[SparkSubmitJobDriver] -> ShowS
SparkSubmitJobDriver -> String
(Int -> SparkSubmitJobDriver -> ShowS)
-> (SparkSubmitJobDriver -> String)
-> ([SparkSubmitJobDriver] -> ShowS)
-> Show SparkSubmitJobDriver
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SparkSubmitJobDriver] -> ShowS
$cshowList :: [SparkSubmitJobDriver] -> ShowS
show :: SparkSubmitJobDriver -> String
$cshow :: SparkSubmitJobDriver -> String
showsPrec :: Int -> SparkSubmitJobDriver -> ShowS
$cshowsPrec :: Int -> SparkSubmitJobDriver -> ShowS
Prelude.Show, (forall x. SparkSubmitJobDriver -> Rep SparkSubmitJobDriver x)
-> (forall x. Rep SparkSubmitJobDriver x -> SparkSubmitJobDriver)
-> Generic SparkSubmitJobDriver
forall x. Rep SparkSubmitJobDriver x -> SparkSubmitJobDriver
forall x. SparkSubmitJobDriver -> Rep SparkSubmitJobDriver x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SparkSubmitJobDriver x -> SparkSubmitJobDriver
$cfrom :: forall x. SparkSubmitJobDriver -> Rep SparkSubmitJobDriver x
Prelude.Generic)
newSparkSubmitJobDriver ::
Prelude.Text ->
SparkSubmitJobDriver
newSparkSubmitJobDriver :: Text -> SparkSubmitJobDriver
newSparkSubmitJobDriver Text
pEntryPoint_ =
SparkSubmitJobDriver' :: Maybe (Sensitive Text)
-> Maybe [Sensitive Text] -> Sensitive Text -> SparkSubmitJobDriver
SparkSubmitJobDriver'
{ $sel:sparkSubmitParameters:SparkSubmitJobDriver' :: Maybe (Sensitive Text)
sparkSubmitParameters =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:entryPointArguments:SparkSubmitJobDriver' :: Maybe [Sensitive Text]
entryPointArguments = Maybe [Sensitive Text]
forall a. Maybe a
Prelude.Nothing,
$sel:entryPoint:SparkSubmitJobDriver' :: Sensitive Text
entryPoint = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pEntryPoint_
}
sparkSubmitJobDriver_sparkSubmitParameters :: Lens.Lens' SparkSubmitJobDriver (Prelude.Maybe Prelude.Text)
sparkSubmitJobDriver_sparkSubmitParameters :: (Maybe Text -> f (Maybe Text))
-> SparkSubmitJobDriver -> f SparkSubmitJobDriver
sparkSubmitJobDriver_sparkSubmitParameters = (SparkSubmitJobDriver -> Maybe (Sensitive Text))
-> (SparkSubmitJobDriver
-> Maybe (Sensitive Text) -> SparkSubmitJobDriver)
-> Lens
SparkSubmitJobDriver
SparkSubmitJobDriver
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SparkSubmitJobDriver' {Maybe (Sensitive Text)
sparkSubmitParameters :: Maybe (Sensitive Text)
$sel:sparkSubmitParameters:SparkSubmitJobDriver' :: SparkSubmitJobDriver -> Maybe (Sensitive Text)
sparkSubmitParameters} -> Maybe (Sensitive Text)
sparkSubmitParameters) (\s :: SparkSubmitJobDriver
s@SparkSubmitJobDriver' {} Maybe (Sensitive Text)
a -> SparkSubmitJobDriver
s {$sel:sparkSubmitParameters:SparkSubmitJobDriver' :: Maybe (Sensitive Text)
sparkSubmitParameters = Maybe (Sensitive Text)
a} :: SparkSubmitJobDriver) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> SparkSubmitJobDriver -> f SparkSubmitJobDriver)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SparkSubmitJobDriver
-> f SparkSubmitJobDriver
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
sparkSubmitJobDriver_entryPointArguments :: Lens.Lens' SparkSubmitJobDriver (Prelude.Maybe [Prelude.Text])
sparkSubmitJobDriver_entryPointArguments :: (Maybe [Text] -> f (Maybe [Text]))
-> SparkSubmitJobDriver -> f SparkSubmitJobDriver
sparkSubmitJobDriver_entryPointArguments = (SparkSubmitJobDriver -> Maybe [Sensitive Text])
-> (SparkSubmitJobDriver
-> Maybe [Sensitive Text] -> SparkSubmitJobDriver)
-> Lens
SparkSubmitJobDriver
SparkSubmitJobDriver
(Maybe [Sensitive Text])
(Maybe [Sensitive Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SparkSubmitJobDriver' {Maybe [Sensitive Text]
entryPointArguments :: Maybe [Sensitive Text]
$sel:entryPointArguments:SparkSubmitJobDriver' :: SparkSubmitJobDriver -> Maybe [Sensitive Text]
entryPointArguments} -> Maybe [Sensitive Text]
entryPointArguments) (\s :: SparkSubmitJobDriver
s@SparkSubmitJobDriver' {} Maybe [Sensitive Text]
a -> SparkSubmitJobDriver
s {$sel:entryPointArguments:SparkSubmitJobDriver' :: Maybe [Sensitive Text]
entryPointArguments = Maybe [Sensitive Text]
a} :: SparkSubmitJobDriver) ((Maybe [Sensitive Text] -> f (Maybe [Sensitive Text]))
-> SparkSubmitJobDriver -> f SparkSubmitJobDriver)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Sensitive Text] -> f (Maybe [Sensitive Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SparkSubmitJobDriver
-> f SparkSubmitJobDriver
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Sensitive Text] [Sensitive Text] [Text] [Text]
-> Iso
(Maybe [Sensitive Text])
(Maybe [Sensitive Text])
(Maybe [Text])
(Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Sensitive Text] [Sensitive Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sparkSubmitJobDriver_entryPoint :: Lens.Lens' SparkSubmitJobDriver Prelude.Text
sparkSubmitJobDriver_entryPoint :: (Text -> f Text) -> SparkSubmitJobDriver -> f SparkSubmitJobDriver
sparkSubmitJobDriver_entryPoint = (SparkSubmitJobDriver -> Sensitive Text)
-> (SparkSubmitJobDriver -> Sensitive Text -> SparkSubmitJobDriver)
-> Lens
SparkSubmitJobDriver
SparkSubmitJobDriver
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SparkSubmitJobDriver' {Sensitive Text
entryPoint :: Sensitive Text
$sel:entryPoint:SparkSubmitJobDriver' :: SparkSubmitJobDriver -> Sensitive Text
entryPoint} -> Sensitive Text
entryPoint) (\s :: SparkSubmitJobDriver
s@SparkSubmitJobDriver' {} Sensitive Text
a -> SparkSubmitJobDriver
s {$sel:entryPoint:SparkSubmitJobDriver' :: Sensitive Text
entryPoint = Sensitive Text
a} :: SparkSubmitJobDriver) ((Sensitive Text -> f (Sensitive Text))
-> SparkSubmitJobDriver -> f SparkSubmitJobDriver)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> SparkSubmitJobDriver
-> f SparkSubmitJobDriver
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.FromJSON SparkSubmitJobDriver where
parseJSON :: Value -> Parser SparkSubmitJobDriver
parseJSON =
String
-> (Object -> Parser SparkSubmitJobDriver)
-> Value
-> Parser SparkSubmitJobDriver
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SparkSubmitJobDriver"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe [Sensitive Text] -> Sensitive Text -> SparkSubmitJobDriver
SparkSubmitJobDriver'
(Maybe (Sensitive Text)
-> Maybe [Sensitive Text]
-> Sensitive Text
-> SparkSubmitJobDriver)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe [Sensitive Text] -> Sensitive Text -> SparkSubmitJobDriver)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sparkSubmitParameters")
Parser
(Maybe [Sensitive Text] -> Sensitive Text -> SparkSubmitJobDriver)
-> Parser (Maybe [Sensitive Text])
-> Parser (Sensitive Text -> SparkSubmitJobDriver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Sensitive Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"entryPointArguments"
Parser (Maybe (Maybe [Sensitive Text]))
-> Maybe [Sensitive Text] -> Parser (Maybe [Sensitive Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Sensitive Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Sensitive Text -> SparkSubmitJobDriver)
-> Parser (Sensitive Text) -> Parser SparkSubmitJobDriver
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Sensitive Text)
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"entryPoint")
)
instance Prelude.Hashable SparkSubmitJobDriver
instance Prelude.NFData SparkSubmitJobDriver
instance Core.ToJSON SparkSubmitJobDriver where
toJSON :: SparkSubmitJobDriver -> Value
toJSON SparkSubmitJobDriver' {Maybe [Sensitive Text]
Maybe (Sensitive Text)
Sensitive Text
entryPoint :: Sensitive Text
entryPointArguments :: Maybe [Sensitive Text]
sparkSubmitParameters :: Maybe (Sensitive Text)
$sel:entryPoint:SparkSubmitJobDriver' :: SparkSubmitJobDriver -> Sensitive Text
$sel:entryPointArguments:SparkSubmitJobDriver' :: SparkSubmitJobDriver -> Maybe [Sensitive Text]
$sel:sparkSubmitParameters:SparkSubmitJobDriver' :: SparkSubmitJobDriver -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"sparkSubmitParameters" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
sparkSubmitParameters,
(Text
"entryPointArguments" Text -> [Sensitive Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Sensitive Text] -> Pair) -> Maybe [Sensitive Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Sensitive Text]
entryPointArguments,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"entryPoint" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
entryPoint)
]
)