{-# 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.ApplicationVersionSummary where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.ApplicationStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationVersionSummary = ApplicationVersionSummary'
{
ApplicationVersionSummary -> Natural
applicationVersionId :: Prelude.Natural,
ApplicationVersionSummary -> ApplicationStatus
applicationStatus :: ApplicationStatus
}
deriving (ApplicationVersionSummary -> ApplicationVersionSummary -> Bool
(ApplicationVersionSummary -> ApplicationVersionSummary -> Bool)
-> (ApplicationVersionSummary -> ApplicationVersionSummary -> Bool)
-> Eq ApplicationVersionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationVersionSummary -> ApplicationVersionSummary -> Bool
$c/= :: ApplicationVersionSummary -> ApplicationVersionSummary -> Bool
== :: ApplicationVersionSummary -> ApplicationVersionSummary -> Bool
$c== :: ApplicationVersionSummary -> ApplicationVersionSummary -> Bool
Prelude.Eq, ReadPrec [ApplicationVersionSummary]
ReadPrec ApplicationVersionSummary
Int -> ReadS ApplicationVersionSummary
ReadS [ApplicationVersionSummary]
(Int -> ReadS ApplicationVersionSummary)
-> ReadS [ApplicationVersionSummary]
-> ReadPrec ApplicationVersionSummary
-> ReadPrec [ApplicationVersionSummary]
-> Read ApplicationVersionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationVersionSummary]
$creadListPrec :: ReadPrec [ApplicationVersionSummary]
readPrec :: ReadPrec ApplicationVersionSummary
$creadPrec :: ReadPrec ApplicationVersionSummary
readList :: ReadS [ApplicationVersionSummary]
$creadList :: ReadS [ApplicationVersionSummary]
readsPrec :: Int -> ReadS ApplicationVersionSummary
$creadsPrec :: Int -> ReadS ApplicationVersionSummary
Prelude.Read, Int -> ApplicationVersionSummary -> ShowS
[ApplicationVersionSummary] -> ShowS
ApplicationVersionSummary -> String
(Int -> ApplicationVersionSummary -> ShowS)
-> (ApplicationVersionSummary -> String)
-> ([ApplicationVersionSummary] -> ShowS)
-> Show ApplicationVersionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationVersionSummary] -> ShowS
$cshowList :: [ApplicationVersionSummary] -> ShowS
show :: ApplicationVersionSummary -> String
$cshow :: ApplicationVersionSummary -> String
showsPrec :: Int -> ApplicationVersionSummary -> ShowS
$cshowsPrec :: Int -> ApplicationVersionSummary -> ShowS
Prelude.Show, (forall x.
ApplicationVersionSummary -> Rep ApplicationVersionSummary x)
-> (forall x.
Rep ApplicationVersionSummary x -> ApplicationVersionSummary)
-> Generic ApplicationVersionSummary
forall x.
Rep ApplicationVersionSummary x -> ApplicationVersionSummary
forall x.
ApplicationVersionSummary -> Rep ApplicationVersionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationVersionSummary x -> ApplicationVersionSummary
$cfrom :: forall x.
ApplicationVersionSummary -> Rep ApplicationVersionSummary x
Prelude.Generic)
newApplicationVersionSummary ::
Prelude.Natural ->
ApplicationStatus ->
ApplicationVersionSummary
newApplicationVersionSummary :: Natural -> ApplicationStatus -> ApplicationVersionSummary
newApplicationVersionSummary
Natural
pApplicationVersionId_
ApplicationStatus
pApplicationStatus_ =
ApplicationVersionSummary' :: Natural -> ApplicationStatus -> ApplicationVersionSummary
ApplicationVersionSummary'
{ $sel:applicationVersionId:ApplicationVersionSummary' :: Natural
applicationVersionId =
Natural
pApplicationVersionId_,
$sel:applicationStatus:ApplicationVersionSummary' :: ApplicationStatus
applicationStatus = ApplicationStatus
pApplicationStatus_
}
applicationVersionSummary_applicationVersionId :: Lens.Lens' ApplicationVersionSummary Prelude.Natural
applicationVersionSummary_applicationVersionId :: (Natural -> f Natural)
-> ApplicationVersionSummary -> f ApplicationVersionSummary
applicationVersionSummary_applicationVersionId = (ApplicationVersionSummary -> Natural)
-> (ApplicationVersionSummary
-> Natural -> ApplicationVersionSummary)
-> Lens
ApplicationVersionSummary ApplicationVersionSummary Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationVersionSummary' {Natural
applicationVersionId :: Natural
$sel:applicationVersionId:ApplicationVersionSummary' :: ApplicationVersionSummary -> Natural
applicationVersionId} -> Natural
applicationVersionId) (\s :: ApplicationVersionSummary
s@ApplicationVersionSummary' {} Natural
a -> ApplicationVersionSummary
s {$sel:applicationVersionId:ApplicationVersionSummary' :: Natural
applicationVersionId = Natural
a} :: ApplicationVersionSummary)
applicationVersionSummary_applicationStatus :: Lens.Lens' ApplicationVersionSummary ApplicationStatus
applicationVersionSummary_applicationStatus :: (ApplicationStatus -> f ApplicationStatus)
-> ApplicationVersionSummary -> f ApplicationVersionSummary
applicationVersionSummary_applicationStatus = (ApplicationVersionSummary -> ApplicationStatus)
-> (ApplicationVersionSummary
-> ApplicationStatus -> ApplicationVersionSummary)
-> Lens
ApplicationVersionSummary
ApplicationVersionSummary
ApplicationStatus
ApplicationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationVersionSummary' {ApplicationStatus
applicationStatus :: ApplicationStatus
$sel:applicationStatus:ApplicationVersionSummary' :: ApplicationVersionSummary -> ApplicationStatus
applicationStatus} -> ApplicationStatus
applicationStatus) (\s :: ApplicationVersionSummary
s@ApplicationVersionSummary' {} ApplicationStatus
a -> ApplicationVersionSummary
s {$sel:applicationStatus:ApplicationVersionSummary' :: ApplicationStatus
applicationStatus = ApplicationStatus
a} :: ApplicationVersionSummary)
instance Core.FromJSON ApplicationVersionSummary where
parseJSON :: Value -> Parser ApplicationVersionSummary
parseJSON =
String
-> (Object -> Parser ApplicationVersionSummary)
-> Value
-> Parser ApplicationVersionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ApplicationVersionSummary"
( \Object
x ->
Natural -> ApplicationStatus -> ApplicationVersionSummary
ApplicationVersionSummary'
(Natural -> ApplicationStatus -> ApplicationVersionSummary)
-> Parser Natural
-> Parser (ApplicationStatus -> ApplicationVersionSummary)
forall (f :: * -> *) a b. Functor 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 (ApplicationStatus -> ApplicationVersionSummary)
-> Parser ApplicationStatus -> Parser ApplicationVersionSummary
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 ApplicationVersionSummary
instance Prelude.NFData ApplicationVersionSummary