{-# 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.Pinpoint.Types.ApplicationDateRangeKpiResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.BaseKpiResult
import qualified Amazonka.Prelude as Prelude
data ApplicationDateRangeKpiResponse = ApplicationDateRangeKpiResponse'
{
ApplicationDateRangeKpiResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ApplicationDateRangeKpiResponse -> BaseKpiResult
kpiResult :: BaseKpiResult,
ApplicationDateRangeKpiResponse -> Text
kpiName :: Prelude.Text,
ApplicationDateRangeKpiResponse -> POSIX
endTime :: Core.POSIX,
ApplicationDateRangeKpiResponse -> POSIX
startTime :: Core.POSIX,
ApplicationDateRangeKpiResponse -> Text
applicationId :: Prelude.Text
}
deriving (ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool
(ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool)
-> (ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool)
-> Eq ApplicationDateRangeKpiResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool
$c/= :: ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool
== :: ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool
$c== :: ApplicationDateRangeKpiResponse
-> ApplicationDateRangeKpiResponse -> Bool
Prelude.Eq, ReadPrec [ApplicationDateRangeKpiResponse]
ReadPrec ApplicationDateRangeKpiResponse
Int -> ReadS ApplicationDateRangeKpiResponse
ReadS [ApplicationDateRangeKpiResponse]
(Int -> ReadS ApplicationDateRangeKpiResponse)
-> ReadS [ApplicationDateRangeKpiResponse]
-> ReadPrec ApplicationDateRangeKpiResponse
-> ReadPrec [ApplicationDateRangeKpiResponse]
-> Read ApplicationDateRangeKpiResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationDateRangeKpiResponse]
$creadListPrec :: ReadPrec [ApplicationDateRangeKpiResponse]
readPrec :: ReadPrec ApplicationDateRangeKpiResponse
$creadPrec :: ReadPrec ApplicationDateRangeKpiResponse
readList :: ReadS [ApplicationDateRangeKpiResponse]
$creadList :: ReadS [ApplicationDateRangeKpiResponse]
readsPrec :: Int -> ReadS ApplicationDateRangeKpiResponse
$creadsPrec :: Int -> ReadS ApplicationDateRangeKpiResponse
Prelude.Read, Int -> ApplicationDateRangeKpiResponse -> ShowS
[ApplicationDateRangeKpiResponse] -> ShowS
ApplicationDateRangeKpiResponse -> String
(Int -> ApplicationDateRangeKpiResponse -> ShowS)
-> (ApplicationDateRangeKpiResponse -> String)
-> ([ApplicationDateRangeKpiResponse] -> ShowS)
-> Show ApplicationDateRangeKpiResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationDateRangeKpiResponse] -> ShowS
$cshowList :: [ApplicationDateRangeKpiResponse] -> ShowS
show :: ApplicationDateRangeKpiResponse -> String
$cshow :: ApplicationDateRangeKpiResponse -> String
showsPrec :: Int -> ApplicationDateRangeKpiResponse -> ShowS
$cshowsPrec :: Int -> ApplicationDateRangeKpiResponse -> ShowS
Prelude.Show, (forall x.
ApplicationDateRangeKpiResponse
-> Rep ApplicationDateRangeKpiResponse x)
-> (forall x.
Rep ApplicationDateRangeKpiResponse x
-> ApplicationDateRangeKpiResponse)
-> Generic ApplicationDateRangeKpiResponse
forall x.
Rep ApplicationDateRangeKpiResponse x
-> ApplicationDateRangeKpiResponse
forall x.
ApplicationDateRangeKpiResponse
-> Rep ApplicationDateRangeKpiResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationDateRangeKpiResponse x
-> ApplicationDateRangeKpiResponse
$cfrom :: forall x.
ApplicationDateRangeKpiResponse
-> Rep ApplicationDateRangeKpiResponse x
Prelude.Generic)
newApplicationDateRangeKpiResponse ::
BaseKpiResult ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
ApplicationDateRangeKpiResponse
newApplicationDateRangeKpiResponse :: BaseKpiResult
-> Text
-> UTCTime
-> UTCTime
-> Text
-> ApplicationDateRangeKpiResponse
newApplicationDateRangeKpiResponse
BaseKpiResult
pKpiResult_
Text
pKpiName_
UTCTime
pEndTime_
UTCTime
pStartTime_
Text
pApplicationId_ =
ApplicationDateRangeKpiResponse' :: Maybe Text
-> BaseKpiResult
-> Text
-> POSIX
-> POSIX
-> Text
-> ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse'
{ $sel:nextToken:ApplicationDateRangeKpiResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kpiResult:ApplicationDateRangeKpiResponse' :: BaseKpiResult
kpiResult = BaseKpiResult
pKpiResult_,
$sel:kpiName:ApplicationDateRangeKpiResponse' :: Text
kpiName = Text
pKpiName_,
$sel:endTime:ApplicationDateRangeKpiResponse' :: POSIX
endTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_,
$sel:startTime:ApplicationDateRangeKpiResponse' :: POSIX
startTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:applicationId:ApplicationDateRangeKpiResponse' :: Text
applicationId = Text
pApplicationId_
}
applicationDateRangeKpiResponse_nextToken :: Lens.Lens' ApplicationDateRangeKpiResponse (Prelude.Maybe Prelude.Text)
applicationDateRangeKpiResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
applicationDateRangeKpiResponse_nextToken = (ApplicationDateRangeKpiResponse -> Maybe Text)
-> (ApplicationDateRangeKpiResponse
-> Maybe Text -> ApplicationDateRangeKpiResponse)
-> Lens
ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDateRangeKpiResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ApplicationDateRangeKpiResponse' :: ApplicationDateRangeKpiResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ApplicationDateRangeKpiResponse
s@ApplicationDateRangeKpiResponse' {} Maybe Text
a -> ApplicationDateRangeKpiResponse
s {$sel:nextToken:ApplicationDateRangeKpiResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ApplicationDateRangeKpiResponse)
applicationDateRangeKpiResponse_kpiResult :: Lens.Lens' ApplicationDateRangeKpiResponse BaseKpiResult
applicationDateRangeKpiResponse_kpiResult :: (BaseKpiResult -> f BaseKpiResult)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
applicationDateRangeKpiResponse_kpiResult = (ApplicationDateRangeKpiResponse -> BaseKpiResult)
-> (ApplicationDateRangeKpiResponse
-> BaseKpiResult -> ApplicationDateRangeKpiResponse)
-> Lens
ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse
BaseKpiResult
BaseKpiResult
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDateRangeKpiResponse' {BaseKpiResult
kpiResult :: BaseKpiResult
$sel:kpiResult:ApplicationDateRangeKpiResponse' :: ApplicationDateRangeKpiResponse -> BaseKpiResult
kpiResult} -> BaseKpiResult
kpiResult) (\s :: ApplicationDateRangeKpiResponse
s@ApplicationDateRangeKpiResponse' {} BaseKpiResult
a -> ApplicationDateRangeKpiResponse
s {$sel:kpiResult:ApplicationDateRangeKpiResponse' :: BaseKpiResult
kpiResult = BaseKpiResult
a} :: ApplicationDateRangeKpiResponse)
applicationDateRangeKpiResponse_kpiName :: Lens.Lens' ApplicationDateRangeKpiResponse Prelude.Text
applicationDateRangeKpiResponse_kpiName :: (Text -> f Text)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
applicationDateRangeKpiResponse_kpiName = (ApplicationDateRangeKpiResponse -> Text)
-> (ApplicationDateRangeKpiResponse
-> Text -> ApplicationDateRangeKpiResponse)
-> Lens
ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDateRangeKpiResponse' {Text
kpiName :: Text
$sel:kpiName:ApplicationDateRangeKpiResponse' :: ApplicationDateRangeKpiResponse -> Text
kpiName} -> Text
kpiName) (\s :: ApplicationDateRangeKpiResponse
s@ApplicationDateRangeKpiResponse' {} Text
a -> ApplicationDateRangeKpiResponse
s {$sel:kpiName:ApplicationDateRangeKpiResponse' :: Text
kpiName = Text
a} :: ApplicationDateRangeKpiResponse)
applicationDateRangeKpiResponse_endTime :: Lens.Lens' ApplicationDateRangeKpiResponse Prelude.UTCTime
applicationDateRangeKpiResponse_endTime :: (UTCTime -> f UTCTime)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
applicationDateRangeKpiResponse_endTime = (ApplicationDateRangeKpiResponse -> POSIX)
-> (ApplicationDateRangeKpiResponse
-> POSIX -> ApplicationDateRangeKpiResponse)
-> Lens
ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDateRangeKpiResponse' {POSIX
endTime :: POSIX
$sel:endTime:ApplicationDateRangeKpiResponse' :: ApplicationDateRangeKpiResponse -> POSIX
endTime} -> POSIX
endTime) (\s :: ApplicationDateRangeKpiResponse
s@ApplicationDateRangeKpiResponse' {} POSIX
a -> ApplicationDateRangeKpiResponse
s {$sel:endTime:ApplicationDateRangeKpiResponse' :: POSIX
endTime = POSIX
a} :: ApplicationDateRangeKpiResponse) ((POSIX -> f POSIX)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
applicationDateRangeKpiResponse_startTime :: Lens.Lens' ApplicationDateRangeKpiResponse Prelude.UTCTime
applicationDateRangeKpiResponse_startTime :: (UTCTime -> f UTCTime)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
applicationDateRangeKpiResponse_startTime = (ApplicationDateRangeKpiResponse -> POSIX)
-> (ApplicationDateRangeKpiResponse
-> POSIX -> ApplicationDateRangeKpiResponse)
-> Lens
ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDateRangeKpiResponse' {POSIX
startTime :: POSIX
$sel:startTime:ApplicationDateRangeKpiResponse' :: ApplicationDateRangeKpiResponse -> POSIX
startTime} -> POSIX
startTime) (\s :: ApplicationDateRangeKpiResponse
s@ApplicationDateRangeKpiResponse' {} POSIX
a -> ApplicationDateRangeKpiResponse
s {$sel:startTime:ApplicationDateRangeKpiResponse' :: POSIX
startTime = POSIX
a} :: ApplicationDateRangeKpiResponse) ((POSIX -> f POSIX)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
applicationDateRangeKpiResponse_applicationId :: Lens.Lens' ApplicationDateRangeKpiResponse Prelude.Text
applicationDateRangeKpiResponse_applicationId :: (Text -> f Text)
-> ApplicationDateRangeKpiResponse
-> f ApplicationDateRangeKpiResponse
applicationDateRangeKpiResponse_applicationId = (ApplicationDateRangeKpiResponse -> Text)
-> (ApplicationDateRangeKpiResponse
-> Text -> ApplicationDateRangeKpiResponse)
-> Lens
ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDateRangeKpiResponse' {Text
applicationId :: Text
$sel:applicationId:ApplicationDateRangeKpiResponse' :: ApplicationDateRangeKpiResponse -> Text
applicationId} -> Text
applicationId) (\s :: ApplicationDateRangeKpiResponse
s@ApplicationDateRangeKpiResponse' {} Text
a -> ApplicationDateRangeKpiResponse
s {$sel:applicationId:ApplicationDateRangeKpiResponse' :: Text
applicationId = Text
a} :: ApplicationDateRangeKpiResponse)
instance
Core.FromJSON
ApplicationDateRangeKpiResponse
where
parseJSON :: Value -> Parser ApplicationDateRangeKpiResponse
parseJSON =
String
-> (Object -> Parser ApplicationDateRangeKpiResponse)
-> Value
-> Parser ApplicationDateRangeKpiResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ApplicationDateRangeKpiResponse"
( \Object
x ->
Maybe Text
-> BaseKpiResult
-> Text
-> POSIX
-> POSIX
-> Text
-> ApplicationDateRangeKpiResponse
ApplicationDateRangeKpiResponse'
(Maybe Text
-> BaseKpiResult
-> Text
-> POSIX
-> POSIX
-> Text
-> ApplicationDateRangeKpiResponse)
-> Parser (Maybe Text)
-> Parser
(BaseKpiResult
-> Text
-> POSIX
-> POSIX
-> Text
-> ApplicationDateRangeKpiResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NextToken")
Parser
(BaseKpiResult
-> Text
-> POSIX
-> POSIX
-> Text
-> ApplicationDateRangeKpiResponse)
-> Parser BaseKpiResult
-> Parser
(Text -> POSIX -> POSIX -> Text -> ApplicationDateRangeKpiResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser BaseKpiResult
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"KpiResult")
Parser
(Text -> POSIX -> POSIX -> Text -> ApplicationDateRangeKpiResponse)
-> Parser Text
-> Parser
(POSIX -> POSIX -> Text -> ApplicationDateRangeKpiResponse)
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
"KpiName")
Parser (POSIX -> POSIX -> Text -> ApplicationDateRangeKpiResponse)
-> Parser POSIX
-> Parser (POSIX -> Text -> ApplicationDateRangeKpiResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndTime")
Parser (POSIX -> Text -> ApplicationDateRangeKpiResponse)
-> Parser POSIX -> Parser (Text -> ApplicationDateRangeKpiResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"StartTime")
Parser (Text -> ApplicationDateRangeKpiResponse)
-> Parser Text -> Parser ApplicationDateRangeKpiResponse
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
"ApplicationId")
)
instance
Prelude.Hashable
ApplicationDateRangeKpiResponse
instance
Prelude.NFData
ApplicationDateRangeKpiResponse