{-# 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.SimplifiedApplication where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SimplifiedApplication = SimplifiedApplication'
{
SimplifiedApplication -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SimplifiedApplication -> Maybe Text
version :: Prelude.Maybe Prelude.Text
}
deriving (SimplifiedApplication -> SimplifiedApplication -> Bool
(SimplifiedApplication -> SimplifiedApplication -> Bool)
-> (SimplifiedApplication -> SimplifiedApplication -> Bool)
-> Eq SimplifiedApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimplifiedApplication -> SimplifiedApplication -> Bool
$c/= :: SimplifiedApplication -> SimplifiedApplication -> Bool
== :: SimplifiedApplication -> SimplifiedApplication -> Bool
$c== :: SimplifiedApplication -> SimplifiedApplication -> Bool
Prelude.Eq, ReadPrec [SimplifiedApplication]
ReadPrec SimplifiedApplication
Int -> ReadS SimplifiedApplication
ReadS [SimplifiedApplication]
(Int -> ReadS SimplifiedApplication)
-> ReadS [SimplifiedApplication]
-> ReadPrec SimplifiedApplication
-> ReadPrec [SimplifiedApplication]
-> Read SimplifiedApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SimplifiedApplication]
$creadListPrec :: ReadPrec [SimplifiedApplication]
readPrec :: ReadPrec SimplifiedApplication
$creadPrec :: ReadPrec SimplifiedApplication
readList :: ReadS [SimplifiedApplication]
$creadList :: ReadS [SimplifiedApplication]
readsPrec :: Int -> ReadS SimplifiedApplication
$creadsPrec :: Int -> ReadS SimplifiedApplication
Prelude.Read, Int -> SimplifiedApplication -> ShowS
[SimplifiedApplication] -> ShowS
SimplifiedApplication -> String
(Int -> SimplifiedApplication -> ShowS)
-> (SimplifiedApplication -> String)
-> ([SimplifiedApplication] -> ShowS)
-> Show SimplifiedApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimplifiedApplication] -> ShowS
$cshowList :: [SimplifiedApplication] -> ShowS
show :: SimplifiedApplication -> String
$cshow :: SimplifiedApplication -> String
showsPrec :: Int -> SimplifiedApplication -> ShowS
$cshowsPrec :: Int -> SimplifiedApplication -> ShowS
Prelude.Show, (forall x. SimplifiedApplication -> Rep SimplifiedApplication x)
-> (forall x. Rep SimplifiedApplication x -> SimplifiedApplication)
-> Generic SimplifiedApplication
forall x. Rep SimplifiedApplication x -> SimplifiedApplication
forall x. SimplifiedApplication -> Rep SimplifiedApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SimplifiedApplication x -> SimplifiedApplication
$cfrom :: forall x. SimplifiedApplication -> Rep SimplifiedApplication x
Prelude.Generic)
newSimplifiedApplication ::
SimplifiedApplication
newSimplifiedApplication :: SimplifiedApplication
newSimplifiedApplication =
SimplifiedApplication' :: Maybe Text -> Maybe Text -> SimplifiedApplication
SimplifiedApplication'
{ $sel:name:SimplifiedApplication' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:SimplifiedApplication' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
simplifiedApplication_name :: Lens.Lens' SimplifiedApplication (Prelude.Maybe Prelude.Text)
simplifiedApplication_name :: (Maybe Text -> f (Maybe Text))
-> SimplifiedApplication -> f SimplifiedApplication
simplifiedApplication_name = (SimplifiedApplication -> Maybe Text)
-> (SimplifiedApplication -> Maybe Text -> SimplifiedApplication)
-> Lens
SimplifiedApplication
SimplifiedApplication
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimplifiedApplication' {Maybe Text
name :: Maybe Text
$sel:name:SimplifiedApplication' :: SimplifiedApplication -> Maybe Text
name} -> Maybe Text
name) (\s :: SimplifiedApplication
s@SimplifiedApplication' {} Maybe Text
a -> SimplifiedApplication
s {$sel:name:SimplifiedApplication' :: Maybe Text
name = Maybe Text
a} :: SimplifiedApplication)
simplifiedApplication_version :: Lens.Lens' SimplifiedApplication (Prelude.Maybe Prelude.Text)
simplifiedApplication_version :: (Maybe Text -> f (Maybe Text))
-> SimplifiedApplication -> f SimplifiedApplication
simplifiedApplication_version = (SimplifiedApplication -> Maybe Text)
-> (SimplifiedApplication -> Maybe Text -> SimplifiedApplication)
-> Lens
SimplifiedApplication
SimplifiedApplication
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimplifiedApplication' {Maybe Text
version :: Maybe Text
$sel:version:SimplifiedApplication' :: SimplifiedApplication -> Maybe Text
version} -> Maybe Text
version) (\s :: SimplifiedApplication
s@SimplifiedApplication' {} Maybe Text
a -> SimplifiedApplication
s {$sel:version:SimplifiedApplication' :: Maybe Text
version = Maybe Text
a} :: SimplifiedApplication)
instance Core.FromJSON SimplifiedApplication where
parseJSON :: Value -> Parser SimplifiedApplication
parseJSON =
String
-> (Object -> Parser SimplifiedApplication)
-> Value
-> Parser SimplifiedApplication
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SimplifiedApplication"
( \Object
x ->
Maybe Text -> Maybe Text -> SimplifiedApplication
SimplifiedApplication'
(Maybe Text -> Maybe Text -> SimplifiedApplication)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SimplifiedApplication)
forall (f :: * -> *) a b. Functor 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
"Name")
Parser (Maybe Text -> SimplifiedApplication)
-> Parser (Maybe Text) -> Parser SimplifiedApplication
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
"Version")
)
instance Prelude.Hashable SimplifiedApplication
instance Prelude.NFData SimplifiedApplication