{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:name:SimplifiedApplication' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:version:SimplifiedApplication' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing
}
simplifiedApplication_name :: Lens.Lens' SimplifiedApplication (Prelude.Maybe Prelude.Text)
simplifiedApplication_name :: Lens' SimplifiedApplication (Maybe Text)
simplifiedApplication_name = 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 :: Lens' SimplifiedApplication (Maybe Text)
simplifiedApplication_version = 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 Data.FromJSON SimplifiedApplication where
parseJSON :: Value -> Parser SimplifiedApplication
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SimplifiedApplication"
( \Object
x ->
Maybe Text -> Maybe Text -> SimplifiedApplication
SimplifiedApplication'
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
"Name")
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
"Version")
)
instance Prelude.Hashable SimplifiedApplication where
hashWithSalt :: Int -> SimplifiedApplication -> Int
hashWithSalt Int
_salt SimplifiedApplication' {Maybe Text
version :: Maybe Text
name :: Maybe Text
$sel:version:SimplifiedApplication' :: SimplifiedApplication -> Maybe Text
$sel:name:SimplifiedApplication' :: SimplifiedApplication -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version
instance Prelude.NFData SimplifiedApplication where
rnf :: SimplifiedApplication -> ()
rnf SimplifiedApplication' {Maybe Text
version :: Maybe Text
name :: Maybe Text
$sel:version:SimplifiedApplication' :: SimplifiedApplication -> Maybe Text
$sel:name:SimplifiedApplication' :: SimplifiedApplication -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version