{-# 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.DomainIspPlacement where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DomainIspPlacement = DomainIspPlacement'
{
DomainIspPlacement -> Maybe Double
spamPercentage :: Prelude.Maybe Prelude.Double,
DomainIspPlacement -> Maybe Integer
inboxRawCount :: Prelude.Maybe Prelude.Integer,
DomainIspPlacement -> Maybe Text
ispName :: Prelude.Maybe Prelude.Text,
DomainIspPlacement -> Maybe Double
inboxPercentage :: Prelude.Maybe Prelude.Double,
DomainIspPlacement -> Maybe Integer
spamRawCount :: Prelude.Maybe Prelude.Integer
}
deriving (DomainIspPlacement -> DomainIspPlacement -> Bool
(DomainIspPlacement -> DomainIspPlacement -> Bool)
-> (DomainIspPlacement -> DomainIspPlacement -> Bool)
-> Eq DomainIspPlacement
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]
(Int -> ReadS DomainIspPlacement)
-> ReadS [DomainIspPlacement]
-> ReadPrec DomainIspPlacement
-> ReadPrec [DomainIspPlacement]
-> Read 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
(Int -> DomainIspPlacement -> ShowS)
-> (DomainIspPlacement -> String)
-> ([DomainIspPlacement] -> ShowS)
-> Show DomainIspPlacement
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. DomainIspPlacement -> Rep DomainIspPlacement x)
-> (forall x. Rep DomainIspPlacement x -> DomainIspPlacement)
-> Generic DomainIspPlacement
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' :: Maybe Double
-> Maybe Integer
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> DomainIspPlacement
DomainIspPlacement'
{ $sel:spamPercentage:DomainIspPlacement' :: Maybe Double
spamPercentage =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:inboxRawCount:DomainIspPlacement' :: Maybe Integer
inboxRawCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:ispName:DomainIspPlacement' :: Maybe Text
ispName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inboxPercentage:DomainIspPlacement' :: Maybe Double
inboxPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:spamRawCount:DomainIspPlacement' :: Maybe Integer
spamRawCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
domainIspPlacement_spamPercentage :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Double)
domainIspPlacement_spamPercentage :: (Maybe Double -> f (Maybe Double))
-> DomainIspPlacement -> f DomainIspPlacement
domainIspPlacement_spamPercentage = (DomainIspPlacement -> Maybe Double)
-> (DomainIspPlacement -> Maybe Double -> DomainIspPlacement)
-> Lens
DomainIspPlacement DomainIspPlacement (Maybe Double) (Maybe Double)
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_inboxRawCount :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Integer)
domainIspPlacement_inboxRawCount :: (Maybe Integer -> f (Maybe Integer))
-> DomainIspPlacement -> f DomainIspPlacement
domainIspPlacement_inboxRawCount = (DomainIspPlacement -> Maybe Integer)
-> (DomainIspPlacement -> Maybe Integer -> DomainIspPlacement)
-> Lens
DomainIspPlacement
DomainIspPlacement
(Maybe Integer)
(Maybe Integer)
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 :: (Maybe Text -> f (Maybe Text))
-> DomainIspPlacement -> f DomainIspPlacement
domainIspPlacement_ispName = (DomainIspPlacement -> Maybe Text)
-> (DomainIspPlacement -> Maybe Text -> DomainIspPlacement)
-> Lens
DomainIspPlacement DomainIspPlacement (Maybe Text) (Maybe Text)
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_inboxPercentage :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Double)
domainIspPlacement_inboxPercentage :: (Maybe Double -> f (Maybe Double))
-> DomainIspPlacement -> f DomainIspPlacement
domainIspPlacement_inboxPercentage = (DomainIspPlacement -> Maybe Double)
-> (DomainIspPlacement -> Maybe Double -> DomainIspPlacement)
-> Lens
DomainIspPlacement DomainIspPlacement (Maybe Double) (Maybe Double)
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_spamRawCount :: Lens.Lens' DomainIspPlacement (Prelude.Maybe Prelude.Integer)
domainIspPlacement_spamRawCount :: (Maybe Integer -> f (Maybe Integer))
-> DomainIspPlacement -> f DomainIspPlacement
domainIspPlacement_spamRawCount = (DomainIspPlacement -> Maybe Integer)
-> (DomainIspPlacement -> Maybe Integer -> DomainIspPlacement)
-> Lens
DomainIspPlacement
DomainIspPlacement
(Maybe Integer)
(Maybe Integer)
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 Core.FromJSON DomainIspPlacement where
parseJSON :: Value -> Parser DomainIspPlacement
parseJSON =
String
-> (Object -> Parser DomainIspPlacement)
-> Value
-> Parser DomainIspPlacement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainIspPlacement"
( \Object
x ->
Maybe Double
-> Maybe Integer
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> DomainIspPlacement
DomainIspPlacement'
(Maybe Double
-> Maybe Integer
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> DomainIspPlacement)
-> Parser (Maybe Double)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> DomainIspPlacement)
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
"SpamPercentage")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Double
-> Maybe Integer
-> DomainIspPlacement)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text -> Maybe Double -> Maybe Integer -> DomainIspPlacement)
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
"InboxRawCount")
Parser
(Maybe Text -> Maybe Double -> Maybe Integer -> DomainIspPlacement)
-> Parser (Maybe Text)
-> Parser (Maybe Double -> Maybe Integer -> DomainIspPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IspName")
Parser (Maybe Double -> Maybe Integer -> DomainIspPlacement)
-> Parser (Maybe Double)
-> Parser (Maybe Integer -> DomainIspPlacement)
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")
Parser (Maybe Integer -> DomainIspPlacement)
-> Parser (Maybe Integer) -> Parser DomainIspPlacement
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 DomainIspPlacement
instance Prelude.NFData DomainIspPlacement