{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Pinpoint.Types.CampaignDateRangeKpiResponse
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Provides the results of a query that retrieved the data for a standard
-- metric that applies to a campaign, and provides information about that
-- query.
--
-- /See:/ 'newCampaignDateRangeKpiResponse' smart constructor.
data CampaignDateRangeKpiResponse = CampaignDateRangeKpiResponse'
  { -- | The string to use in a subsequent request to get the next page of
    -- results in a paginated response. This value is null for the Campaign
    -- Metrics resource because the resource returns all results in a single
    -- page.
    CampaignDateRangeKpiResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of objects that contains the results of the query. Each object
    -- contains the value for the metric and metadata about that value.
    CampaignDateRangeKpiResponse -> BaseKpiResult
kpiResult :: BaseKpiResult,
    -- | The name of the metric, also referred to as a /key performance indicator
    -- (KPI)/, that the data was retrieved for. This value describes the
    -- associated metric and consists of two or more terms, which are comprised
    -- of lowercase alphanumeric characters, separated by a hyphen. For a list
    -- of possible values, see the
    -- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html Amazon Pinpoint Developer Guide>.
    CampaignDateRangeKpiResponse -> Text
kpiName :: Prelude.Text,
    -- | The last date and time of the date range that was used to filter the
    -- query results, in extended ISO 8601 format. The date range is inclusive.
    CampaignDateRangeKpiResponse -> POSIX
endTime :: Core.POSIX,
    -- | The unique identifier for the campaign that the metric applies to.
    CampaignDateRangeKpiResponse -> Text
campaignId :: Prelude.Text,
    -- | The first date and time of the date range that was used to filter the
    -- query results, in extended ISO 8601 format. The date range is inclusive.
    CampaignDateRangeKpiResponse -> POSIX
startTime :: Core.POSIX,
    -- | The unique identifier for the application that the metric applies to.
    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)

-- |
-- Create a value of 'CampaignDateRangeKpiResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'campaignDateRangeKpiResponse_nextToken' - The string to use in a subsequent request to get the next page of
-- results in a paginated response. This value is null for the Campaign
-- Metrics resource because the resource returns all results in a single
-- page.
--
-- 'kpiResult', 'campaignDateRangeKpiResponse_kpiResult' - An array of objects that contains the results of the query. Each object
-- contains the value for the metric and metadata about that value.
--
-- 'kpiName', 'campaignDateRangeKpiResponse_kpiName' - The name of the metric, also referred to as a /key performance indicator
-- (KPI)/, that the data was retrieved for. This value describes the
-- associated metric and consists of two or more terms, which are comprised
-- of lowercase alphanumeric characters, separated by a hyphen. For a list
-- of possible values, see the
-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html Amazon Pinpoint Developer Guide>.
--
-- 'endTime', 'campaignDateRangeKpiResponse_endTime' - The last date and time of the date range that was used to filter the
-- query results, in extended ISO 8601 format. The date range is inclusive.
--
-- 'campaignId', 'campaignDateRangeKpiResponse_campaignId' - The unique identifier for the campaign that the metric applies to.
--
-- 'startTime', 'campaignDateRangeKpiResponse_startTime' - The first date and time of the date range that was used to filter the
-- query results, in extended ISO 8601 format. The date range is inclusive.
--
-- 'applicationId', 'campaignDateRangeKpiResponse_applicationId' - The unique identifier for the application that the metric applies to.
newCampaignDateRangeKpiResponse ::
  -- | 'kpiResult'
  BaseKpiResult ->
  -- | 'kpiName'
  Prelude.Text ->
  -- | 'endTime'
  Prelude.UTCTime ->
  -- | 'campaignId'
  Prelude.Text ->
  -- | 'startTime'
  Prelude.UTCTime ->
  -- | 'applicationId'
  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_
      }

-- | The string to use in a subsequent request to get the next page of
-- results in a paginated response. This value is null for the Campaign
-- Metrics resource because the resource returns all results in a single
-- page.
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)

-- | An array of objects that contains the results of the query. Each object
-- contains the value for the metric and metadata about that value.
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)

-- | The name of the metric, also referred to as a /key performance indicator
-- (KPI)/, that the data was retrieved for. This value describes the
-- associated metric and consists of two or more terms, which are comprised
-- of lowercase alphanumeric characters, separated by a hyphen. For a list
-- of possible values, see the
-- <https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html Amazon Pinpoint Developer Guide>.
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)

-- | The last date and time of the date range that was used to filter the
-- query results, in extended ISO 8601 format. The date range is inclusive.
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

-- | The unique identifier for the campaign that the metric applies to.
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)

-- | The first date and time of the date range that was used to filter the
-- query results, in extended ISO 8601 format. The date range is inclusive.
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

-- | The unique identifier for the application that the metric applies to.
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