{-# 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.EMRServerless.Types.ApplicationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMRServerless.Types.ApplicationState
import Amazonka.EMRServerless.Types.Architecture
import qualified Amazonka.Prelude as Prelude
data ApplicationSummary = ApplicationSummary'
{
ApplicationSummary -> Maybe Architecture
architecture :: Prelude.Maybe Architecture,
ApplicationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ApplicationSummary -> Maybe Text
stateDetails :: Prelude.Maybe Prelude.Text,
ApplicationSummary -> Text
id :: Prelude.Text,
ApplicationSummary -> Text
arn :: Prelude.Text,
ApplicationSummary -> Text
releaseLabel :: Prelude.Text,
ApplicationSummary -> Text
type' :: Prelude.Text,
ApplicationSummary -> ApplicationState
state :: ApplicationState,
ApplicationSummary -> POSIX
createdAt :: Data.POSIX,
ApplicationSummary -> POSIX
updatedAt :: Data.POSIX
}
deriving (ApplicationSummary -> ApplicationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationSummary -> ApplicationSummary -> Bool
$c/= :: ApplicationSummary -> ApplicationSummary -> Bool
== :: ApplicationSummary -> ApplicationSummary -> Bool
$c== :: ApplicationSummary -> ApplicationSummary -> Bool
Prelude.Eq, ReadPrec [ApplicationSummary]
ReadPrec ApplicationSummary
Int -> ReadS ApplicationSummary
ReadS [ApplicationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationSummary]
$creadListPrec :: ReadPrec [ApplicationSummary]
readPrec :: ReadPrec ApplicationSummary
$creadPrec :: ReadPrec ApplicationSummary
readList :: ReadS [ApplicationSummary]
$creadList :: ReadS [ApplicationSummary]
readsPrec :: Int -> ReadS ApplicationSummary
$creadsPrec :: Int -> ReadS ApplicationSummary
Prelude.Read, Int -> ApplicationSummary -> ShowS
[ApplicationSummary] -> ShowS
ApplicationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationSummary] -> ShowS
$cshowList :: [ApplicationSummary] -> ShowS
show :: ApplicationSummary -> String
$cshow :: ApplicationSummary -> String
showsPrec :: Int -> ApplicationSummary -> ShowS
$cshowsPrec :: Int -> ApplicationSummary -> ShowS
Prelude.Show, forall x. Rep ApplicationSummary x -> ApplicationSummary
forall x. ApplicationSummary -> Rep ApplicationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationSummary x -> ApplicationSummary
$cfrom :: forall x. ApplicationSummary -> Rep ApplicationSummary x
Prelude.Generic)
newApplicationSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ApplicationState ->
Prelude.UTCTime ->
Prelude.UTCTime ->
ApplicationSummary
newApplicationSummary :: Text
-> Text
-> Text
-> Text
-> ApplicationState
-> UTCTime
-> UTCTime
-> ApplicationSummary
newApplicationSummary
Text
pId_
Text
pArn_
Text
pReleaseLabel_
Text
pType_
ApplicationState
pState_
UTCTime
pCreatedAt_
UTCTime
pUpdatedAt_ =
ApplicationSummary'
{ $sel:architecture:ApplicationSummary' :: Maybe Architecture
architecture = forall a. Maybe a
Prelude.Nothing,
$sel:name:ApplicationSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:stateDetails:ApplicationSummary' :: Maybe Text
stateDetails = forall a. Maybe a
Prelude.Nothing,
$sel:id:ApplicationSummary' :: Text
id = Text
pId_,
$sel:arn:ApplicationSummary' :: Text
arn = Text
pArn_,
$sel:releaseLabel:ApplicationSummary' :: Text
releaseLabel = Text
pReleaseLabel_,
$sel:type':ApplicationSummary' :: Text
type' = Text
pType_,
$sel:state:ApplicationSummary' :: ApplicationState
state = ApplicationState
pState_,
$sel:createdAt:ApplicationSummary' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:updatedAt:ApplicationSummary' :: POSIX
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
}
applicationSummary_architecture :: Lens.Lens' ApplicationSummary (Prelude.Maybe Architecture)
applicationSummary_architecture :: Lens' ApplicationSummary (Maybe Architecture)
applicationSummary_architecture = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Architecture
architecture :: Maybe Architecture
$sel:architecture:ApplicationSummary' :: ApplicationSummary -> Maybe Architecture
architecture} -> Maybe Architecture
architecture) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Architecture
a -> ApplicationSummary
s {$sel:architecture:ApplicationSummary' :: Maybe Architecture
architecture = Maybe Architecture
a} :: ApplicationSummary)
applicationSummary_name :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_name :: Lens' ApplicationSummary (Maybe Text)
applicationSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
name :: Maybe Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:name:ApplicationSummary' :: Maybe Text
name = Maybe Text
a} :: ApplicationSummary)
applicationSummary_stateDetails :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_stateDetails :: Lens' ApplicationSummary (Maybe Text)
applicationSummary_stateDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
stateDetails :: Maybe Text
$sel:stateDetails:ApplicationSummary' :: ApplicationSummary -> Maybe Text
stateDetails} -> Maybe Text
stateDetails) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:stateDetails:ApplicationSummary' :: Maybe Text
stateDetails = Maybe Text
a} :: ApplicationSummary)
applicationSummary_id :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_id :: Lens' ApplicationSummary Text
applicationSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
id :: Text
$sel:id:ApplicationSummary' :: ApplicationSummary -> Text
id} -> Text
id) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:id:ApplicationSummary' :: Text
id = Text
a} :: ApplicationSummary)
applicationSummary_arn :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_arn :: Lens' ApplicationSummary Text
applicationSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
arn :: Text
$sel:arn:ApplicationSummary' :: ApplicationSummary -> Text
arn} -> Text
arn) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:arn:ApplicationSummary' :: Text
arn = Text
a} :: ApplicationSummary)
applicationSummary_releaseLabel :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_releaseLabel :: Lens' ApplicationSummary Text
applicationSummary_releaseLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
releaseLabel :: Text
$sel:releaseLabel:ApplicationSummary' :: ApplicationSummary -> Text
releaseLabel} -> Text
releaseLabel) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:releaseLabel:ApplicationSummary' :: Text
releaseLabel = Text
a} :: ApplicationSummary)
applicationSummary_type :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_type :: Lens' ApplicationSummary Text
applicationSummary_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
type' :: Text
$sel:type':ApplicationSummary' :: ApplicationSummary -> Text
type'} -> Text
type') (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:type':ApplicationSummary' :: Text
type' = Text
a} :: ApplicationSummary)
applicationSummary_state :: Lens.Lens' ApplicationSummary ApplicationState
applicationSummary_state :: Lens' ApplicationSummary ApplicationState
applicationSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {ApplicationState
state :: ApplicationState
$sel:state:ApplicationSummary' :: ApplicationSummary -> ApplicationState
state} -> ApplicationState
state) (\s :: ApplicationSummary
s@ApplicationSummary' {} ApplicationState
a -> ApplicationSummary
s {$sel:state:ApplicationSummary' :: ApplicationState
state = ApplicationState
a} :: ApplicationSummary)
applicationSummary_createdAt :: Lens.Lens' ApplicationSummary Prelude.UTCTime
applicationSummary_createdAt :: Lens' ApplicationSummary UTCTime
applicationSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:ApplicationSummary' :: ApplicationSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ApplicationSummary
s@ApplicationSummary' {} POSIX
a -> ApplicationSummary
s {$sel:createdAt:ApplicationSummary' :: POSIX
createdAt = POSIX
a} :: ApplicationSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
applicationSummary_updatedAt :: Lens.Lens' ApplicationSummary Prelude.UTCTime
applicationSummary_updatedAt :: Lens' ApplicationSummary UTCTime
applicationSummary_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {POSIX
updatedAt :: POSIX
$sel:updatedAt:ApplicationSummary' :: ApplicationSummary -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: ApplicationSummary
s@ApplicationSummary' {} POSIX
a -> ApplicationSummary
s {$sel:updatedAt:ApplicationSummary' :: POSIX
updatedAt = POSIX
a} :: ApplicationSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ApplicationSummary where
parseJSON :: Value -> Parser ApplicationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ApplicationSummary"
( \Object
x ->
Maybe Architecture
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationState
-> POSIX
-> POSIX
-> ApplicationSummary
ApplicationSummary'
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
"architecture")
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
"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
"stateDetails")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"releaseLabel")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"type")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"state")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"updatedAt")
)
instance Prelude.Hashable ApplicationSummary where
hashWithSalt :: Int -> ApplicationSummary -> Int
hashWithSalt Int
_salt ApplicationSummary' {Maybe Text
Maybe Architecture
Text
POSIX
ApplicationState
updatedAt :: POSIX
createdAt :: POSIX
state :: ApplicationState
type' :: Text
releaseLabel :: Text
arn :: Text
id :: Text
stateDetails :: Maybe Text
name :: Maybe Text
architecture :: Maybe Architecture
$sel:updatedAt:ApplicationSummary' :: ApplicationSummary -> POSIX
$sel:createdAt:ApplicationSummary' :: ApplicationSummary -> POSIX
$sel:state:ApplicationSummary' :: ApplicationSummary -> ApplicationState
$sel:type':ApplicationSummary' :: ApplicationSummary -> Text
$sel:releaseLabel:ApplicationSummary' :: ApplicationSummary -> Text
$sel:arn:ApplicationSummary' :: ApplicationSummary -> Text
$sel:id:ApplicationSummary' :: ApplicationSummary -> Text
$sel:stateDetails:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:architecture:ApplicationSummary' :: ApplicationSummary -> Maybe Architecture
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Architecture
architecture
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stateDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
releaseLabel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ApplicationState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updatedAt
instance Prelude.NFData ApplicationSummary where
rnf :: ApplicationSummary -> ()
rnf ApplicationSummary' {Maybe Text
Maybe Architecture
Text
POSIX
ApplicationState
updatedAt :: POSIX
createdAt :: POSIX
state :: ApplicationState
type' :: Text
releaseLabel :: Text
arn :: Text
id :: Text
stateDetails :: Maybe Text
name :: Maybe Text
architecture :: Maybe Architecture
$sel:updatedAt:ApplicationSummary' :: ApplicationSummary -> POSIX
$sel:createdAt:ApplicationSummary' :: ApplicationSummary -> POSIX
$sel:state:ApplicationSummary' :: ApplicationSummary -> ApplicationState
$sel:type':ApplicationSummary' :: ApplicationSummary -> Text
$sel:releaseLabel:ApplicationSummary' :: ApplicationSummary -> Text
$sel:arn:ApplicationSummary' :: ApplicationSummary -> Text
$sel:id:ApplicationSummary' :: ApplicationSummary -> Text
$sel:stateDetails:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:architecture:ApplicationSummary' :: ApplicationSummary -> Maybe Architecture
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Architecture
architecture
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
stateDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
releaseLabel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ApplicationState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updatedAt