{-# 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.JourneyExecutionMetricsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JourneyExecutionMetricsResponse = JourneyExecutionMetricsResponse'
{
JourneyExecutionMetricsResponse -> HashMap Text Text
metrics :: Prelude.HashMap Prelude.Text Prelude.Text,
JourneyExecutionMetricsResponse -> Text
journeyId :: Prelude.Text,
JourneyExecutionMetricsResponse -> Text
lastEvaluatedTime :: Prelude.Text,
JourneyExecutionMetricsResponse -> Text
applicationId :: Prelude.Text
}
deriving (JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool
(JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool)
-> (JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool)
-> Eq JourneyExecutionMetricsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool
$c/= :: JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool
== :: JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool
$c== :: JourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse -> Bool
Prelude.Eq, ReadPrec [JourneyExecutionMetricsResponse]
ReadPrec JourneyExecutionMetricsResponse
Int -> ReadS JourneyExecutionMetricsResponse
ReadS [JourneyExecutionMetricsResponse]
(Int -> ReadS JourneyExecutionMetricsResponse)
-> ReadS [JourneyExecutionMetricsResponse]
-> ReadPrec JourneyExecutionMetricsResponse
-> ReadPrec [JourneyExecutionMetricsResponse]
-> Read JourneyExecutionMetricsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JourneyExecutionMetricsResponse]
$creadListPrec :: ReadPrec [JourneyExecutionMetricsResponse]
readPrec :: ReadPrec JourneyExecutionMetricsResponse
$creadPrec :: ReadPrec JourneyExecutionMetricsResponse
readList :: ReadS [JourneyExecutionMetricsResponse]
$creadList :: ReadS [JourneyExecutionMetricsResponse]
readsPrec :: Int -> ReadS JourneyExecutionMetricsResponse
$creadsPrec :: Int -> ReadS JourneyExecutionMetricsResponse
Prelude.Read, Int -> JourneyExecutionMetricsResponse -> ShowS
[JourneyExecutionMetricsResponse] -> ShowS
JourneyExecutionMetricsResponse -> String
(Int -> JourneyExecutionMetricsResponse -> ShowS)
-> (JourneyExecutionMetricsResponse -> String)
-> ([JourneyExecutionMetricsResponse] -> ShowS)
-> Show JourneyExecutionMetricsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JourneyExecutionMetricsResponse] -> ShowS
$cshowList :: [JourneyExecutionMetricsResponse] -> ShowS
show :: JourneyExecutionMetricsResponse -> String
$cshow :: JourneyExecutionMetricsResponse -> String
showsPrec :: Int -> JourneyExecutionMetricsResponse -> ShowS
$cshowsPrec :: Int -> JourneyExecutionMetricsResponse -> ShowS
Prelude.Show, (forall x.
JourneyExecutionMetricsResponse
-> Rep JourneyExecutionMetricsResponse x)
-> (forall x.
Rep JourneyExecutionMetricsResponse x
-> JourneyExecutionMetricsResponse)
-> Generic JourneyExecutionMetricsResponse
forall x.
Rep JourneyExecutionMetricsResponse x
-> JourneyExecutionMetricsResponse
forall x.
JourneyExecutionMetricsResponse
-> Rep JourneyExecutionMetricsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep JourneyExecutionMetricsResponse x
-> JourneyExecutionMetricsResponse
$cfrom :: forall x.
JourneyExecutionMetricsResponse
-> Rep JourneyExecutionMetricsResponse x
Prelude.Generic)
newJourneyExecutionMetricsResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
JourneyExecutionMetricsResponse
newJourneyExecutionMetricsResponse :: Text -> Text -> Text -> JourneyExecutionMetricsResponse
newJourneyExecutionMetricsResponse
Text
pJourneyId_
Text
pLastEvaluatedTime_
Text
pApplicationId_ =
JourneyExecutionMetricsResponse' :: HashMap Text Text
-> Text -> Text -> Text -> JourneyExecutionMetricsResponse
JourneyExecutionMetricsResponse'
{ $sel:metrics:JourneyExecutionMetricsResponse' :: HashMap Text Text
metrics =
HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
$sel:journeyId:JourneyExecutionMetricsResponse' :: Text
journeyId = Text
pJourneyId_,
$sel:lastEvaluatedTime:JourneyExecutionMetricsResponse' :: Text
lastEvaluatedTime = Text
pLastEvaluatedTime_,
$sel:applicationId:JourneyExecutionMetricsResponse' :: Text
applicationId = Text
pApplicationId_
}
journeyExecutionMetricsResponse_metrics :: Lens.Lens' JourneyExecutionMetricsResponse (Prelude.HashMap Prelude.Text Prelude.Text)
journeyExecutionMetricsResponse_metrics :: (HashMap Text Text -> f (HashMap Text Text))
-> JourneyExecutionMetricsResponse
-> f JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse_metrics = (JourneyExecutionMetricsResponse -> HashMap Text Text)
-> (JourneyExecutionMetricsResponse
-> HashMap Text Text -> JourneyExecutionMetricsResponse)
-> Lens
JourneyExecutionMetricsResponse
JourneyExecutionMetricsResponse
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionMetricsResponse' {HashMap Text Text
metrics :: HashMap Text Text
$sel:metrics:JourneyExecutionMetricsResponse' :: JourneyExecutionMetricsResponse -> HashMap Text Text
metrics} -> HashMap Text Text
metrics) (\s :: JourneyExecutionMetricsResponse
s@JourneyExecutionMetricsResponse' {} HashMap Text Text
a -> JourneyExecutionMetricsResponse
s {$sel:metrics:JourneyExecutionMetricsResponse' :: HashMap Text Text
metrics = HashMap Text Text
a} :: JourneyExecutionMetricsResponse) ((HashMap Text Text -> f (HashMap Text Text))
-> JourneyExecutionMetricsResponse
-> f JourneyExecutionMetricsResponse)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> JourneyExecutionMetricsResponse
-> f JourneyExecutionMetricsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
journeyExecutionMetricsResponse_journeyId :: Lens.Lens' JourneyExecutionMetricsResponse Prelude.Text
journeyExecutionMetricsResponse_journeyId :: (Text -> f Text)
-> JourneyExecutionMetricsResponse
-> f JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse_journeyId = (JourneyExecutionMetricsResponse -> Text)
-> (JourneyExecutionMetricsResponse
-> Text -> JourneyExecutionMetricsResponse)
-> Lens
JourneyExecutionMetricsResponse
JourneyExecutionMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionMetricsResponse' {Text
journeyId :: Text
$sel:journeyId:JourneyExecutionMetricsResponse' :: JourneyExecutionMetricsResponse -> Text
journeyId} -> Text
journeyId) (\s :: JourneyExecutionMetricsResponse
s@JourneyExecutionMetricsResponse' {} Text
a -> JourneyExecutionMetricsResponse
s {$sel:journeyId:JourneyExecutionMetricsResponse' :: Text
journeyId = Text
a} :: JourneyExecutionMetricsResponse)
journeyExecutionMetricsResponse_lastEvaluatedTime :: Lens.Lens' JourneyExecutionMetricsResponse Prelude.Text
journeyExecutionMetricsResponse_lastEvaluatedTime :: (Text -> f Text)
-> JourneyExecutionMetricsResponse
-> f JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse_lastEvaluatedTime = (JourneyExecutionMetricsResponse -> Text)
-> (JourneyExecutionMetricsResponse
-> Text -> JourneyExecutionMetricsResponse)
-> Lens
JourneyExecutionMetricsResponse
JourneyExecutionMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionMetricsResponse' {Text
lastEvaluatedTime :: Text
$sel:lastEvaluatedTime:JourneyExecutionMetricsResponse' :: JourneyExecutionMetricsResponse -> Text
lastEvaluatedTime} -> Text
lastEvaluatedTime) (\s :: JourneyExecutionMetricsResponse
s@JourneyExecutionMetricsResponse' {} Text
a -> JourneyExecutionMetricsResponse
s {$sel:lastEvaluatedTime:JourneyExecutionMetricsResponse' :: Text
lastEvaluatedTime = Text
a} :: JourneyExecutionMetricsResponse)
journeyExecutionMetricsResponse_applicationId :: Lens.Lens' JourneyExecutionMetricsResponse Prelude.Text
journeyExecutionMetricsResponse_applicationId :: (Text -> f Text)
-> JourneyExecutionMetricsResponse
-> f JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse_applicationId = (JourneyExecutionMetricsResponse -> Text)
-> (JourneyExecutionMetricsResponse
-> Text -> JourneyExecutionMetricsResponse)
-> Lens
JourneyExecutionMetricsResponse
JourneyExecutionMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionMetricsResponse' {Text
applicationId :: Text
$sel:applicationId:JourneyExecutionMetricsResponse' :: JourneyExecutionMetricsResponse -> Text
applicationId} -> Text
applicationId) (\s :: JourneyExecutionMetricsResponse
s@JourneyExecutionMetricsResponse' {} Text
a -> JourneyExecutionMetricsResponse
s {$sel:applicationId:JourneyExecutionMetricsResponse' :: Text
applicationId = Text
a} :: JourneyExecutionMetricsResponse)
instance
Core.FromJSON
JourneyExecutionMetricsResponse
where
parseJSON :: Value -> Parser JourneyExecutionMetricsResponse
parseJSON =
String
-> (Object -> Parser JourneyExecutionMetricsResponse)
-> Value
-> Parser JourneyExecutionMetricsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JourneyExecutionMetricsResponse"
( \Object
x ->
HashMap Text Text
-> Text -> Text -> Text -> JourneyExecutionMetricsResponse
JourneyExecutionMetricsResponse'
(HashMap Text Text
-> Text -> Text -> Text -> JourneyExecutionMetricsResponse)
-> Parser (HashMap Text Text)
-> Parser (Text -> Text -> Text -> JourneyExecutionMetricsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Metrics" Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> Text -> JourneyExecutionMetricsResponse)
-> Parser Text
-> Parser (Text -> Text -> JourneyExecutionMetricsResponse)
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 (Text -> Text -> JourneyExecutionMetricsResponse)
-> Parser Text -> Parser (Text -> JourneyExecutionMetricsResponse)
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
"LastEvaluatedTime")
Parser (Text -> JourneyExecutionMetricsResponse)
-> Parser Text -> Parser JourneyExecutionMetricsResponse
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
JourneyExecutionMetricsResponse
instance
Prelude.NFData
JourneyExecutionMetricsResponse