{-# 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.DedicatedIp 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
import Amazonka.SESV2.Types.WarmupStatus
data DedicatedIp = DedicatedIp'
{
DedicatedIp -> Maybe Text
poolName :: Prelude.Maybe Prelude.Text,
DedicatedIp -> Text
ip :: Prelude.Text,
DedicatedIp -> WarmupStatus
warmupStatus :: WarmupStatus,
DedicatedIp -> Int
warmupPercentage :: Prelude.Int
}
deriving (DedicatedIp -> DedicatedIp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DedicatedIp -> DedicatedIp -> Bool
$c/= :: DedicatedIp -> DedicatedIp -> Bool
== :: DedicatedIp -> DedicatedIp -> Bool
$c== :: DedicatedIp -> DedicatedIp -> Bool
Prelude.Eq, ReadPrec [DedicatedIp]
ReadPrec DedicatedIp
Int -> ReadS DedicatedIp
ReadS [DedicatedIp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DedicatedIp]
$creadListPrec :: ReadPrec [DedicatedIp]
readPrec :: ReadPrec DedicatedIp
$creadPrec :: ReadPrec DedicatedIp
readList :: ReadS [DedicatedIp]
$creadList :: ReadS [DedicatedIp]
readsPrec :: Int -> ReadS DedicatedIp
$creadsPrec :: Int -> ReadS DedicatedIp
Prelude.Read, Int -> DedicatedIp -> ShowS
[DedicatedIp] -> ShowS
DedicatedIp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DedicatedIp] -> ShowS
$cshowList :: [DedicatedIp] -> ShowS
show :: DedicatedIp -> String
$cshow :: DedicatedIp -> String
showsPrec :: Int -> DedicatedIp -> ShowS
$cshowsPrec :: Int -> DedicatedIp -> ShowS
Prelude.Show, forall x. Rep DedicatedIp x -> DedicatedIp
forall x. DedicatedIp -> Rep DedicatedIp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DedicatedIp x -> DedicatedIp
$cfrom :: forall x. DedicatedIp -> Rep DedicatedIp x
Prelude.Generic)
newDedicatedIp ::
Prelude.Text ->
WarmupStatus ->
Prelude.Int ->
DedicatedIp
newDedicatedIp :: Text -> WarmupStatus -> Int -> DedicatedIp
newDedicatedIp Text
pIp_ WarmupStatus
pWarmupStatus_ Int
pWarmupPercentage_ =
DedicatedIp'
{ $sel:poolName:DedicatedIp' :: Maybe Text
poolName = forall a. Maybe a
Prelude.Nothing,
$sel:ip:DedicatedIp' :: Text
ip = Text
pIp_,
$sel:warmupStatus:DedicatedIp' :: WarmupStatus
warmupStatus = WarmupStatus
pWarmupStatus_,
$sel:warmupPercentage:DedicatedIp' :: Int
warmupPercentage = Int
pWarmupPercentage_
}
dedicatedIp_poolName :: Lens.Lens' DedicatedIp (Prelude.Maybe Prelude.Text)
dedicatedIp_poolName :: Lens' DedicatedIp (Maybe Text)
dedicatedIp_poolName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DedicatedIp' {Maybe Text
poolName :: Maybe Text
$sel:poolName:DedicatedIp' :: DedicatedIp -> Maybe Text
poolName} -> Maybe Text
poolName) (\s :: DedicatedIp
s@DedicatedIp' {} Maybe Text
a -> DedicatedIp
s {$sel:poolName:DedicatedIp' :: Maybe Text
poolName = Maybe Text
a} :: DedicatedIp)
dedicatedIp_ip :: Lens.Lens' DedicatedIp Prelude.Text
dedicatedIp_ip :: Lens' DedicatedIp Text
dedicatedIp_ip = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DedicatedIp' {Text
ip :: Text
$sel:ip:DedicatedIp' :: DedicatedIp -> Text
ip} -> Text
ip) (\s :: DedicatedIp
s@DedicatedIp' {} Text
a -> DedicatedIp
s {$sel:ip:DedicatedIp' :: Text
ip = Text
a} :: DedicatedIp)
dedicatedIp_warmupStatus :: Lens.Lens' DedicatedIp WarmupStatus
dedicatedIp_warmupStatus :: Lens' DedicatedIp WarmupStatus
dedicatedIp_warmupStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DedicatedIp' {WarmupStatus
warmupStatus :: WarmupStatus
$sel:warmupStatus:DedicatedIp' :: DedicatedIp -> WarmupStatus
warmupStatus} -> WarmupStatus
warmupStatus) (\s :: DedicatedIp
s@DedicatedIp' {} WarmupStatus
a -> DedicatedIp
s {$sel:warmupStatus:DedicatedIp' :: WarmupStatus
warmupStatus = WarmupStatus
a} :: DedicatedIp)
dedicatedIp_warmupPercentage :: Lens.Lens' DedicatedIp Prelude.Int
dedicatedIp_warmupPercentage :: Lens' DedicatedIp Int
dedicatedIp_warmupPercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DedicatedIp' {Int
warmupPercentage :: Int
$sel:warmupPercentage:DedicatedIp' :: DedicatedIp -> Int
warmupPercentage} -> Int
warmupPercentage) (\s :: DedicatedIp
s@DedicatedIp' {} Int
a -> DedicatedIp
s {$sel:warmupPercentage:DedicatedIp' :: Int
warmupPercentage = Int
a} :: DedicatedIp)
instance Data.FromJSON DedicatedIp where
parseJSON :: Value -> Parser DedicatedIp
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DedicatedIp"
( \Object
x ->
Maybe Text -> Text -> WarmupStatus -> Int -> DedicatedIp
DedicatedIp'
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
"PoolName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Ip")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"WarmupStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"WarmupPercentage")
)
instance Prelude.Hashable DedicatedIp where
hashWithSalt :: Int -> DedicatedIp -> Int
hashWithSalt Int
_salt DedicatedIp' {Int
Maybe Text
Text
WarmupStatus
warmupPercentage :: Int
warmupStatus :: WarmupStatus
ip :: Text
poolName :: Maybe Text
$sel:warmupPercentage:DedicatedIp' :: DedicatedIp -> Int
$sel:warmupStatus:DedicatedIp' :: DedicatedIp -> WarmupStatus
$sel:ip:DedicatedIp' :: DedicatedIp -> Text
$sel:poolName:DedicatedIp' :: DedicatedIp -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
poolName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ip
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WarmupStatus
warmupStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
warmupPercentage
instance Prelude.NFData DedicatedIp where
rnf :: DedicatedIp -> ()
rnf DedicatedIp' {Int
Maybe Text
Text
WarmupStatus
warmupPercentage :: Int
warmupStatus :: WarmupStatus
ip :: Text
poolName :: Maybe Text
$sel:warmupPercentage:DedicatedIp' :: DedicatedIp -> Int
$sel:warmupStatus:DedicatedIp' :: DedicatedIp -> WarmupStatus
$sel:ip:DedicatedIp' :: DedicatedIp -> Text
$sel:poolName:DedicatedIp' :: DedicatedIp -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
poolName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ip
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WarmupStatus
warmupStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
warmupPercentage