{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:args:SupportedProductConfig' :: Maybe [Text]
args = forall a. Maybe a
Prelude.Nothing,
$sel:name:SupportedProductConfig' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
supportedProductConfig_args :: Lens.Lens' SupportedProductConfig (Prelude.Maybe [Prelude.Text])
supportedProductConfig_args :: Lens' SupportedProductConfig (Maybe [Text])
supportedProductConfig_args = 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) 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
supportedProductConfig_name :: Lens.Lens' SupportedProductConfig (Prelude.Maybe Prelude.Text)
supportedProductConfig_name :: Lens' SupportedProductConfig (Maybe Text)
supportedProductConfig_name = 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 where
hashWithSalt :: Int -> SupportedProductConfig -> Int
hashWithSalt Int
_salt SupportedProductConfig' {Maybe [Text]
Maybe Text
name :: Maybe Text
args :: Maybe [Text]
$sel:name:SupportedProductConfig' :: SupportedProductConfig -> Maybe Text
$sel:args:SupportedProductConfig' :: SupportedProductConfig -> 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
name
instance Prelude.NFData SupportedProductConfig where
rnf :: SupportedProductConfig -> ()
rnf SupportedProductConfig' {Maybe [Text]
Maybe Text
name :: Maybe Text
args :: Maybe [Text]
$sel:name:SupportedProductConfig' :: SupportedProductConfig -> Maybe Text
$sel:args:SupportedProductConfig' :: SupportedProductConfig -> 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
name
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Args" 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]
args,
(Key
"Name" 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
name
]
)