{-# 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.CampaignDateRangeKpiResponse 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 CampaignDateRangeKpiResponse = CampaignDateRangeKpiResponse'
{
CampaignDateRangeKpiResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
CampaignDateRangeKpiResponse -> BaseKpiResult
kpiResult :: BaseKpiResult,
CampaignDateRangeKpiResponse -> Text
kpiName :: Prelude.Text,
CampaignDateRangeKpiResponse -> POSIX
endTime :: Core.POSIX,
CampaignDateRangeKpiResponse -> Text
campaignId :: Prelude.Text,
CampaignDateRangeKpiResponse -> POSIX
startTime :: Core.POSIX,
CampaignDateRangeKpiResponse -> Text
applicationId :: Prelude.Text
}
deriving (CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool
(CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool)
-> (CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool)
-> Eq CampaignDateRangeKpiResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool
$c/= :: CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool
== :: CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool
$c== :: CampaignDateRangeKpiResponse
-> CampaignDateRangeKpiResponse -> Bool
Prelude.Eq, ReadPrec [CampaignDateRangeKpiResponse]
ReadPrec CampaignDateRangeKpiResponse
Int -> ReadS CampaignDateRangeKpiResponse
ReadS [CampaignDateRangeKpiResponse]
(Int -> ReadS CampaignDateRangeKpiResponse)
-> ReadS [CampaignDateRangeKpiResponse]
-> ReadPrec CampaignDateRangeKpiResponse
-> ReadPrec [CampaignDateRangeKpiResponse]
-> Read CampaignDateRangeKpiResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CampaignDateRangeKpiResponse]
$creadListPrec :: ReadPrec [CampaignDateRangeKpiResponse]
readPrec :: ReadPrec CampaignDateRangeKpiResponse
$creadPrec :: ReadPrec CampaignDateRangeKpiResponse
readList :: ReadS [CampaignDateRangeKpiResponse]
$creadList :: ReadS [CampaignDateRangeKpiResponse]
readsPrec :: Int -> ReadS CampaignDateRangeKpiResponse
$creadsPrec :: Int -> ReadS CampaignDateRangeKpiResponse
Prelude.Read, Int -> CampaignDateRangeKpiResponse -> ShowS
[CampaignDateRangeKpiResponse] -> ShowS
CampaignDateRangeKpiResponse -> String
(Int -> CampaignDateRangeKpiResponse -> ShowS)
-> (CampaignDateRangeKpiResponse -> String)
-> ([CampaignDateRangeKpiResponse] -> ShowS)
-> Show CampaignDateRangeKpiResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CampaignDateRangeKpiResponse] -> ShowS
$cshowList :: [CampaignDateRangeKpiResponse] -> ShowS
show :: CampaignDateRangeKpiResponse -> String
$cshow :: CampaignDateRangeKpiResponse -> String
showsPrec :: Int -> CampaignDateRangeKpiResponse -> ShowS
$cshowsPrec :: Int -> CampaignDateRangeKpiResponse -> ShowS
Prelude.Show, (forall x.
CampaignDateRangeKpiResponse -> Rep CampaignDateRangeKpiResponse x)
-> (forall x.
Rep CampaignDateRangeKpiResponse x -> CampaignDateRangeKpiResponse)
-> Generic CampaignDateRangeKpiResponse
forall x.
Rep CampaignDateRangeKpiResponse x -> CampaignDateRangeKpiResponse
forall x.
CampaignDateRangeKpiResponse -> Rep CampaignDateRangeKpiResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CampaignDateRangeKpiResponse x -> CampaignDateRangeKpiResponse
$cfrom :: forall x.
CampaignDateRangeKpiResponse -> Rep CampaignDateRangeKpiResponse x
Prelude.Generic)
newCampaignDateRangeKpiResponse ::
BaseKpiResult ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
CampaignDateRangeKpiResponse
newCampaignDateRangeKpiResponse :: BaseKpiResult
-> Text
-> UTCTime
-> Text
-> UTCTime
-> Text
-> CampaignDateRangeKpiResponse
newCampaignDateRangeKpiResponse
BaseKpiResult
pKpiResult_
Text
pKpiName_
UTCTime
pEndTime_
Text
pCampaignId_
UTCTime
pStartTime_
Text
pApplicationId_ =
CampaignDateRangeKpiResponse' :: Maybe Text
-> BaseKpiResult
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> CampaignDateRangeKpiResponse
CampaignDateRangeKpiResponse'
{ $sel:nextToken:CampaignDateRangeKpiResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kpiResult:CampaignDateRangeKpiResponse' :: BaseKpiResult
kpiResult = BaseKpiResult
pKpiResult_,
$sel:kpiName:CampaignDateRangeKpiResponse' :: Text
kpiName = Text
pKpiName_,
$sel:endTime:CampaignDateRangeKpiResponse' :: 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:campaignId:CampaignDateRangeKpiResponse' :: Text
campaignId = Text
pCampaignId_,
$sel:startTime:CampaignDateRangeKpiResponse' :: 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:CampaignDateRangeKpiResponse' :: Text
applicationId = Text
pApplicationId_
}
campaignDateRangeKpiResponse_nextToken :: Lens.Lens' CampaignDateRangeKpiResponse (Prelude.Maybe Prelude.Text)
campaignDateRangeKpiResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_nextToken = (CampaignDateRangeKpiResponse -> Maybe Text)
-> (CampaignDateRangeKpiResponse
-> Maybe Text -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse
CampaignDateRangeKpiResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} Maybe Text
a -> CampaignDateRangeKpiResponse
s {$sel:nextToken:CampaignDateRangeKpiResponse' :: Maybe Text
nextToken = Maybe Text
a} :: CampaignDateRangeKpiResponse)
campaignDateRangeKpiResponse_kpiResult :: Lens.Lens' CampaignDateRangeKpiResponse BaseKpiResult
campaignDateRangeKpiResponse_kpiResult :: (BaseKpiResult -> f BaseKpiResult)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_kpiResult = (CampaignDateRangeKpiResponse -> BaseKpiResult)
-> (CampaignDateRangeKpiResponse
-> BaseKpiResult -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse
CampaignDateRangeKpiResponse
BaseKpiResult
BaseKpiResult
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {BaseKpiResult
kpiResult :: BaseKpiResult
$sel:kpiResult:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> BaseKpiResult
kpiResult} -> BaseKpiResult
kpiResult) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} BaseKpiResult
a -> CampaignDateRangeKpiResponse
s {$sel:kpiResult:CampaignDateRangeKpiResponse' :: BaseKpiResult
kpiResult = BaseKpiResult
a} :: CampaignDateRangeKpiResponse)
campaignDateRangeKpiResponse_kpiName :: Lens.Lens' CampaignDateRangeKpiResponse Prelude.Text
campaignDateRangeKpiResponse_kpiName :: (Text -> f Text)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_kpiName = (CampaignDateRangeKpiResponse -> Text)
-> (CampaignDateRangeKpiResponse
-> Text -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse CampaignDateRangeKpiResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {Text
kpiName :: Text
$sel:kpiName:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> Text
kpiName} -> Text
kpiName) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} Text
a -> CampaignDateRangeKpiResponse
s {$sel:kpiName:CampaignDateRangeKpiResponse' :: Text
kpiName = Text
a} :: CampaignDateRangeKpiResponse)
campaignDateRangeKpiResponse_endTime :: Lens.Lens' CampaignDateRangeKpiResponse Prelude.UTCTime
campaignDateRangeKpiResponse_endTime :: (UTCTime -> f UTCTime)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_endTime = (CampaignDateRangeKpiResponse -> POSIX)
-> (CampaignDateRangeKpiResponse
-> POSIX -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse
CampaignDateRangeKpiResponse
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {POSIX
endTime :: POSIX
$sel:endTime:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> POSIX
endTime} -> POSIX
endTime) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} POSIX
a -> CampaignDateRangeKpiResponse
s {$sel:endTime:CampaignDateRangeKpiResponse' :: POSIX
endTime = POSIX
a} :: CampaignDateRangeKpiResponse) ((POSIX -> f POSIX)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> CampaignDateRangeKpiResponse
-> f CampaignDateRangeKpiResponse
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
campaignDateRangeKpiResponse_campaignId :: Lens.Lens' CampaignDateRangeKpiResponse Prelude.Text
campaignDateRangeKpiResponse_campaignId :: (Text -> f Text)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_campaignId = (CampaignDateRangeKpiResponse -> Text)
-> (CampaignDateRangeKpiResponse
-> Text -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse CampaignDateRangeKpiResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {Text
campaignId :: Text
$sel:campaignId:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> Text
campaignId} -> Text
campaignId) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} Text
a -> CampaignDateRangeKpiResponse
s {$sel:campaignId:CampaignDateRangeKpiResponse' :: Text
campaignId = Text
a} :: CampaignDateRangeKpiResponse)
campaignDateRangeKpiResponse_startTime :: Lens.Lens' CampaignDateRangeKpiResponse Prelude.UTCTime
campaignDateRangeKpiResponse_startTime :: (UTCTime -> f UTCTime)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_startTime = (CampaignDateRangeKpiResponse -> POSIX)
-> (CampaignDateRangeKpiResponse
-> POSIX -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse
CampaignDateRangeKpiResponse
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {POSIX
startTime :: POSIX
$sel:startTime:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> POSIX
startTime} -> POSIX
startTime) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} POSIX
a -> CampaignDateRangeKpiResponse
s {$sel:startTime:CampaignDateRangeKpiResponse' :: POSIX
startTime = POSIX
a} :: CampaignDateRangeKpiResponse) ((POSIX -> f POSIX)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> CampaignDateRangeKpiResponse
-> f CampaignDateRangeKpiResponse
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
campaignDateRangeKpiResponse_applicationId :: Lens.Lens' CampaignDateRangeKpiResponse Prelude.Text
campaignDateRangeKpiResponse_applicationId :: (Text -> f Text)
-> CampaignDateRangeKpiResponse -> f CampaignDateRangeKpiResponse
campaignDateRangeKpiResponse_applicationId = (CampaignDateRangeKpiResponse -> Text)
-> (CampaignDateRangeKpiResponse
-> Text -> CampaignDateRangeKpiResponse)
-> Lens
CampaignDateRangeKpiResponse CampaignDateRangeKpiResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignDateRangeKpiResponse' {Text
applicationId :: Text
$sel:applicationId:CampaignDateRangeKpiResponse' :: CampaignDateRangeKpiResponse -> Text
applicationId} -> Text
applicationId) (\s :: CampaignDateRangeKpiResponse
s@CampaignDateRangeKpiResponse' {} Text
a -> CampaignDateRangeKpiResponse
s {$sel:applicationId:CampaignDateRangeKpiResponse' :: Text
applicationId = Text
a} :: CampaignDateRangeKpiResponse)
instance Core.FromJSON CampaignDateRangeKpiResponse where
parseJSON :: Value -> Parser CampaignDateRangeKpiResponse
parseJSON =
String
-> (Object -> Parser CampaignDateRangeKpiResponse)
-> Value
-> Parser CampaignDateRangeKpiResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CampaignDateRangeKpiResponse"
( \Object
x ->
Maybe Text
-> BaseKpiResult
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> CampaignDateRangeKpiResponse
CampaignDateRangeKpiResponse'
(Maybe Text
-> BaseKpiResult
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> CampaignDateRangeKpiResponse)
-> Parser (Maybe Text)
-> Parser
(BaseKpiResult
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> CampaignDateRangeKpiResponse)
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
-> Text
-> POSIX
-> Text
-> CampaignDateRangeKpiResponse)
-> Parser BaseKpiResult
-> Parser
(Text
-> POSIX -> Text -> POSIX -> Text -> CampaignDateRangeKpiResponse)
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 -> Text -> POSIX -> Text -> CampaignDateRangeKpiResponse)
-> Parser Text
-> Parser
(POSIX -> Text -> POSIX -> Text -> CampaignDateRangeKpiResponse)
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 -> Text -> POSIX -> Text -> CampaignDateRangeKpiResponse)
-> Parser POSIX
-> Parser (Text -> POSIX -> Text -> CampaignDateRangeKpiResponse)
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 (Text -> POSIX -> Text -> CampaignDateRangeKpiResponse)
-> Parser Text
-> Parser (POSIX -> Text -> CampaignDateRangeKpiResponse)
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
"CampaignId")
Parser (POSIX -> Text -> CampaignDateRangeKpiResponse)
-> Parser POSIX -> Parser (Text -> CampaignDateRangeKpiResponse)
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 -> CampaignDateRangeKpiResponse)
-> Parser Text -> Parser CampaignDateRangeKpiResponse
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
CampaignDateRangeKpiResponse
instance Prelude.NFData CampaignDateRangeKpiResponse