{-# 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.EMR.Types.HadoopStepConfig 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 HadoopStepConfig = HadoopStepConfig'
{
HadoopStepConfig -> Maybe [Text]
args :: Prelude.Maybe [Prelude.Text],
HadoopStepConfig -> Maybe Text
jar :: Prelude.Maybe Prelude.Text,
HadoopStepConfig -> Maybe Text
mainClass :: Prelude.Maybe Prelude.Text,
HadoopStepConfig -> Maybe (HashMap Text Text)
properties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (HadoopStepConfig -> HadoopStepConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HadoopStepConfig -> HadoopStepConfig -> Bool
$c/= :: HadoopStepConfig -> HadoopStepConfig -> Bool
== :: HadoopStepConfig -> HadoopStepConfig -> Bool
$c== :: HadoopStepConfig -> HadoopStepConfig -> Bool
Prelude.Eq, ReadPrec [HadoopStepConfig]
ReadPrec HadoopStepConfig
Int -> ReadS HadoopStepConfig
ReadS [HadoopStepConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HadoopStepConfig]
$creadListPrec :: ReadPrec [HadoopStepConfig]
readPrec :: ReadPrec HadoopStepConfig
$creadPrec :: ReadPrec HadoopStepConfig
readList :: ReadS [HadoopStepConfig]
$creadList :: ReadS [HadoopStepConfig]
readsPrec :: Int -> ReadS HadoopStepConfig
$creadsPrec :: Int -> ReadS HadoopStepConfig
Prelude.Read, Int -> HadoopStepConfig -> ShowS
[HadoopStepConfig] -> ShowS
HadoopStepConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HadoopStepConfig] -> ShowS
$cshowList :: [HadoopStepConfig] -> ShowS
show :: HadoopStepConfig -> String
$cshow :: HadoopStepConfig -> String
showsPrec :: Int -> HadoopStepConfig -> ShowS
$cshowsPrec :: Int -> HadoopStepConfig -> ShowS
Prelude.Show, forall x. Rep HadoopStepConfig x -> HadoopStepConfig
forall x. HadoopStepConfig -> Rep HadoopStepConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HadoopStepConfig x -> HadoopStepConfig
$cfrom :: forall x. HadoopStepConfig -> Rep HadoopStepConfig x
Prelude.Generic)
newHadoopStepConfig ::
HadoopStepConfig
newHadoopStepConfig :: HadoopStepConfig
newHadoopStepConfig =
HadoopStepConfig'
{ $sel:args:HadoopStepConfig' :: Maybe [Text]
args = forall a. Maybe a
Prelude.Nothing,
$sel:jar:HadoopStepConfig' :: Maybe Text
jar = forall a. Maybe a
Prelude.Nothing,
$sel:mainClass:HadoopStepConfig' :: Maybe Text
mainClass = forall a. Maybe a
Prelude.Nothing,
$sel:properties:HadoopStepConfig' :: Maybe (HashMap Text Text)
properties = forall a. Maybe a
Prelude.Nothing
}
hadoopStepConfig_args :: Lens.Lens' HadoopStepConfig (Prelude.Maybe [Prelude.Text])
hadoopStepConfig_args :: Lens' HadoopStepConfig (Maybe [Text])
hadoopStepConfig_args = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HadoopStepConfig' {Maybe [Text]
args :: Maybe [Text]
$sel:args:HadoopStepConfig' :: HadoopStepConfig -> Maybe [Text]
args} -> Maybe [Text]
args) (\s :: HadoopStepConfig
s@HadoopStepConfig' {} Maybe [Text]
a -> HadoopStepConfig
s {$sel:args:HadoopStepConfig' :: Maybe [Text]
args = Maybe [Text]
a} :: HadoopStepConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
hadoopStepConfig_jar :: Lens.Lens' HadoopStepConfig (Prelude.Maybe Prelude.Text)
hadoopStepConfig_jar :: Lens' HadoopStepConfig (Maybe Text)
hadoopStepConfig_jar = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HadoopStepConfig' {Maybe Text
jar :: Maybe Text
$sel:jar:HadoopStepConfig' :: HadoopStepConfig -> Maybe Text
jar} -> Maybe Text
jar) (\s :: HadoopStepConfig
s@HadoopStepConfig' {} Maybe Text
a -> HadoopStepConfig
s {$sel:jar:HadoopStepConfig' :: Maybe Text
jar = Maybe Text
a} :: HadoopStepConfig)
hadoopStepConfig_mainClass :: Lens.Lens' HadoopStepConfig (Prelude.Maybe Prelude.Text)
hadoopStepConfig_mainClass :: Lens' HadoopStepConfig (Maybe Text)
hadoopStepConfig_mainClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HadoopStepConfig' {Maybe Text
mainClass :: Maybe Text
$sel:mainClass:HadoopStepConfig' :: HadoopStepConfig -> Maybe Text
mainClass} -> Maybe Text
mainClass) (\s :: HadoopStepConfig
s@HadoopStepConfig' {} Maybe Text
a -> HadoopStepConfig
s {$sel:mainClass:HadoopStepConfig' :: Maybe Text
mainClass = Maybe Text
a} :: HadoopStepConfig)
hadoopStepConfig_properties :: Lens.Lens' HadoopStepConfig (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
hadoopStepConfig_properties :: Lens' HadoopStepConfig (Maybe (HashMap Text Text))
hadoopStepConfig_properties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HadoopStepConfig' {Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
$sel:properties:HadoopStepConfig' :: HadoopStepConfig -> Maybe (HashMap Text Text)
properties} -> Maybe (HashMap Text Text)
properties) (\s :: HadoopStepConfig
s@HadoopStepConfig' {} Maybe (HashMap Text Text)
a -> HadoopStepConfig
s {$sel:properties:HadoopStepConfig' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
a} :: HadoopStepConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON HadoopStepConfig where
parseJSON :: Value -> Parser HadoopStepConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HadoopStepConfig"
( \Object
x ->
Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> HadoopStepConfig
HadoopStepConfig'
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
"Args" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Jar")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MainClass")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Properties" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable HadoopStepConfig where
hashWithSalt :: Int -> HadoopStepConfig -> Int
hashWithSalt Int
_salt HadoopStepConfig' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
mainClass :: Maybe Text
jar :: Maybe Text
args :: Maybe [Text]
$sel:properties:HadoopStepConfig' :: HadoopStepConfig -> Maybe (HashMap Text Text)
$sel:mainClass:HadoopStepConfig' :: HadoopStepConfig -> Maybe Text
$sel:jar:HadoopStepConfig' :: HadoopStepConfig -> Maybe Text
$sel:args:HadoopStepConfig' :: HadoopStepConfig -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
args
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jar
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mainClass
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
properties
instance Prelude.NFData HadoopStepConfig where
rnf :: HadoopStepConfig -> ()
rnf HadoopStepConfig' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
mainClass :: Maybe Text
jar :: Maybe Text
args :: Maybe [Text]
$sel:properties:HadoopStepConfig' :: HadoopStepConfig -> Maybe (HashMap Text Text)
$sel:mainClass:HadoopStepConfig' :: HadoopStepConfig -> Maybe Text
$sel:jar:HadoopStepConfig' :: HadoopStepConfig -> Maybe Text
$sel:args:HadoopStepConfig' :: HadoopStepConfig -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
args
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jar
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mainClass
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
properties