{-# 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.KinesisAnalytics.Types.ApplicationSummary where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalytics.Types.ApplicationStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationSummary = ApplicationSummary'
{
ApplicationSummary -> Text
applicationName :: Prelude.Text,
ApplicationSummary -> Text
applicationARN :: Prelude.Text,
ApplicationSummary -> ApplicationStatus
applicationStatus :: ApplicationStatus
}
deriving (ApplicationSummary -> ApplicationSummary -> Bool
(ApplicationSummary -> ApplicationSummary -> Bool)
-> (ApplicationSummary -> ApplicationSummary -> Bool)
-> Eq ApplicationSummary
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]
(Int -> ReadS ApplicationSummary)
-> ReadS [ApplicationSummary]
-> ReadPrec ApplicationSummary
-> ReadPrec [ApplicationSummary]
-> Read 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
(Int -> ApplicationSummary -> ShowS)
-> (ApplicationSummary -> String)
-> ([ApplicationSummary] -> ShowS)
-> Show ApplicationSummary
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. ApplicationSummary -> Rep ApplicationSummary x)
-> (forall x. Rep ApplicationSummary x -> ApplicationSummary)
-> Generic ApplicationSummary
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 ->
ApplicationStatus ->
ApplicationSummary
newApplicationSummary :: Text -> Text -> ApplicationStatus -> ApplicationSummary
newApplicationSummary
Text
pApplicationName_
Text
pApplicationARN_
ApplicationStatus
pApplicationStatus_ =
ApplicationSummary' :: Text -> Text -> ApplicationStatus -> ApplicationSummary
ApplicationSummary'
{ $sel:applicationName:ApplicationSummary' :: Text
applicationName =
Text
pApplicationName_,
$sel:applicationARN:ApplicationSummary' :: Text
applicationARN = Text
pApplicationARN_,
$sel:applicationStatus:ApplicationSummary' :: ApplicationStatus
applicationStatus = ApplicationStatus
pApplicationStatus_
}
applicationSummary_applicationName :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_applicationName :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationName = (ApplicationSummary -> Text)
-> (ApplicationSummary -> Text -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
applicationName :: Text
$sel:applicationName:ApplicationSummary' :: ApplicationSummary -> Text
applicationName} -> Text
applicationName) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:applicationName:ApplicationSummary' :: Text
applicationName = Text
a} :: ApplicationSummary)
applicationSummary_applicationARN :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_applicationARN :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationARN = (ApplicationSummary -> Text)
-> (ApplicationSummary -> Text -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
applicationARN :: Text
$sel:applicationARN:ApplicationSummary' :: ApplicationSummary -> Text
applicationARN} -> Text
applicationARN) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:applicationARN:ApplicationSummary' :: Text
applicationARN = Text
a} :: ApplicationSummary)
applicationSummary_applicationStatus :: Lens.Lens' ApplicationSummary ApplicationStatus
applicationSummary_applicationStatus :: (ApplicationStatus -> f ApplicationStatus)
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationStatus = (ApplicationSummary -> ApplicationStatus)
-> (ApplicationSummary -> ApplicationStatus -> ApplicationSummary)
-> Lens
ApplicationSummary
ApplicationSummary
ApplicationStatus
ApplicationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {ApplicationStatus
applicationStatus :: ApplicationStatus
$sel:applicationStatus:ApplicationSummary' :: ApplicationSummary -> ApplicationStatus
applicationStatus} -> ApplicationStatus
applicationStatus) (\s :: ApplicationSummary
s@ApplicationSummary' {} ApplicationStatus
a -> ApplicationSummary
s {$sel:applicationStatus:ApplicationSummary' :: ApplicationStatus
applicationStatus = ApplicationStatus
a} :: ApplicationSummary)
instance Core.FromJSON ApplicationSummary where
parseJSON :: Value -> Parser ApplicationSummary
parseJSON =
String
-> (Object -> Parser ApplicationSummary)
-> Value
-> Parser ApplicationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ApplicationSummary"
( \Object
x ->
Text -> Text -> ApplicationStatus -> ApplicationSummary
ApplicationSummary'
(Text -> Text -> ApplicationStatus -> ApplicationSummary)
-> Parser Text
-> Parser (Text -> ApplicationStatus -> ApplicationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationName")
Parser (Text -> ApplicationStatus -> ApplicationSummary)
-> Parser Text -> Parser (ApplicationStatus -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationARN")
Parser (ApplicationStatus -> ApplicationSummary)
-> Parser ApplicationStatus -> Parser ApplicationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ApplicationStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationStatus")
)
instance Prelude.Hashable ApplicationSummary
instance Prelude.NFData ApplicationSummary