{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data PlacementStatistics = PlacementStatistics'
{
PlacementStatistics -> Maybe Double
dkimPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
inboxPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
missingPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
spamPercentage :: Prelude.Maybe Prelude.Double,
PlacementStatistics -> Maybe Double
spfPercentage :: Prelude.Maybe Prelude.Double
}
deriving (PlacementStatistics -> PlacementStatistics -> Bool
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]
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
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. 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'
{ $sel:dkimPercentage:PlacementStatistics' :: Maybe Double
dkimPercentage =
forall a. Maybe a
Prelude.Nothing,
$sel:inboxPercentage:PlacementStatistics' :: Maybe Double
inboxPercentage = forall a. Maybe a
Prelude.Nothing,
$sel:missingPercentage:PlacementStatistics' :: Maybe Double
missingPercentage = forall a. Maybe a
Prelude.Nothing,
$sel:spamPercentage:PlacementStatistics' :: Maybe Double
spamPercentage = forall a. Maybe a
Prelude.Nothing,
$sel:spfPercentage:PlacementStatistics' :: Maybe Double
spfPercentage = forall a. Maybe a
Prelude.Nothing
}
placementStatistics_dkimPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_dkimPercentage :: Lens' PlacementStatistics (Maybe Double)
placementStatistics_dkimPercentage = 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 :: Lens' PlacementStatistics (Maybe Double)
placementStatistics_inboxPercentage = 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)
placementStatistics_missingPercentage :: Lens.Lens' PlacementStatistics (Prelude.Maybe Prelude.Double)
placementStatistics_missingPercentage :: Lens' PlacementStatistics (Maybe Double)
placementStatistics_missingPercentage = 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 :: Lens' PlacementStatistics (Maybe Double)
placementStatistics_spamPercentage = 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 :: Lens' PlacementStatistics (Maybe Double)
placementStatistics_spfPercentage = 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)
instance Data.FromJSON PlacementStatistics where
parseJSON :: Value -> Parser PlacementStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PlacementStatistics"
( \Object
x ->
Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> PlacementStatistics
PlacementStatistics'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DkimPercentage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InboxPercentage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MissingPercentage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SpamPercentage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SpfPercentage")
)
instance Prelude.Hashable PlacementStatistics where
hashWithSalt :: Int -> PlacementStatistics -> Int
hashWithSalt Int
_salt PlacementStatistics' {Maybe Double
spfPercentage :: Maybe Double
spamPercentage :: Maybe Double
missingPercentage :: Maybe Double
inboxPercentage :: Maybe Double
dkimPercentage :: Maybe Double
$sel:spfPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:spamPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:missingPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:inboxPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:dkimPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
dkimPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
inboxPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
missingPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
spamPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
spfPercentage
instance Prelude.NFData PlacementStatistics where
rnf :: PlacementStatistics -> ()
rnf PlacementStatistics' {Maybe Double
spfPercentage :: Maybe Double
spamPercentage :: Maybe Double
missingPercentage :: Maybe Double
inboxPercentage :: Maybe Double
dkimPercentage :: Maybe Double
$sel:spfPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:spamPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:missingPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:inboxPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
$sel:dkimPercentage:PlacementStatistics' :: PlacementStatistics -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
dkimPercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
inboxPercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
missingPercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
spamPercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
spfPercentage