{-# 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.PinpointEmail.Types.PlacementStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PlacementStatistics = PlacementStatistics'
{
PlacementStatistics -> Maybe Double
missingPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
spamPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
spfPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
dkimPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
inboxPercentage :: Prelude.Maybe Prelude.Double
}
deriving (PlacementStatistics -> PlacementStatistics -> Bool
(PlacementStatistics -> PlacementStatistics -> Bool)
-> (PlacementStatistics -> PlacementStatistics -> Bool)
-> Eq PlacementStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PlacementStatistics -> PlacementStatistics -> Bool
$c/= :: PlacementStatistics -> PlacementStatistics -> Bool
== :: PlacementStatistics -> PlacementStatistics -> Bool
$c== :: PlacementStatistics -> PlacementStatistics -> Bool
Prelude.Eq, ReadPrec [PlacementStatistics]
ReadPrec PlacementStatistics
Int -> ReadS PlacementStatistics
ReadS [PlacementStatistics]
(Int -> ReadS PlacementStatistics)
-> ReadS [PlacementStatistics]
-> ReadPrec PlacementStatistics
-> ReadPrec [PlacementStatistics]
-> Read PlacementStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PlacementStatistics]
$creadListPrec :: ReadPrec [PlacementStatistics]
readPrec :: ReadPrec PlacementStatistics
$creadPrec :: ReadPrec PlacementStatistics
readList :: ReadS [PlacementStatistics]
$creadList :: ReadS [PlacementStatistics]
readsPrec :: Int -> ReadS PlacementStatistics
$creadsPrec :: Int -> ReadS PlacementStatistics
Prelude.Read, Int -> PlacementStatistics -> ShowS
[PlacementStatistics] -> ShowS
PlacementStatistics -> String
(Int -> PlacementStatistics -> ShowS)
-> (PlacementStatistics -> String)
-> ([PlacementStatistics] -> ShowS)
-> Show PlacementStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlacementStatistics] -> ShowS
$cshowList :: [PlacementStatistics] -> ShowS
show :: PlacementStatistics -> String
$cshow :: PlacementStatistics -> String
showsPrec :: Int -> PlacementStatistics -> ShowS
$cshowsPrec :: Int -> PlacementStatistics -> ShowS
Prelude.Show, (forall x. PlacementStatistics -> Rep PlacementStatistics x)
-> (forall x. Rep PlacementStatistics x -> PlacementStatistics)
-> Generic PlacementStatistics
forall x. Rep PlacementStatistics x -> PlacementStatistics
forall x. PlacementStatistics -> Rep PlacementStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PlacementStatistics x -> PlacementStatistics
$cfrom :: forall x. PlacementStatistics -> Rep PlacementStatistics x
Prelude.Generic)
newPlacementStatistics ::
PlacementStatistics
newPlacementStatistics :: PlacementStatistics
newPlacementStatistics =
PlacementStatistics' :: Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> PlacementStatistics
PlacementStatistics'
{ $sel:missingPercentage:PlacementStatistics' :: Maybe Double
missingPercentage =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:spamPercentage:PlacementStatistics' :: Maybe Double
spamPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:spfPercentage:PlacementStatistics' :: Maybe Double
spfPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:dkimPercentage:PlacementStatistics' :: Maybe Double
dkimPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:inboxPercentage:PlacementStatistics' :: Maybe Double
inboxPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
placementStatistics_missingPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_missingPercentage :: (Maybe Double -> f (Maybe Double))
-> PlacementStatistics -> f PlacementStatistics
placementStatistics_missingPercentage = (PlacementStatistics -> Maybe Double)
-> (PlacementStatistics -> Maybe Double -> PlacementStatistics)
-> Lens
PlacementStatistics
PlacementStatistics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementStatistics' {Maybe Double
missingPercentage :: Maybe Double
$sel:missingPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
missingPercentage} -> Maybe Double
missingPercentage) (\s :: PlacementStatistics
s@PlacementStatistics' {} Maybe Double
a -> PlacementStatistics
s {$sel:missingPercentage:PlacementStatistics' :: Maybe Double
missingPercentage = Maybe Double
a} :: PlacementStatistics)
placementStatistics_spamPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_spamPercentage :: (Maybe Double -> f (Maybe Double))
-> PlacementStatistics -> f PlacementStatistics
placementStatistics_spamPercentage = (PlacementStatistics -> Maybe Double)
-> (PlacementStatistics -> Maybe Double -> PlacementStatistics)
-> Lens
PlacementStatistics
PlacementStatistics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementStatistics' {Maybe Double
spamPercentage :: Maybe Double
$sel:spamPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
spamPercentage} -> Maybe Double
spamPercentage) (\s :: PlacementStatistics
s@PlacementStatistics' {} Maybe Double
a -> PlacementStatistics
s {$sel:spamPercentage:PlacementStatistics' :: Maybe Double
spamPercentage = Maybe Double
a} :: PlacementStatistics)
placementStatistics_spfPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_spfPercentage :: (Maybe Double -> f (Maybe Double))
-> PlacementStatistics -> f PlacementStatistics
placementStatistics_spfPercentage = (PlacementStatistics -> Maybe Double)
-> (PlacementStatistics -> Maybe Double -> PlacementStatistics)
-> Lens
PlacementStatistics
PlacementStatistics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementStatistics' {Maybe Double
spfPercentage :: Maybe Double
$sel:spfPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
spfPercentage} -> Maybe Double
spfPercentage) (\s :: PlacementStatistics
s@PlacementStatistics' {} Maybe Double
a -> PlacementStatistics
s {$sel:spfPercentage:PlacementStatistics' :: Maybe Double
spfPercentage = Maybe Double
a} :: PlacementStatistics)
placementStatistics_dkimPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_dkimPercentage :: (Maybe Double -> f (Maybe Double))
-> PlacementStatistics -> f PlacementStatistics
placementStatistics_dkimPercentage = (PlacementStatistics -> Maybe Double)
-> (PlacementStatistics -> Maybe Double -> PlacementStatistics)
-> Lens
PlacementStatistics
PlacementStatistics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementStatistics' {Maybe Double
dkimPercentage :: Maybe Double
$sel:dkimPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
dkimPercentage} -> Maybe Double
dkimPercentage) (\s :: PlacementStatistics
s@PlacementStatistics' {} Maybe Double
a -> PlacementStatistics
s {$sel:dkimPercentage:PlacementStatistics' :: Maybe Double
dkimPercentage = Maybe Double
a} :: PlacementStatistics)
placementStatistics_inboxPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_inboxPercentage :: (Maybe Double -> f (Maybe Double))
-> PlacementStatistics -> f PlacementStatistics
placementStatistics_inboxPercentage = (PlacementStatistics -> Maybe Double)
-> (PlacementStatistics -> Maybe Double -> PlacementStatistics)
-> Lens
PlacementStatistics
PlacementStatistics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementStatistics' {Maybe Double
inboxPercentage :: Maybe Double
$sel:inboxPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
inboxPercentage} -> Maybe Double
inboxPercentage) (\s :: PlacementStatistics
s@PlacementStatistics' {} Maybe Double
a -> PlacementStatistics
s {$sel:inboxPercentage:PlacementStatistics' :: Maybe Double
inboxPercentage = Maybe Double
a} :: PlacementStatistics)
instance Core.FromJSON PlacementStatistics where
parseJSON :: Value -> Parser PlacementStatistics
parseJSON =
String
-> (Object -> Parser PlacementStatistics)
-> Value
-> Parser PlacementStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PlacementStatistics"
( \Object
x ->
Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> PlacementStatistics
PlacementStatistics'
(Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> PlacementStatistics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> PlacementStatistics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MissingPercentage")
Parser
(Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> PlacementStatistics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Double -> Maybe Double -> PlacementStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SpamPercentage")
Parser
(Maybe Double
-> Maybe Double -> Maybe Double -> PlacementStatistics)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> Maybe Double -> PlacementStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SpfPercentage")
Parser (Maybe Double -> Maybe Double -> PlacementStatistics)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> PlacementStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DkimPercentage")
Parser (Maybe Double -> PlacementStatistics)
-> Parser (Maybe Double) -> Parser PlacementStatistics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InboxPercentage")
)
instance Prelude.Hashable PlacementStatistics
instance Prelude.NFData PlacementStatistics