module Stratosphere.SES.MailManagerAddonInstance (
        MailManagerAddonInstance(..), mkMailManagerAddonInstance
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data MailManagerAddonInstance
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-mailmanageraddoninstance.html>
    MailManagerAddonInstance {MailManagerAddonInstance -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-mailmanageraddoninstance.html#cfn-ses-mailmanageraddoninstance-addonsubscriptionid>
                              MailManagerAddonInstance -> Value Text
addonSubscriptionId :: (Value Prelude.Text),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-mailmanageraddoninstance.html#cfn-ses-mailmanageraddoninstance-tags>
                              MailManagerAddonInstance -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (MailManagerAddonInstance -> MailManagerAddonInstance -> Bool
(MailManagerAddonInstance -> MailManagerAddonInstance -> Bool)
-> (MailManagerAddonInstance -> MailManagerAddonInstance -> Bool)
-> Eq MailManagerAddonInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MailManagerAddonInstance -> MailManagerAddonInstance -> Bool
== :: MailManagerAddonInstance -> MailManagerAddonInstance -> Bool
$c/= :: MailManagerAddonInstance -> MailManagerAddonInstance -> Bool
/= :: MailManagerAddonInstance -> MailManagerAddonInstance -> Bool
Prelude.Eq, Int -> MailManagerAddonInstance -> ShowS
[MailManagerAddonInstance] -> ShowS
MailManagerAddonInstance -> String
(Int -> MailManagerAddonInstance -> ShowS)
-> (MailManagerAddonInstance -> String)
-> ([MailManagerAddonInstance] -> ShowS)
-> Show MailManagerAddonInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MailManagerAddonInstance -> ShowS
showsPrec :: Int -> MailManagerAddonInstance -> ShowS
$cshow :: MailManagerAddonInstance -> String
show :: MailManagerAddonInstance -> String
$cshowList :: [MailManagerAddonInstance] -> ShowS
showList :: [MailManagerAddonInstance] -> ShowS
Prelude.Show)
mkMailManagerAddonInstance ::
  Value Prelude.Text -> MailManagerAddonInstance
mkMailManagerAddonInstance :: Value Text -> MailManagerAddonInstance
mkMailManagerAddonInstance Value Text
addonSubscriptionId
  = MailManagerAddonInstance
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       addonSubscriptionId :: Value Text
addonSubscriptionId = Value Text
addonSubscriptionId, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MailManagerAddonInstance where
  toResourceProperties :: MailManagerAddonInstance -> ResourceProperties
toResourceProperties MailManagerAddonInstance {Maybe [Tag]
()
Value Text
haddock_workaround_ :: MailManagerAddonInstance -> ()
addonSubscriptionId :: MailManagerAddonInstance -> Value Text
tags :: MailManagerAddonInstance -> Maybe [Tag]
haddock_workaround_ :: ()
addonSubscriptionId :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::MailManagerAddonInstance",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"AddonSubscriptionId" 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..= Value Text
addonSubscriptionId]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON MailManagerAddonInstance where
  toJSON :: MailManagerAddonInstance -> Value
toJSON MailManagerAddonInstance {Maybe [Tag]
()
Value Text
haddock_workaround_ :: MailManagerAddonInstance -> ()
addonSubscriptionId :: MailManagerAddonInstance -> Value Text
tags :: MailManagerAddonInstance -> Maybe [Tag]
haddock_workaround_ :: ()
addonSubscriptionId :: Value Text
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"AddonSubscriptionId" 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..= Value Text
addonSubscriptionId]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "AddonSubscriptionId" MailManagerAddonInstance where
  type PropertyType "AddonSubscriptionId" MailManagerAddonInstance = Value Prelude.Text
  set :: PropertyType "AddonSubscriptionId" MailManagerAddonInstance
-> MailManagerAddonInstance -> MailManagerAddonInstance
set PropertyType "AddonSubscriptionId" MailManagerAddonInstance
newValue MailManagerAddonInstance {Maybe [Tag]
()
Value Text
haddock_workaround_ :: MailManagerAddonInstance -> ()
addonSubscriptionId :: MailManagerAddonInstance -> Value Text
tags :: MailManagerAddonInstance -> Maybe [Tag]
haddock_workaround_ :: ()
addonSubscriptionId :: Value Text
tags :: Maybe [Tag]
..}
    = MailManagerAddonInstance {addonSubscriptionId :: Value Text
addonSubscriptionId = PropertyType "AddonSubscriptionId" MailManagerAddonInstance
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" MailManagerAddonInstance where
  type PropertyType "Tags" MailManagerAddonInstance = [Tag]
  set :: PropertyType "Tags" MailManagerAddonInstance
-> MailManagerAddonInstance -> MailManagerAddonInstance
set PropertyType "Tags" MailManagerAddonInstance
newValue MailManagerAddonInstance {Maybe [Tag]
()
Value Text
haddock_workaround_ :: MailManagerAddonInstance -> ()
addonSubscriptionId :: MailManagerAddonInstance -> Value Text
tags :: MailManagerAddonInstance -> Maybe [Tag]
haddock_workaround_ :: ()
addonSubscriptionId :: Value Text
tags :: Maybe [Tag]
..}
    = MailManagerAddonInstance {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" MailManagerAddonInstance
newValue, ()
Value Text
haddock_workaround_ :: ()
addonSubscriptionId :: Value Text
haddock_workaround_ :: ()
addonSubscriptionId :: Value Text
..}