{-# 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.KinesisAnalyticsV2.Types.ApplicationSummary where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.ApplicationMode
import Amazonka.KinesisAnalyticsV2.Types.ApplicationStatus
import Amazonka.KinesisAnalyticsV2.Types.RuntimeEnvironment
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationSummary = ApplicationSummary'
{
ApplicationSummary -> Maybe ApplicationMode
applicationMode :: Prelude.Maybe ApplicationMode,
ApplicationSummary -> Text
applicationName :: Prelude.Text,
ApplicationSummary -> Text
applicationARN :: Prelude.Text,
ApplicationSummary -> ApplicationStatus
applicationStatus :: ApplicationStatus,
ApplicationSummary -> Natural
applicationVersionId :: Prelude.Natural,
ApplicationSummary -> RuntimeEnvironment
runtimeEnvironment :: RuntimeEnvironment
}
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 ->
Prelude.Natural ->
RuntimeEnvironment ->
ApplicationSummary
newApplicationSummary :: Text
-> Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary
newApplicationSummary
Text
pApplicationName_
Text
pApplicationARN_
ApplicationStatus
pApplicationStatus_
Natural
pApplicationVersionId_
RuntimeEnvironment
pRuntimeEnvironment_ =
ApplicationSummary' :: Maybe ApplicationMode
-> Text
-> Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary
ApplicationSummary'
{ $sel:applicationMode:ApplicationSummary' :: Maybe ApplicationMode
applicationMode =
Maybe ApplicationMode
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:ApplicationSummary' :: Text
applicationName = Text
pApplicationName_,
$sel:applicationARN:ApplicationSummary' :: Text
applicationARN = Text
pApplicationARN_,
$sel:applicationStatus:ApplicationSummary' :: ApplicationStatus
applicationStatus = ApplicationStatus
pApplicationStatus_,
$sel:applicationVersionId:ApplicationSummary' :: Natural
applicationVersionId = Natural
pApplicationVersionId_,
$sel:runtimeEnvironment:ApplicationSummary' :: RuntimeEnvironment
runtimeEnvironment = RuntimeEnvironment
pRuntimeEnvironment_
}
applicationSummary_applicationMode :: Lens.Lens' ApplicationSummary (Prelude.Maybe ApplicationMode)
applicationSummary_applicationMode :: (Maybe ApplicationMode -> f (Maybe ApplicationMode))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationMode = (ApplicationSummary -> Maybe ApplicationMode)
-> (ApplicationSummary
-> Maybe ApplicationMode -> ApplicationSummary)
-> Lens
ApplicationSummary
ApplicationSummary
(Maybe ApplicationMode)
(Maybe ApplicationMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe ApplicationMode
applicationMode :: Maybe ApplicationMode
$sel:applicationMode:ApplicationSummary' :: ApplicationSummary -> Maybe ApplicationMode
applicationMode} -> Maybe ApplicationMode
applicationMode) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe ApplicationMode
a -> ApplicationSummary
s {$sel:applicationMode:ApplicationSummary' :: Maybe ApplicationMode
applicationMode = Maybe ApplicationMode
a} :: ApplicationSummary)
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)
applicationSummary_applicationVersionId :: Lens.Lens' ApplicationSummary Prelude.Natural
applicationSummary_applicationVersionId :: (Natural -> f Natural)
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationVersionId = (ApplicationSummary -> Natural)
-> (ApplicationSummary -> Natural -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Natural
applicationVersionId :: Natural
$sel:applicationVersionId:ApplicationSummary' :: ApplicationSummary -> Natural
applicationVersionId} -> Natural
applicationVersionId) (\s :: ApplicationSummary
s@ApplicationSummary' {} Natural
a -> ApplicationSummary
s {$sel:applicationVersionId:ApplicationSummary' :: Natural
applicationVersionId = Natural
a} :: ApplicationSummary)
applicationSummary_runtimeEnvironment :: Lens.Lens' ApplicationSummary RuntimeEnvironment
applicationSummary_runtimeEnvironment :: (RuntimeEnvironment -> f RuntimeEnvironment)
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_runtimeEnvironment = (ApplicationSummary -> RuntimeEnvironment)
-> (ApplicationSummary -> RuntimeEnvironment -> ApplicationSummary)
-> Lens
ApplicationSummary
ApplicationSummary
RuntimeEnvironment
RuntimeEnvironment
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {RuntimeEnvironment
runtimeEnvironment :: RuntimeEnvironment
$sel:runtimeEnvironment:ApplicationSummary' :: ApplicationSummary -> RuntimeEnvironment
runtimeEnvironment} -> RuntimeEnvironment
runtimeEnvironment) (\s :: ApplicationSummary
s@ApplicationSummary' {} RuntimeEnvironment
a -> ApplicationSummary
s {$sel:runtimeEnvironment:ApplicationSummary' :: RuntimeEnvironment
runtimeEnvironment = RuntimeEnvironment
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 ->
Maybe ApplicationMode
-> Text
-> Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary
ApplicationSummary'
(Maybe ApplicationMode
-> Text
-> Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary)
-> Parser (Maybe ApplicationMode)
-> Parser
(Text
-> Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ApplicationMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplicationMode")
Parser
(Text
-> Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary)
-> Parser Text
-> Parser
(Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> 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
"ApplicationName")
Parser
(Text
-> ApplicationStatus
-> Natural
-> RuntimeEnvironment
-> ApplicationSummary)
-> Parser Text
-> Parser
(ApplicationStatus
-> Natural -> RuntimeEnvironment -> 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
-> Natural -> RuntimeEnvironment -> ApplicationSummary)
-> Parser ApplicationStatus
-> Parser (Natural -> RuntimeEnvironment -> 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")
Parser (Natural -> RuntimeEnvironment -> ApplicationSummary)
-> Parser Natural
-> Parser (RuntimeEnvironment -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationVersionId")
Parser (RuntimeEnvironment -> ApplicationSummary)
-> Parser RuntimeEnvironment -> Parser ApplicationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser RuntimeEnvironment
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RuntimeEnvironment")
)
instance Prelude.Hashable ApplicationSummary
instance Prelude.NFData ApplicationSummary