{-# 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.DedicatedIpPool 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.ScalingMode
data DedicatedIpPool = DedicatedIpPool'
{
DedicatedIpPool -> Text
poolName :: Prelude.Text,
DedicatedIpPool -> ScalingMode
scalingMode :: ScalingMode
}
deriving (DedicatedIpPool -> DedicatedIpPool -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DedicatedIpPool -> DedicatedIpPool -> Bool
$c/= :: DedicatedIpPool -> DedicatedIpPool -> Bool
== :: DedicatedIpPool -> DedicatedIpPool -> Bool
$c== :: DedicatedIpPool -> DedicatedIpPool -> Bool
Prelude.Eq, ReadPrec [DedicatedIpPool]
ReadPrec DedicatedIpPool
Int -> ReadS DedicatedIpPool
ReadS [DedicatedIpPool]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DedicatedIpPool]
$creadListPrec :: ReadPrec [DedicatedIpPool]
readPrec :: ReadPrec DedicatedIpPool
$creadPrec :: ReadPrec DedicatedIpPool
readList :: ReadS [DedicatedIpPool]
$creadList :: ReadS [DedicatedIpPool]
readsPrec :: Int -> ReadS DedicatedIpPool
$creadsPrec :: Int -> ReadS DedicatedIpPool
Prelude.Read, Int -> DedicatedIpPool -> ShowS
[DedicatedIpPool] -> ShowS
DedicatedIpPool -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DedicatedIpPool] -> ShowS
$cshowList :: [DedicatedIpPool] -> ShowS
show :: DedicatedIpPool -> String
$cshow :: DedicatedIpPool -> String
showsPrec :: Int -> DedicatedIpPool -> ShowS
$cshowsPrec :: Int -> DedicatedIpPool -> ShowS
Prelude.Show, forall x. Rep DedicatedIpPool x -> DedicatedIpPool
forall x. DedicatedIpPool -> Rep DedicatedIpPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DedicatedIpPool x -> DedicatedIpPool
$cfrom :: forall x. DedicatedIpPool -> Rep DedicatedIpPool x
Prelude.Generic)
newDedicatedIpPool ::
Prelude.Text ->
ScalingMode ->
DedicatedIpPool
newDedicatedIpPool :: Text -> ScalingMode -> DedicatedIpPool
newDedicatedIpPool Text
pPoolName_ ScalingMode
pScalingMode_ =
DedicatedIpPool'
{ $sel:poolName:DedicatedIpPool' :: Text
poolName = Text
pPoolName_,
$sel:scalingMode:DedicatedIpPool' :: ScalingMode
scalingMode = ScalingMode
pScalingMode_
}
dedicatedIpPool_poolName :: Lens.Lens' DedicatedIpPool Prelude.Text
dedicatedIpPool_poolName :: Lens' DedicatedIpPool Text
dedicatedIpPool_poolName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DedicatedIpPool' {Text
poolName :: Text
$sel:poolName:DedicatedIpPool' :: DedicatedIpPool -> Text
poolName} -> Text
poolName) (\s :: DedicatedIpPool
s@DedicatedIpPool' {} Text
a -> DedicatedIpPool
s {$sel:poolName:DedicatedIpPool' :: Text
poolName = Text
a} :: DedicatedIpPool)
dedicatedIpPool_scalingMode :: Lens.Lens' DedicatedIpPool ScalingMode
dedicatedIpPool_scalingMode :: Lens' DedicatedIpPool ScalingMode
dedicatedIpPool_scalingMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DedicatedIpPool' {ScalingMode
scalingMode :: ScalingMode
$sel:scalingMode:DedicatedIpPool' :: DedicatedIpPool -> ScalingMode
scalingMode} -> ScalingMode
scalingMode) (\s :: DedicatedIpPool
s@DedicatedIpPool' {} ScalingMode
a -> DedicatedIpPool
s {$sel:scalingMode:DedicatedIpPool' :: ScalingMode
scalingMode = ScalingMode
a} :: DedicatedIpPool)
instance Data.FromJSON DedicatedIpPool where
parseJSON :: Value -> Parser DedicatedIpPool
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DedicatedIpPool"
( \Object
x ->
Text -> ScalingMode -> DedicatedIpPool
DedicatedIpPool'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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
"ScalingMode")
)
instance Prelude.Hashable DedicatedIpPool where
hashWithSalt :: Int -> DedicatedIpPool -> Int
hashWithSalt Int
_salt DedicatedIpPool' {Text
ScalingMode
scalingMode :: ScalingMode
poolName :: Text
$sel:scalingMode:DedicatedIpPool' :: DedicatedIpPool -> ScalingMode
$sel:poolName:DedicatedIpPool' :: DedicatedIpPool -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
poolName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ScalingMode
scalingMode
instance Prelude.NFData DedicatedIpPool where
rnf :: DedicatedIpPool -> ()
rnf DedicatedIpPool' {Text
ScalingMode
scalingMode :: ScalingMode
poolName :: Text
$sel:scalingMode:DedicatedIpPool' :: DedicatedIpPool -> ScalingMode
$sel:poolName:DedicatedIpPool' :: DedicatedIpPool -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
poolName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ScalingMode
scalingMode