{-# 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.JourneyExecutionActivityMetricsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JourneyExecutionActivityMetricsResponse = JourneyExecutionActivityMetricsResponse'
{
JourneyExecutionActivityMetricsResponse -> HashMap Text Text
metrics :: Prelude.HashMap Prelude.Text Prelude.Text,
JourneyExecutionActivityMetricsResponse -> Text
journeyId :: Prelude.Text,
JourneyExecutionActivityMetricsResponse -> Text
lastEvaluatedTime :: Prelude.Text,
JourneyExecutionActivityMetricsResponse -> Text
journeyActivityId :: Prelude.Text,
JourneyExecutionActivityMetricsResponse -> Text
activityType :: Prelude.Text,
JourneyExecutionActivityMetricsResponse -> Text
applicationId :: Prelude.Text
}
deriving (JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool
(JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool)
-> (JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool)
-> Eq JourneyExecutionActivityMetricsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool
$c/= :: JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool
== :: JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool
$c== :: JourneyExecutionActivityMetricsResponse
-> JourneyExecutionActivityMetricsResponse -> Bool
Prelude.Eq, ReadPrec [JourneyExecutionActivityMetricsResponse]
ReadPrec JourneyExecutionActivityMetricsResponse
Int -> ReadS JourneyExecutionActivityMetricsResponse
ReadS [JourneyExecutionActivityMetricsResponse]
(Int -> ReadS JourneyExecutionActivityMetricsResponse)
-> ReadS [JourneyExecutionActivityMetricsResponse]
-> ReadPrec JourneyExecutionActivityMetricsResponse
-> ReadPrec [JourneyExecutionActivityMetricsResponse]
-> Read JourneyExecutionActivityMetricsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JourneyExecutionActivityMetricsResponse]
$creadListPrec :: ReadPrec [JourneyExecutionActivityMetricsResponse]
readPrec :: ReadPrec JourneyExecutionActivityMetricsResponse
$creadPrec :: ReadPrec JourneyExecutionActivityMetricsResponse
readList :: ReadS [JourneyExecutionActivityMetricsResponse]
$creadList :: ReadS [JourneyExecutionActivityMetricsResponse]
readsPrec :: Int -> ReadS JourneyExecutionActivityMetricsResponse
$creadsPrec :: Int -> ReadS JourneyExecutionActivityMetricsResponse
Prelude.Read, Int -> JourneyExecutionActivityMetricsResponse -> ShowS
[JourneyExecutionActivityMetricsResponse] -> ShowS
JourneyExecutionActivityMetricsResponse -> String
(Int -> JourneyExecutionActivityMetricsResponse -> ShowS)
-> (JourneyExecutionActivityMetricsResponse -> String)
-> ([JourneyExecutionActivityMetricsResponse] -> ShowS)
-> Show JourneyExecutionActivityMetricsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JourneyExecutionActivityMetricsResponse] -> ShowS
$cshowList :: [JourneyExecutionActivityMetricsResponse] -> ShowS
show :: JourneyExecutionActivityMetricsResponse -> String
$cshow :: JourneyExecutionActivityMetricsResponse -> String
showsPrec :: Int -> JourneyExecutionActivityMetricsResponse -> ShowS
$cshowsPrec :: Int -> JourneyExecutionActivityMetricsResponse -> ShowS
Prelude.Show, (forall x.
JourneyExecutionActivityMetricsResponse
-> Rep JourneyExecutionActivityMetricsResponse x)
-> (forall x.
Rep JourneyExecutionActivityMetricsResponse x
-> JourneyExecutionActivityMetricsResponse)
-> Generic JourneyExecutionActivityMetricsResponse
forall x.
Rep JourneyExecutionActivityMetricsResponse x
-> JourneyExecutionActivityMetricsResponse
forall x.
JourneyExecutionActivityMetricsResponse
-> Rep JourneyExecutionActivityMetricsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep JourneyExecutionActivityMetricsResponse x
-> JourneyExecutionActivityMetricsResponse
$cfrom :: forall x.
JourneyExecutionActivityMetricsResponse
-> Rep JourneyExecutionActivityMetricsResponse x
Prelude.Generic)
newJourneyExecutionActivityMetricsResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
JourneyExecutionActivityMetricsResponse
newJourneyExecutionActivityMetricsResponse :: Text
-> Text
-> Text
-> Text
-> Text
-> JourneyExecutionActivityMetricsResponse
newJourneyExecutionActivityMetricsResponse
Text
pJourneyId_
Text
pLastEvaluatedTime_
Text
pJourneyActivityId_
Text
pActivityType_
Text
pApplicationId_ =
JourneyExecutionActivityMetricsResponse' :: HashMap Text Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse'
{ $sel:metrics:JourneyExecutionActivityMetricsResponse' :: HashMap Text Text
metrics =
HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
$sel:journeyId:JourneyExecutionActivityMetricsResponse' :: Text
journeyId = Text
pJourneyId_,
$sel:lastEvaluatedTime:JourneyExecutionActivityMetricsResponse' :: Text
lastEvaluatedTime =
Text
pLastEvaluatedTime_,
$sel:journeyActivityId:JourneyExecutionActivityMetricsResponse' :: Text
journeyActivityId =
Text
pJourneyActivityId_,
$sel:activityType:JourneyExecutionActivityMetricsResponse' :: Text
activityType = Text
pActivityType_,
$sel:applicationId:JourneyExecutionActivityMetricsResponse' :: Text
applicationId = Text
pApplicationId_
}
journeyExecutionActivityMetricsResponse_metrics :: Lens.Lens' JourneyExecutionActivityMetricsResponse (Prelude.HashMap Prelude.Text Prelude.Text)
journeyExecutionActivityMetricsResponse_metrics :: (HashMap Text Text -> f (HashMap Text Text))
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
journeyExecutionActivityMetricsResponse_metrics = (JourneyExecutionActivityMetricsResponse -> HashMap Text Text)
-> (JourneyExecutionActivityMetricsResponse
-> HashMap Text Text -> JourneyExecutionActivityMetricsResponse)
-> Lens
JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionActivityMetricsResponse' {HashMap Text Text
metrics :: HashMap Text Text
$sel:metrics:JourneyExecutionActivityMetricsResponse' :: JourneyExecutionActivityMetricsResponse -> HashMap Text Text
metrics} -> HashMap Text Text
metrics) (\s :: JourneyExecutionActivityMetricsResponse
s@JourneyExecutionActivityMetricsResponse' {} HashMap Text Text
a -> JourneyExecutionActivityMetricsResponse
s {$sel:metrics:JourneyExecutionActivityMetricsResponse' :: HashMap Text Text
metrics = HashMap Text Text
a} :: JourneyExecutionActivityMetricsResponse) ((HashMap Text Text -> f (HashMap Text Text))
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
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
journeyExecutionActivityMetricsResponse_journeyId :: Lens.Lens' JourneyExecutionActivityMetricsResponse Prelude.Text
journeyExecutionActivityMetricsResponse_journeyId :: (Text -> f Text)
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
journeyExecutionActivityMetricsResponse_journeyId = (JourneyExecutionActivityMetricsResponse -> Text)
-> (JourneyExecutionActivityMetricsResponse
-> Text -> JourneyExecutionActivityMetricsResponse)
-> Lens
JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionActivityMetricsResponse' {Text
journeyId :: Text
$sel:journeyId:JourneyExecutionActivityMetricsResponse' :: JourneyExecutionActivityMetricsResponse -> Text
journeyId} -> Text
journeyId) (\s :: JourneyExecutionActivityMetricsResponse
s@JourneyExecutionActivityMetricsResponse' {} Text
a -> JourneyExecutionActivityMetricsResponse
s {$sel:journeyId:JourneyExecutionActivityMetricsResponse' :: Text
journeyId = Text
a} :: JourneyExecutionActivityMetricsResponse)
journeyExecutionActivityMetricsResponse_lastEvaluatedTime :: Lens.Lens' JourneyExecutionActivityMetricsResponse Prelude.Text
journeyExecutionActivityMetricsResponse_lastEvaluatedTime :: (Text -> f Text)
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
journeyExecutionActivityMetricsResponse_lastEvaluatedTime = (JourneyExecutionActivityMetricsResponse -> Text)
-> (JourneyExecutionActivityMetricsResponse
-> Text -> JourneyExecutionActivityMetricsResponse)
-> Lens
JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionActivityMetricsResponse' {Text
lastEvaluatedTime :: Text
$sel:lastEvaluatedTime:JourneyExecutionActivityMetricsResponse' :: JourneyExecutionActivityMetricsResponse -> Text
lastEvaluatedTime} -> Text
lastEvaluatedTime) (\s :: JourneyExecutionActivityMetricsResponse
s@JourneyExecutionActivityMetricsResponse' {} Text
a -> JourneyExecutionActivityMetricsResponse
s {$sel:lastEvaluatedTime:JourneyExecutionActivityMetricsResponse' :: Text
lastEvaluatedTime = Text
a} :: JourneyExecutionActivityMetricsResponse)
journeyExecutionActivityMetricsResponse_journeyActivityId :: Lens.Lens' JourneyExecutionActivityMetricsResponse Prelude.Text
journeyExecutionActivityMetricsResponse_journeyActivityId :: (Text -> f Text)
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
journeyExecutionActivityMetricsResponse_journeyActivityId = (JourneyExecutionActivityMetricsResponse -> Text)
-> (JourneyExecutionActivityMetricsResponse
-> Text -> JourneyExecutionActivityMetricsResponse)
-> Lens
JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionActivityMetricsResponse' {Text
journeyActivityId :: Text
$sel:journeyActivityId:JourneyExecutionActivityMetricsResponse' :: JourneyExecutionActivityMetricsResponse -> Text
journeyActivityId} -> Text
journeyActivityId) (\s :: JourneyExecutionActivityMetricsResponse
s@JourneyExecutionActivityMetricsResponse' {} Text
a -> JourneyExecutionActivityMetricsResponse
s {$sel:journeyActivityId:JourneyExecutionActivityMetricsResponse' :: Text
journeyActivityId = Text
a} :: JourneyExecutionActivityMetricsResponse)
journeyExecutionActivityMetricsResponse_activityType :: Lens.Lens' JourneyExecutionActivityMetricsResponse Prelude.Text
journeyExecutionActivityMetricsResponse_activityType :: (Text -> f Text)
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
journeyExecutionActivityMetricsResponse_activityType = (JourneyExecutionActivityMetricsResponse -> Text)
-> (JourneyExecutionActivityMetricsResponse
-> Text -> JourneyExecutionActivityMetricsResponse)
-> Lens
JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionActivityMetricsResponse' {Text
activityType :: Text
$sel:activityType:JourneyExecutionActivityMetricsResponse' :: JourneyExecutionActivityMetricsResponse -> Text
activityType} -> Text
activityType) (\s :: JourneyExecutionActivityMetricsResponse
s@JourneyExecutionActivityMetricsResponse' {} Text
a -> JourneyExecutionActivityMetricsResponse
s {$sel:activityType:JourneyExecutionActivityMetricsResponse' :: Text
activityType = Text
a} :: JourneyExecutionActivityMetricsResponse)
journeyExecutionActivityMetricsResponse_applicationId :: Lens.Lens' JourneyExecutionActivityMetricsResponse Prelude.Text
journeyExecutionActivityMetricsResponse_applicationId :: (Text -> f Text)
-> JourneyExecutionActivityMetricsResponse
-> f JourneyExecutionActivityMetricsResponse
journeyExecutionActivityMetricsResponse_applicationId = (JourneyExecutionActivityMetricsResponse -> Text)
-> (JourneyExecutionActivityMetricsResponse
-> Text -> JourneyExecutionActivityMetricsResponse)
-> Lens
JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JourneyExecutionActivityMetricsResponse' {Text
applicationId :: Text
$sel:applicationId:JourneyExecutionActivityMetricsResponse' :: JourneyExecutionActivityMetricsResponse -> Text
applicationId} -> Text
applicationId) (\s :: JourneyExecutionActivityMetricsResponse
s@JourneyExecutionActivityMetricsResponse' {} Text
a -> JourneyExecutionActivityMetricsResponse
s {$sel:applicationId:JourneyExecutionActivityMetricsResponse' :: Text
applicationId = Text
a} :: JourneyExecutionActivityMetricsResponse)
instance
Core.FromJSON
JourneyExecutionActivityMetricsResponse
where
parseJSON :: Value -> Parser JourneyExecutionActivityMetricsResponse
parseJSON =
String
-> (Object -> Parser JourneyExecutionActivityMetricsResponse)
-> Value
-> Parser JourneyExecutionActivityMetricsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JourneyExecutionActivityMetricsResponse"
( \Object
x ->
HashMap Text Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> JourneyExecutionActivityMetricsResponse
JourneyExecutionActivityMetricsResponse'
(HashMap Text Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> JourneyExecutionActivityMetricsResponse)
-> Parser (HashMap Text Text)
-> Parser
(Text
-> Text
-> Text
-> Text
-> Text
-> JourneyExecutionActivityMetricsResponse)
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
-> Text
-> Text
-> JourneyExecutionActivityMetricsResponse)
-> Parser Text
-> Parser
(Text
-> Text -> Text -> Text -> JourneyExecutionActivityMetricsResponse)
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 -> Text -> Text -> JourneyExecutionActivityMetricsResponse)
-> Parser Text
-> Parser
(Text -> Text -> Text -> JourneyExecutionActivityMetricsResponse)
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 -> Text -> Text -> JourneyExecutionActivityMetricsResponse)
-> Parser Text
-> Parser (Text -> Text -> JourneyExecutionActivityMetricsResponse)
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
"JourneyActivityId")
Parser (Text -> Text -> JourneyExecutionActivityMetricsResponse)
-> Parser Text
-> Parser (Text -> JourneyExecutionActivityMetricsResponse)
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
"ActivityType")
Parser (Text -> JourneyExecutionActivityMetricsResponse)
-> Parser Text -> Parser JourneyExecutionActivityMetricsResponse
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
JourneyExecutionActivityMetricsResponse
instance
Prelude.NFData
JourneyExecutionActivityMetricsResponse