module Stratosphere.PinpointEmail.DedicatedIpPool (
        module Exports, DedicatedIpPool(..), mkDedicatedIpPool
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.PinpointEmail.DedicatedIpPool.TagsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DedicatedIpPool
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpointemail-dedicatedippool.html>
    DedicatedIpPool {DedicatedIpPool -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpointemail-dedicatedippool.html#cfn-pinpointemail-dedicatedippool-poolname>
                     DedicatedIpPool -> Maybe (Value Text)
poolName :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpointemail-dedicatedippool.html#cfn-pinpointemail-dedicatedippool-tags>
                     DedicatedIpPool -> Maybe [TagsProperty]
tags :: (Prelude.Maybe [TagsProperty])}
  deriving stock (DedicatedIpPool -> DedicatedIpPool -> Bool
(DedicatedIpPool -> DedicatedIpPool -> Bool)
-> (DedicatedIpPool -> DedicatedIpPool -> Bool)
-> Eq DedicatedIpPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DedicatedIpPool -> DedicatedIpPool -> Bool
== :: DedicatedIpPool -> DedicatedIpPool -> Bool
$c/= :: DedicatedIpPool -> DedicatedIpPool -> Bool
/= :: DedicatedIpPool -> DedicatedIpPool -> Bool
Prelude.Eq, Int -> DedicatedIpPool -> ShowS
[DedicatedIpPool] -> ShowS
DedicatedIpPool -> String
(Int -> DedicatedIpPool -> ShowS)
-> (DedicatedIpPool -> String)
-> ([DedicatedIpPool] -> ShowS)
-> Show DedicatedIpPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DedicatedIpPool -> ShowS
showsPrec :: Int -> DedicatedIpPool -> ShowS
$cshow :: DedicatedIpPool -> String
show :: DedicatedIpPool -> String
$cshowList :: [DedicatedIpPool] -> ShowS
showList :: [DedicatedIpPool] -> ShowS
Prelude.Show)
mkDedicatedIpPool :: DedicatedIpPool
mkDedicatedIpPool :: DedicatedIpPool
mkDedicatedIpPool
  = DedicatedIpPool
      {haddock_workaround_ :: ()
haddock_workaround_ = (), poolName :: Maybe (Value Text)
poolName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [TagsProperty]
tags = Maybe [TagsProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DedicatedIpPool where
  toResourceProperties :: DedicatedIpPool -> ResourceProperties
toResourceProperties DedicatedIpPool {Maybe [TagsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DedicatedIpPool -> ()
poolName :: DedicatedIpPool -> Maybe (Value Text)
tags :: DedicatedIpPool -> Maybe [TagsProperty]
haddock_workaround_ :: ()
poolName :: Maybe (Value Text)
tags :: Maybe [TagsProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PinpointEmail::DedicatedIpPool",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PoolName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
poolName,
                            Key -> [TagsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsProperty] -> (Key, Value))
-> Maybe [TagsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsProperty]
tags])}
instance JSON.ToJSON DedicatedIpPool where
  toJSON :: DedicatedIpPool -> Value
toJSON DedicatedIpPool {Maybe [TagsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DedicatedIpPool -> ()
poolName :: DedicatedIpPool -> Maybe (Value Text)
tags :: DedicatedIpPool -> Maybe [TagsProperty]
haddock_workaround_ :: ()
poolName :: Maybe (Value Text)
tags :: Maybe [TagsProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PoolName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
poolName,
               Key -> [TagsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsProperty] -> (Key, Value))
-> Maybe [TagsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsProperty]
tags]))
instance Property "PoolName" DedicatedIpPool where
  type PropertyType "PoolName" DedicatedIpPool = Value Prelude.Text
  set :: PropertyType "PoolName" DedicatedIpPool
-> DedicatedIpPool -> DedicatedIpPool
set PropertyType "PoolName" DedicatedIpPool
newValue DedicatedIpPool {Maybe [TagsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DedicatedIpPool -> ()
poolName :: DedicatedIpPool -> Maybe (Value Text)
tags :: DedicatedIpPool -> Maybe [TagsProperty]
haddock_workaround_ :: ()
poolName :: Maybe (Value Text)
tags :: Maybe [TagsProperty]
..}
    = DedicatedIpPool {poolName :: Maybe (Value Text)
poolName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PoolName" DedicatedIpPool
Value Text
newValue, Maybe [TagsProperty]
()
haddock_workaround_ :: ()
tags :: Maybe [TagsProperty]
haddock_workaround_ :: ()
tags :: Maybe [TagsProperty]
..}
instance Property "Tags" DedicatedIpPool where
  type PropertyType "Tags" DedicatedIpPool = [TagsProperty]
  set :: PropertyType "Tags" DedicatedIpPool
-> DedicatedIpPool -> DedicatedIpPool
set PropertyType "Tags" DedicatedIpPool
newValue DedicatedIpPool {Maybe [TagsProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DedicatedIpPool -> ()
poolName :: DedicatedIpPool -> Maybe (Value Text)
tags :: DedicatedIpPool -> Maybe [TagsProperty]
haddock_workaround_ :: ()
poolName :: Maybe (Value Text)
tags :: Maybe [TagsProperty]
..}
    = DedicatedIpPool {tags :: Maybe [TagsProperty]
tags = [TagsProperty] -> Maybe [TagsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagsProperty]
PropertyType "Tags" DedicatedIpPool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
poolName :: Maybe (Value Text)
haddock_workaround_ :: ()
poolName :: Maybe (Value Text)
..}