{-# 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.JourneyDateRangeKpiResponse 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 JourneyDateRangeKpiResponse = JourneyDateRangeKpiResponse'
{
JourneyDateRangeKpiResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
JourneyDateRangeKpiResponse -> BaseKpiResult
kpiResult :: BaseKpiResult,
JourneyDateRangeKpiResponse -> Text
kpiName :: Prelude.Text,
JourneyDateRangeKpiResponse -> Text
journeyId :: Prelude.Text,
JourneyDateRangeKpiResponse -> POSIX
endTime :: Core.POSIX,
JourneyDateRangeKpiResponse -> POSIX
startTime :: Core.POSIX,
JourneyDateRangeKpiResponse -> Text
applicationId :: Prelude.Text
}
deriving (JourneyDateRangeKpiResponse -> JourneyDateRangeKpiResponse -> Bool
(JourneyDateRangeKpiResponse
-> JourneyDateRangeKpiResponse -> Bool)
-> (JourneyDateRangeKpiResponse
-> JourneyDateRangeKpiResponse -> Bool)
-> Eq JourneyDateRangeKpiResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JourneyDateRangeKpiResponse -> JourneyDateRangeKpiResponse -> Bool
$c/= :: JourneyDateRangeKpiResponse -> JourneyDateRangeKpiResponse -> Bool
== :: JourneyDateRangeKpiResponse -> JourneyDateRangeKpiResponse -> Bool
$c== :: JourneyDateRangeKpiResponse -> JourneyDateRangeKpiResponse -> Bool
Prelude.Eq, ReadPrec [JourneyDateRangeKpiResponse]
ReadPrec JourneyDateRangeKpiResponse
Int -> ReadS JourneyDateRangeKpiResponse
ReadS [JourneyDateRangeKpiResponse]
(Int -> ReadS JourneyDateRangeKpiResponse)
-> ReadS [JourneyDateRangeKpiResponse]
-> ReadPrec JourneyDateRangeKpiResponse
-> ReadPrec [JourneyDateRangeKpiResponse]
-> Read JourneyDateRangeKpiResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JourneyDateRangeKpiResponse]
$creadListPrec :: ReadPrec [JourneyDateRangeKpiResponse]
readPrec :: ReadPrec JourneyDateRangeKpiResponse
$creadPrec :: ReadPrec JourneyDateRangeKpiResponse
readList :: ReadS [JourneyDateRangeKpiResponse]
$creadList :: ReadS [JourneyDateRangeKpiResponse]
readsPrec :: Int -> ReadS JourneyDateRangeKpiResponse
$creadsPrec :: Int -> ReadS JourneyDateRangeKpiResponse
Prelude.Read, Int -> JourneyDateRangeKpiResponse -> ShowS
[JourneyDateRangeKpiResponse] -> ShowS
JourneyDateRangeKpiResponse -> String
(Int -> JourneyDateRangeKpiResponse -> ShowS)
-> (JourneyDateRangeKpiResponse -> String)
-> ([JourneyDateRangeKpiResponse] -> ShowS)
-> Show JourneyDateRangeKpiResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JourneyDateRangeKpiResponse] -> ShowS
$cshowList :: [JourneyDateRangeKpiResponse] -> ShowS
show :: JourneyDateRangeKpiResponse -> String
$cshow :: JourneyDateRangeKpiResponse -> String
showsPrec :: Int -> JourneyDateRangeKpiResponse -> ShowS
$cshowsPrec :: Int -> JourneyDateRangeKpiResponse -> ShowS
Prelude.Show, (forall x.
JourneyDateRangeKpiResponse -> Rep JourneyDateRangeKpiResponse x)
-> (forall x.
Rep JourneyDateRangeKpiResponse x -> JourneyDateRangeKpiResponse)
-> Generic JourneyDateRangeKpiResponse
forall x.
Rep JourneyDateRangeKpiResponse x -> JourneyDateRangeKpiResponse
forall x.
JourneyDateRangeKpiResponse -> Rep JourneyDateRangeKpiResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep JourneyDateRangeKpiResponse x -> JourneyDateRangeKpiResponse
$cfrom :: forall x.
JourneyDateRangeKpiResponse -> Rep JourneyDateRangeKpiResponse x
Prelude.Generic)
newJourneyDateRangeKpiResponse ::
BaseKpiResult ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
JourneyDateRangeKpiResponse
newJourneyDateRangeKpiResponse :: BaseKpiResult
-> Text
-> Text
-> UTCTime
-> UTCTime
-> Text
-> JourneyDateRangeKpiResponse
newJourneyDateRangeKpiResponse
BaseKpiResult
pKpiResult_
Text
pKpiName_
Text
pJourneyId_
UTCTime
pEndTime_
UTCTime
pStartTime_
Text
pApplicationId_ =
JourneyDateRangeKpiResponse' :: Maybe Text
-> BaseKpiResult
-> Text
-> Text
-> POSIX
-> POSIX
-> Text
-> JourneyDateRangeKpiResponse
JourneyDateRangeKpiResponse'
{ $sel:nextToken:JourneyDateRangeKpiResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kpiResult:JourneyDateRangeKpiResponse' :: BaseKpiResult
kpiResult = BaseKpiResult
pKpiResult_,
$sel:kpiName:JourneyDateRangeKpiResponse' :: Text
kpiName = Text
pKpiName_,
$sel:journeyId:JourneyDateRangeKpiResponse' :: Text
journeyId = Text
pJourneyId_,
$sel:endTime:JourneyDateRangeKpiResponse' :: 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:JourneyDateRangeKpiResponse' :: 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:JourneyDateRangeKpiResponse' :: Text
applicationId = Text
pApplicationId_
}
journeyDateRangeKpiResponse_nextToken :: Lens.Lens' JourneyDateRangeKpiResponse (Prelude.Maybe Prelude.Text)
journeyDateRangeKpiResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_nextToken = (JourneyDateRangeKpiResponse -> Maybe Text)
-> (JourneyDateRangeKpiResponse
-> Maybe Text -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse
JourneyDateRangeKpiResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} Maybe Text
a -> JourneyDateRangeKpiResponse
s {$sel:nextToken:JourneyDateRangeKpiResponse' :: Maybe Text
nextToken = Maybe Text
a} :: JourneyDateRangeKpiResponse)
journeyDateRangeKpiResponse_kpiResult :: Lens.Lens' JourneyDateRangeKpiResponse BaseKpiResult
journeyDateRangeKpiResponse_kpiResult :: (BaseKpiResult -> f BaseKpiResult)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_kpiResult = (JourneyDateRangeKpiResponse -> BaseKpiResult)
-> (JourneyDateRangeKpiResponse
-> BaseKpiResult -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse
JourneyDateRangeKpiResponse
BaseKpiResult
BaseKpiResult
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {BaseKpiResult
kpiResult :: BaseKpiResult
$sel:kpiResult:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> BaseKpiResult
kpiResult} -> BaseKpiResult
kpiResult) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} BaseKpiResult
a -> JourneyDateRangeKpiResponse
s {$sel:kpiResult:JourneyDateRangeKpiResponse' :: BaseKpiResult
kpiResult = BaseKpiResult
a} :: JourneyDateRangeKpiResponse)
journeyDateRangeKpiResponse_kpiName :: Lens.Lens' JourneyDateRangeKpiResponse Prelude.Text
journeyDateRangeKpiResponse_kpiName :: (Text -> f Text)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_kpiName = (JourneyDateRangeKpiResponse -> Text)
-> (JourneyDateRangeKpiResponse
-> Text -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse JourneyDateRangeKpiResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {Text
kpiName :: Text
$sel:kpiName:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> Text
kpiName} -> Text
kpiName) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} Text
a -> JourneyDateRangeKpiResponse
s {$sel:kpiName:JourneyDateRangeKpiResponse' :: Text
kpiName = Text
a} :: JourneyDateRangeKpiResponse)
journeyDateRangeKpiResponse_journeyId :: Lens.Lens' JourneyDateRangeKpiResponse Prelude.Text
journeyDateRangeKpiResponse_journeyId :: (Text -> f Text)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_journeyId = (JourneyDateRangeKpiResponse -> Text)
-> (JourneyDateRangeKpiResponse
-> Text -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse JourneyDateRangeKpiResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {Text
journeyId :: Text
$sel:journeyId:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> Text
journeyId} -> Text
journeyId) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} Text
a -> JourneyDateRangeKpiResponse
s {$sel:journeyId:JourneyDateRangeKpiResponse' :: Text
journeyId = Text
a} :: JourneyDateRangeKpiResponse)
journeyDateRangeKpiResponse_endTime :: Lens.Lens' JourneyDateRangeKpiResponse Prelude.UTCTime
journeyDateRangeKpiResponse_endTime :: (UTCTime -> f UTCTime)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_endTime = (JourneyDateRangeKpiResponse -> POSIX)
-> (JourneyDateRangeKpiResponse
-> POSIX -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse JourneyDateRangeKpiResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {POSIX
endTime :: POSIX
$sel:endTime:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> POSIX
endTime} -> POSIX
endTime) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} POSIX
a -> JourneyDateRangeKpiResponse
s {$sel:endTime:JourneyDateRangeKpiResponse' :: POSIX
endTime = POSIX
a} :: JourneyDateRangeKpiResponse) ((POSIX -> f POSIX)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> JourneyDateRangeKpiResponse
-> f JourneyDateRangeKpiResponse
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
journeyDateRangeKpiResponse_startTime :: Lens.Lens' JourneyDateRangeKpiResponse Prelude.UTCTime
journeyDateRangeKpiResponse_startTime :: (UTCTime -> f UTCTime)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_startTime = (JourneyDateRangeKpiResponse -> POSIX)
-> (JourneyDateRangeKpiResponse
-> POSIX -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse JourneyDateRangeKpiResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {POSIX
startTime :: POSIX
$sel:startTime:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> POSIX
startTime} -> POSIX
startTime) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} POSIX
a -> JourneyDateRangeKpiResponse
s {$sel:startTime:JourneyDateRangeKpiResponse' :: POSIX
startTime = POSIX
a} :: JourneyDateRangeKpiResponse) ((POSIX -> f POSIX)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> JourneyDateRangeKpiResponse
-> f JourneyDateRangeKpiResponse
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
journeyDateRangeKpiResponse_applicationId :: Lens.Lens' JourneyDateRangeKpiResponse Prelude.Text
journeyDateRangeKpiResponse_applicationId :: (Text -> f Text)
-> JourneyDateRangeKpiResponse -> f JourneyDateRangeKpiResponse
journeyDateRangeKpiResponse_applicationId = (JourneyDateRangeKpiResponse -> Text)
-> (JourneyDateRangeKpiResponse
-> Text -> JourneyDateRangeKpiResponse)
-> Lens
JourneyDateRangeKpiResponse JourneyDateRangeKpiResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyDateRangeKpiResponse' {Text
applicationId :: Text
$sel:applicationId:JourneyDateRangeKpiResponse' :: JourneyDateRangeKpiResponse -> Text
applicationId} -> Text
applicationId) (\s :: JourneyDateRangeKpiResponse
s@JourneyDateRangeKpiResponse' {} Text
a -> JourneyDateRangeKpiResponse
s {$sel:applicationId:JourneyDateRangeKpiResponse' :: Text
applicationId = Text
a} :: JourneyDateRangeKpiResponse)
instance Core.FromJSON JourneyDateRangeKpiResponse where
parseJSON :: Value -> Parser JourneyDateRangeKpiResponse
parseJSON =
String
-> (Object -> Parser JourneyDateRangeKpiResponse)
-> Value
-> Parser JourneyDateRangeKpiResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JourneyDateRangeKpiResponse"
( \Object
x ->
Maybe Text
-> BaseKpiResult
-> Text
-> Text
-> POSIX
-> POSIX
-> Text
-> JourneyDateRangeKpiResponse
JourneyDateRangeKpiResponse'
(Maybe Text
-> BaseKpiResult
-> Text
-> Text
-> POSIX
-> POSIX
-> Text
-> JourneyDateRangeKpiResponse)
-> Parser (Maybe Text)
-> Parser
(BaseKpiResult
-> Text
-> Text
-> POSIX
-> POSIX
-> Text
-> JourneyDateRangeKpiResponse)
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
-> Text
-> POSIX
-> POSIX
-> Text
-> JourneyDateRangeKpiResponse)
-> Parser BaseKpiResult
-> Parser
(Text
-> Text -> POSIX -> POSIX -> Text -> JourneyDateRangeKpiResponse)
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
-> Text -> POSIX -> POSIX -> Text -> JourneyDateRangeKpiResponse)
-> Parser Text
-> Parser
(Text -> POSIX -> POSIX -> Text -> JourneyDateRangeKpiResponse)
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
(Text -> POSIX -> POSIX -> Text -> JourneyDateRangeKpiResponse)
-> Parser Text
-> Parser (POSIX -> POSIX -> Text -> JourneyDateRangeKpiResponse)
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
"JourneyId")
Parser (POSIX -> POSIX -> Text -> JourneyDateRangeKpiResponse)
-> Parser POSIX
-> Parser (POSIX -> Text -> JourneyDateRangeKpiResponse)
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 -> JourneyDateRangeKpiResponse)
-> Parser POSIX -> Parser (Text -> JourneyDateRangeKpiResponse)
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 -> JourneyDateRangeKpiResponse)
-> Parser Text -> Parser JourneyDateRangeKpiResponse
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 JourneyDateRangeKpiResponse
instance Prelude.NFData JourneyDateRangeKpiResponse