{-# 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.SupportedProductConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SupportedProductConfig = SupportedProductConfig'
{
SupportedProductConfig -> Maybe [Text]
args :: Prelude.Maybe [Prelude.Text],
SupportedProductConfig -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (SupportedProductConfig -> SupportedProductConfig -> Bool
(SupportedProductConfig -> SupportedProductConfig -> Bool)
-> (SupportedProductConfig -> SupportedProductConfig -> Bool)
-> Eq SupportedProductConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SupportedProductConfig -> SupportedProductConfig -> Bool
$c/= :: SupportedProductConfig -> SupportedProductConfig -> Bool
== :: SupportedProductConfig -> SupportedProductConfig -> Bool
$c== :: SupportedProductConfig -> SupportedProductConfig -> Bool
Prelude.Eq, ReadPrec [SupportedProductConfig]
ReadPrec SupportedProductConfig
Int -> ReadS SupportedProductConfig
ReadS [SupportedProductConfig]
(Int -> ReadS SupportedProductConfig)
-> ReadS [SupportedProductConfig]
-> ReadPrec SupportedProductConfig
-> ReadPrec [SupportedProductConfig]
-> Read SupportedProductConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SupportedProductConfig]
$creadListPrec :: ReadPrec [SupportedProductConfig]
readPrec :: ReadPrec SupportedProductConfig
$creadPrec :: ReadPrec SupportedProductConfig
readList :: ReadS [SupportedProductConfig]
$creadList :: ReadS [SupportedProductConfig]
readsPrec :: Int -> ReadS SupportedProductConfig
$creadsPrec :: Int -> ReadS SupportedProductConfig
Prelude.Read, Int -> SupportedProductConfig -> ShowS
[SupportedProductConfig] -> ShowS
SupportedProductConfig -> String
(Int -> SupportedProductConfig -> ShowS)
-> (SupportedProductConfig -> String)
-> ([SupportedProductConfig] -> ShowS)
-> Show SupportedProductConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SupportedProductConfig] -> ShowS
$cshowList :: [SupportedProductConfig] -> ShowS
show :: SupportedProductConfig -> String
$cshow :: SupportedProductConfig -> String
showsPrec :: Int -> SupportedProductConfig -> ShowS
$cshowsPrec :: Int -> SupportedProductConfig -> ShowS
Prelude.Show, (forall x. SupportedProductConfig -> Rep SupportedProductConfig x)
-> (forall x.
Rep SupportedProductConfig x -> SupportedProductConfig)
-> Generic SupportedProductConfig
forall x. Rep SupportedProductConfig x -> SupportedProductConfig
forall x. SupportedProductConfig -> Rep SupportedProductConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SupportedProductConfig x -> SupportedProductConfig
$cfrom :: forall x. SupportedProductConfig -> Rep SupportedProductConfig x
Prelude.Generic)
newSupportedProductConfig ::
SupportedProductConfig
newSupportedProductConfig :: SupportedProductConfig
newSupportedProductConfig =
SupportedProductConfig' :: Maybe [Text] -> Maybe Text -> SupportedProductConfig
SupportedProductConfig'
{ $sel:args:SupportedProductConfig' :: Maybe [Text]
args = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:SupportedProductConfig' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
supportedProductConfig_args :: Lens.Lens' SupportedProductConfig (Prelude.Maybe [Prelude.Text])
supportedProductConfig_args :: (Maybe [Text] -> f (Maybe [Text]))
-> SupportedProductConfig -> f SupportedProductConfig
supportedProductConfig_args = (SupportedProductConfig -> Maybe [Text])
-> (SupportedProductConfig
-> Maybe [Text] -> SupportedProductConfig)
-> Lens
SupportedProductConfig
SupportedProductConfig
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SupportedProductConfig' {Maybe [Text]
args :: Maybe [Text]
$sel:args:SupportedProductConfig' :: SupportedProductConfig -> Maybe [Text]
args} -> Maybe [Text]
args) (\s :: SupportedProductConfig
s@SupportedProductConfig' {} Maybe [Text]
a -> SupportedProductConfig
s {$sel:args:SupportedProductConfig' :: Maybe [Text]
args = Maybe [Text]
a} :: SupportedProductConfig) ((Maybe [Text] -> f (Maybe [Text]))
-> SupportedProductConfig -> f SupportedProductConfig)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SupportedProductConfig
-> f SupportedProductConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
supportedProductConfig_name :: Lens.Lens' SupportedProductConfig (Prelude.Maybe Prelude.Text)
supportedProductConfig_name :: (Maybe Text -> f (Maybe Text))
-> SupportedProductConfig -> f SupportedProductConfig
supportedProductConfig_name = (SupportedProductConfig -> Maybe Text)
-> (SupportedProductConfig -> Maybe Text -> SupportedProductConfig)
-> Lens
SupportedProductConfig
SupportedProductConfig
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SupportedProductConfig' {Maybe Text
name :: Maybe Text
$sel:name:SupportedProductConfig' :: SupportedProductConfig -> Maybe Text
name} -> Maybe Text
name) (\s :: SupportedProductConfig
s@SupportedProductConfig' {} Maybe Text
a -> SupportedProductConfig
s {$sel:name:SupportedProductConfig' :: Maybe Text
name = Maybe Text
a} :: SupportedProductConfig)
instance Prelude.Hashable SupportedProductConfig
instance Prelude.NFData SupportedProductConfig
instance Core.ToJSON SupportedProductConfig where
toJSON :: SupportedProductConfig -> Value
toJSON SupportedProductConfig' {Maybe [Text]
Maybe Text
name :: Maybe Text
args :: Maybe [Text]
$sel:name:SupportedProductConfig' :: SupportedProductConfig -> Maybe Text
$sel:args:SupportedProductConfig' :: SupportedProductConfig -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Args" 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]
args,
(Text
"Name" 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
name
]
)