{-# 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.SESV2.Types.VolumeStatistics 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 VolumeStatistics = VolumeStatistics'
{
VolumeStatistics -> Maybe Integer
inboxRawCount :: Prelude.Maybe Prelude.Integer,
VolumeStatistics -> Maybe Integer
projectedInbox :: Prelude.Maybe Prelude.Integer,
VolumeStatistics -> Maybe Integer
projectedSpam :: Prelude.Maybe Prelude.Integer,
VolumeStatistics -> Maybe Integer
spamRawCount :: Prelude.Maybe Prelude.Integer
}
deriving (VolumeStatistics -> VolumeStatistics -> Bool
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]
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
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. 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'
{ $sel:inboxRawCount:VolumeStatistics' :: Maybe Integer
inboxRawCount = forall a. Maybe a
Prelude.Nothing,
$sel:projectedInbox:VolumeStatistics' :: Maybe Integer
projectedInbox = forall a. Maybe a
Prelude.Nothing,
$sel:projectedSpam:VolumeStatistics' :: Maybe Integer
projectedSpam = forall a. Maybe a
Prelude.Nothing,
$sel:spamRawCount:VolumeStatistics' :: Maybe Integer
spamRawCount = forall a. Maybe a
Prelude.Nothing
}
volumeStatistics_inboxRawCount :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_inboxRawCount :: Lens' VolumeStatistics (Maybe Integer)
volumeStatistics_inboxRawCount = 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_projectedInbox :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_projectedInbox :: Lens' VolumeStatistics (Maybe Integer)
volumeStatistics_projectedInbox = 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_projectedSpam :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_projectedSpam :: Lens' VolumeStatistics (Maybe Integer)
volumeStatistics_projectedSpam = 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_spamRawCount :: Lens.Lens' VolumeStatistics (Prelude.Maybe Prelude.Integer)
volumeStatistics_spamRawCount :: Lens' VolumeStatistics (Maybe Integer)
volumeStatistics_spamRawCount = 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 Data.FromJSON VolumeStatistics where
parseJSON :: Value -> Parser VolumeStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VolumeStatistics"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> VolumeStatistics
VolumeStatistics'
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
"InboxRawCount")
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
"ProjectedInbox")
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
"ProjectedSpam")
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
"SpamRawCount")
)
instance Prelude.Hashable VolumeStatistics where
hashWithSalt :: Int -> VolumeStatistics -> Int
hashWithSalt Int
_salt VolumeStatistics' {Maybe Integer
spamRawCount :: Maybe Integer
projectedSpam :: Maybe Integer
projectedInbox :: Maybe Integer
inboxRawCount :: Maybe Integer
$sel:spamRawCount:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
$sel:projectedSpam:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
$sel:projectedInbox:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
$sel:inboxRawCount:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
inboxRawCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
projectedInbox
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
projectedSpam
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
spamRawCount
instance Prelude.NFData VolumeStatistics where
rnf :: VolumeStatistics -> ()
rnf VolumeStatistics' {Maybe Integer
spamRawCount :: Maybe Integer
projectedSpam :: Maybe Integer
projectedInbox :: Maybe Integer
inboxRawCount :: Maybe Integer
$sel:spamRawCount:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
$sel:projectedSpam:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
$sel:projectedInbox:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
$sel:inboxRawCount:VolumeStatistics' :: VolumeStatistics -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
inboxRawCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
projectedInbox
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
projectedSpam
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
spamRawCount