{-# 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.DomainIspPlacement 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 DomainIspPlacement = DomainIspPlacement'
{
DomainIspPlacement -> Maybe Double
inboxPercentage :: Prelude.Maybe Prelude.Double,
DomainIspPlacement -> Maybe Integer
inboxRawCount :: Prelude.Maybe Prelude.Integer,
DomainIspPlacement -> Maybe Text
ispName :: Prelude.Maybe Prelude.Text,
DomainIspPlacement -> Maybe Double
spamPercentage :: Prelude.Maybe Prelude.Double,
DomainIspPlacement -> Maybe Integer
spamRawCount :: Prelude.Maybe Prelude.Integer
}
deriving (DomainIspPlacement -> DomainIspPlacement -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainIspPlacement -> DomainIspPlacement -> Bool
$c/= :: DomainIspPlacement -> DomainIspPlacement -> Bool
== :: DomainIspPlacement -> DomainIspPlacement -> Bool
$c== :: DomainIspPlacement -> DomainIspPlacement -> Bool
Prelude.Eq, ReadPrec [DomainIspPlacement]
ReadPrec DomainIspPlacement
Int -> ReadS DomainIspPlacement
ReadS [DomainIspPlacement]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainIspPlacement]
$creadListPrec :: ReadPrec [DomainIspPlacement]
readPrec :: ReadPrec DomainIspPlacement
$creadPrec :: ReadPrec DomainIspPlacement
readList :: ReadS [DomainIspPlacement]
$creadList :: ReadS [DomainIspPlacement]
readsPrec :: Int -> ReadS DomainIspPlacement
$creadsPrec :: Int -> ReadS DomainIspPlacement
Prelude.Read, Int -> DomainIspPlacement -> ShowS
[DomainIspPlacement] -> ShowS
DomainIspPlacement -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainIspPlacement] -> ShowS
$cshowList :: [DomainIspPlacement] -> ShowS
show :: DomainIspPlacement -> String
$cshow :: DomainIspPlacement -> String
showsPrec :: Int -> DomainIspPlacement -> ShowS
$cshowsPrec :: Int -> DomainIspPlacement -> ShowS
Prelude.Show, forall x. Rep DomainIspPlacement x -> DomainIspPlacement
forall x. DomainIspPlacement -> Rep DomainIspPlacement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainIspPlacement x -> DomainIspPlacement
$cfrom :: forall x. DomainIspPlacement -> Rep DomainIspPlacement x
Prelude.Generic)
newDomainIspPlacement ::
DomainIspPlacement
newDomainIspPlacement :: DomainIspPlacement
newDomainIspPlacement =
DomainIspPlacement'
{ $sel:inboxPercentage:DomainIspPlacement' :: Maybe Double
inboxPercentage =
forall a. Maybe a
Prelude.Nothing,
$sel:inboxRawCount:DomainIspPlacement' :: Maybe Integer
inboxRawCount = forall a. Maybe a
Prelude.Nothing,
$sel:ispName:DomainIspPlacement' :: Maybe Text
ispName = forall a. Maybe a
Prelude.Nothing,
$sel:spamPercentage:DomainIspPlacement' :: Maybe Double
spamPercentage = forall a. Maybe a
Prelude.Nothing,
$sel:spamRawCount:DomainIspPlacement' :: Maybe Integer
spamRawCount = forall a. Maybe a
Prelude.Nothing
}
domainIspPlacement_inboxPercentage :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Double)
domainIspPlacement_inboxPercentage :: Lens' DomainIspPlacement (Maybe Double)
domainIspPlacement_inboxPercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainIspPlacement' {Maybe Double
inboxPercentage :: Maybe Double
$sel:inboxPercentage:DomainIspPlacement' :: DomainIspPlacement -> Maybe Double
inboxPercentage} -> Maybe Double
inboxPercentage) (\s :: DomainIspPlacement
s@DomainIspPlacement' {} Maybe Double
a -> DomainIspPlacement
s {$sel:inboxPercentage:DomainIspPlacement' :: Maybe Double
inboxPercentage = Maybe Double
a} :: DomainIspPlacement)
domainIspPlacement_inboxRawCount :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Integer)
domainIspPlacement_inboxRawCount :: Lens' DomainIspPlacement (Maybe Integer)
domainIspPlacement_inboxRawCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainIspPlacement' {Maybe Integer
inboxRawCount :: Maybe Integer
$sel:inboxRawCount:DomainIspPlacement' :: DomainIspPlacement -> Maybe Integer
inboxRawCount} -> Maybe Integer
inboxRawCount) (\s :: DomainIspPlacement
s@DomainIspPlacement' {} Maybe Integer
a -> DomainIspPlacement
s {$sel:inboxRawCount:DomainIspPlacement' :: Maybe Integer
inboxRawCount = Maybe Integer
a} :: DomainIspPlacement)
domainIspPlacement_ispName :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Text)
domainIspPlacement_ispName :: Lens' DomainIspPlacement (Maybe Text)
domainIspPlacement_ispName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainIspPlacement' {Maybe Text
ispName :: Maybe Text
$sel:ispName:DomainIspPlacement' :: DomainIspPlacement -> Maybe Text
ispName} -> Maybe Text
ispName) (\s :: DomainIspPlacement
s@DomainIspPlacement' {} Maybe Text
a -> DomainIspPlacement
s {$sel:ispName:DomainIspPlacement' :: Maybe Text
ispName = Maybe Text
a} :: DomainIspPlacement)
domainIspPlacement_spamPercentage :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Double)
domainIspPlacement_spamPercentage :: Lens' DomainIspPlacement (Maybe Double)
domainIspPlacement_spamPercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainIspPlacement' {Maybe Double
spamPercentage :: Maybe Double
$sel:spamPercentage:DomainIspPlacement' :: DomainIspPlacement -> Maybe Double
spamPercentage} -> Maybe Double
spamPercentage) (\s :: DomainIspPlacement
s@DomainIspPlacement' {} Maybe Double
a -> DomainIspPlacement
s {$sel:spamPercentage:DomainIspPlacement' :: Maybe Double
spamPercentage = Maybe Double
a} :: DomainIspPlacement)
domainIspPlacement_spamRawCount :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Integer)
domainIspPlacement_spamRawCount :: Lens' DomainIspPlacement (Maybe Integer)
domainIspPlacement_spamRawCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainIspPlacement' {Maybe Integer
spamRawCount :: Maybe Integer
$sel:spamRawCount:DomainIspPlacement' :: DomainIspPlacement -> Maybe Integer
spamRawCount} -> Maybe Integer
spamRawCount) (\s :: DomainIspPlacement
s@DomainIspPlacement' {} Maybe Integer
a -> DomainIspPlacement
s {$sel:spamRawCount:DomainIspPlacement' :: Maybe Integer
spamRawCount = Maybe Integer
a} :: DomainIspPlacement)
instance Data.FromJSON DomainIspPlacement where
parseJSON :: Value -> Parser DomainIspPlacement
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DomainIspPlacement"
( \Object
x ->
Maybe Double
-> Maybe Integer
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> DomainIspPlacement
DomainIspPlacement'
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
"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
"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
"IspName")
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
"SpamRawCount")
)
instance Prelude.Hashable DomainIspPlacement where
hashWithSalt :: Int -> DomainIspPlacement -> Int
hashWithSalt Int
_salt DomainIspPlacement' {Maybe Double
Maybe Integer
Maybe Text
spamRawCount :: Maybe Integer
spamPercentage :: Maybe Double
ispName :: Maybe Text
inboxRawCount :: Maybe Integer
inboxPercentage :: Maybe Double
$sel:spamRawCount:DomainIspPlacement' :: DomainIspPlacement -> Maybe Integer
$sel:spamPercentage:DomainIspPlacement' :: DomainIspPlacement -> Maybe Double
$sel:ispName:DomainIspPlacement' :: DomainIspPlacement -> Maybe Text
$sel:inboxRawCount:DomainIspPlacement' :: DomainIspPlacement -> Maybe Integer
$sel:inboxPercentage:DomainIspPlacement' :: DomainIspPlacement -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
inboxPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
inboxRawCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ispName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
spamPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
spamRawCount
instance Prelude.NFData DomainIspPlacement where
rnf :: DomainIspPlacement -> ()
rnf DomainIspPlacement' {Maybe Double
Maybe Integer
Maybe Text
spamRawCount :: Maybe Integer
spamPercentage :: Maybe Double
ispName :: Maybe Text
inboxRawCount :: Maybe Integer
inboxPercentage :: Maybe Double
$sel:spamRawCount:DomainIspPlacement' :: DomainIspPlacement -> Maybe Integer
$sel:spamPercentage:DomainIspPlacement' :: DomainIspPlacement -> Maybe Double
$sel:ispName:DomainIspPlacement' :: DomainIspPlacement -> Maybe Text
$sel:inboxRawCount:DomainIspPlacement' :: DomainIspPlacement -> Maybe Integer
$sel:inboxPercentage:DomainIspPlacement' :: DomainIspPlacement -> Maybe Double
..} =
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 Integer
inboxRawCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ispName
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 Integer
spamRawCount