{-# 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.VolumeStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VolumeStatistics = VolumeStatistics'
{
VolumeStatistics -> Maybe Integer
inboxRawCount :: Prelude.Maybe Prelude.Integer,
VolumeStatistics -> Maybe Integer
projectedSpam :: Prelude.Maybe Prelude.Integer,
VolumeStatistics -> Maybe Integer
projectedInbox :: Prelude.Maybe Prelude.Integer,
VolumeStatistics -> Maybe Integer
spamRawCount :: Prelude.Maybe Prelude.Integer
}
deriving (VolumeStatistics -> VolumeStatistics -> Bool
(VolumeStatistics -> VolumeStatistics -> Bool)
-> (VolumeStatistics -> VolumeStatistics -> Bool)
-> Eq VolumeStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeStatistics -> VolumeStatistics -> Bool
$c/= :: VolumeStatistics -> VolumeStatistics -> Bool
== :: VolumeStatistics -> VolumeStatistics -> Bool
$c== :: VolumeStatistics -> VolumeStatistics -> Bool
Prelude.Eq, ReadPrec [VolumeStatistics]
ReadPrec VolumeStatistics
Int -> ReadS VolumeStatistics
ReadS [VolumeStatistics]
(Int -> ReadS VolumeStatistics)
-> ReadS [VolumeStatistics]
-> ReadPrec VolumeStatistics
-> ReadPrec [VolumeStatistics]
-> Read VolumeStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeStatistics]
$creadListPrec :: ReadPrec [VolumeStatistics]
readPrec :: ReadPrec VolumeStatistics
$creadPrec :: ReadPrec VolumeStatistics
readList :: ReadS [VolumeStatistics]
$creadList :: ReadS [VolumeStatistics]
readsPrec :: Int -> ReadS VolumeStatistics
$creadsPrec :: Int -> ReadS VolumeStatistics
Prelude.Read, Int -> VolumeStatistics -> ShowS
[VolumeStatistics] -> ShowS
VolumeStatistics -> String
(Int -> VolumeStatistics -> ShowS)
-> (VolumeStatistics -> String)
-> ([VolumeStatistics] -> ShowS)
-> Show VolumeStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeStatistics] -> ShowS
$cshowList :: [VolumeStatistics] -> ShowS
show :: VolumeStatistics -> String
$cshow :: VolumeStatistics -> String
showsPrec :: Int -> VolumeStatistics -> ShowS
$cshowsPrec :: Int -> VolumeStatistics -> ShowS
Prelude.Show, (forall x. VolumeStatistics -> Rep VolumeStatistics x)
-> (forall x. Rep VolumeStatistics x -> VolumeStatistics)
-> Generic VolumeStatistics
forall x. Rep VolumeStatistics x -> VolumeStatistics
forall x. VolumeStatistics -> Rep VolumeStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeStatistics x -> VolumeStatistics
$cfrom :: forall x. VolumeStatistics -> Rep VolumeStatistics x
Prelude.Generic)
newVolumeStatistics ::
VolumeStatistics
newVolumeStatistics :: VolumeStatistics
newVolumeStatistics =
VolumeStatistics' :: Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> VolumeStatistics
VolumeStatistics'
{ $sel:inboxRawCount:VolumeStatistics' :: Maybe Integer
inboxRawCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:projectedSpam:VolumeStatistics' :: Maybe Integer
projectedSpam = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:projectedInbox:VolumeStatistics' :: Maybe Integer
projectedInbox = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:spamRawCount:VolumeStatistics' :: Maybe Integer
spamRawCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
volumeStatistics_inboxRawCount :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_inboxRawCount :: (Maybe Integer -> f (Maybe Integer))
-> VolumeStatistics -> f VolumeStatistics
volumeStatistics_inboxRawCount = (VolumeStatistics -> Maybe Integer)
-> (VolumeStatistics -> Maybe Integer -> VolumeStatistics)
-> Lens
VolumeStatistics VolumeStatistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeStatistics' {Maybe Integer
inboxRawCount :: Maybe Integer
$sel:inboxRawCount:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
inboxRawCount} -> Maybe Integer
inboxRawCount) (\s :: VolumeStatistics
s@VolumeStatistics' {} Maybe Integer
a -> VolumeStatistics
s {$sel:inboxRawCount:VolumeStatistics' :: Maybe Integer
inboxRawCount = Maybe Integer
a} :: VolumeStatistics)
volumeStatistics_projectedSpam :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_projectedSpam :: (Maybe Integer -> f (Maybe Integer))
-> VolumeStatistics -> f VolumeStatistics
volumeStatistics_projectedSpam = (VolumeStatistics -> Maybe Integer)
-> (VolumeStatistics -> Maybe Integer -> VolumeStatistics)
-> Lens
VolumeStatistics VolumeStatistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeStatistics' {Maybe Integer
projectedSpam :: Maybe Integer
$sel:projectedSpam:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
projectedSpam} -> Maybe Integer
projectedSpam) (\s :: VolumeStatistics
s@VolumeStatistics' {} Maybe Integer
a -> VolumeStatistics
s {$sel:projectedSpam:VolumeStatistics' :: Maybe Integer
projectedSpam = Maybe Integer
a} :: VolumeStatistics)
volumeStatistics_projectedInbox :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_projectedInbox :: (Maybe Integer -> f (Maybe Integer))
-> VolumeStatistics -> f VolumeStatistics
volumeStatistics_projectedInbox = (VolumeStatistics -> Maybe Integer)
-> (VolumeStatistics -> Maybe Integer -> VolumeStatistics)
-> Lens
VolumeStatistics VolumeStatistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeStatistics' {Maybe Integer
projectedInbox :: Maybe Integer
$sel:projectedInbox:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
projectedInbox} -> Maybe Integer
projectedInbox) (\s :: VolumeStatistics
s@VolumeStatistics' {} Maybe Integer
a -> VolumeStatistics
s {$sel:projectedInbox:VolumeStatistics' :: Maybe Integer
projectedInbox = Maybe Integer
a} :: VolumeStatistics)
volumeStatistics_spamRawCount :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_spamRawCount :: (Maybe Integer -> f (Maybe Integer))
-> VolumeStatistics -> f VolumeStatistics
volumeStatistics_spamRawCount = (VolumeStatistics -> Maybe Integer)
-> (VolumeStatistics -> Maybe Integer -> VolumeStatistics)
-> Lens
VolumeStatistics VolumeStatistics (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeStatistics' {Maybe Integer
spamRawCount :: Maybe Integer
$sel:spamRawCount:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
spamRawCount} -> Maybe Integer
spamRawCount) (\s :: VolumeStatistics
s@VolumeStatistics' {} Maybe Integer
a -> VolumeStatistics
s {$sel:spamRawCount:VolumeStatistics' :: Maybe Integer
spamRawCount = Maybe Integer
a} :: VolumeStatistics)
instance Core.FromJSON VolumeStatistics where
parseJSON :: Value -> Parser VolumeStatistics
parseJSON =
String
-> (Object -> Parser VolumeStatistics)
-> Value
-> Parser VolumeStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VolumeStatistics"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> VolumeStatistics
VolumeStatistics'
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> VolumeStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> VolumeStatistics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InboxRawCount")
Parser
(Maybe Integer
-> Maybe Integer -> Maybe Integer -> VolumeStatistics)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> Maybe Integer -> VolumeStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProjectedSpam")
Parser (Maybe Integer -> Maybe Integer -> VolumeStatistics)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> VolumeStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProjectedInbox")
Parser (Maybe Integer -> VolumeStatistics)
-> Parser (Maybe Integer) -> Parser VolumeStatistics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SpamRawCount")
)
instance Prelude.Hashable VolumeStatistics
instance Prelude.NFData VolumeStatistics