module Stratosphere.PinpointEmail.ConfigurationSetEventDestination (
module Exports, ConfigurationSetEventDestination(..),
mkConfigurationSetEventDestination
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.PinpointEmail.ConfigurationSetEventDestination.EventDestinationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConfigurationSetEventDestination
=
ConfigurationSetEventDestination {ConfigurationSetEventDestination -> ()
haddock_workaround_ :: (),
ConfigurationSetEventDestination -> Value Text
configurationSetName :: (Value Prelude.Text),
ConfigurationSetEventDestination -> Maybe EventDestinationProperty
eventDestination :: (Prelude.Maybe EventDestinationProperty),
ConfigurationSetEventDestination -> Value Text
eventDestinationName :: (Value Prelude.Text)}
deriving stock (ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool
(ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool)
-> (ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool)
-> Eq ConfigurationSetEventDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool
== :: ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool
$c/= :: ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool
/= :: ConfigurationSetEventDestination
-> ConfigurationSetEventDestination -> Bool
Prelude.Eq, Int -> ConfigurationSetEventDestination -> ShowS
[ConfigurationSetEventDestination] -> ShowS
ConfigurationSetEventDestination -> String
(Int -> ConfigurationSetEventDestination -> ShowS)
-> (ConfigurationSetEventDestination -> String)
-> ([ConfigurationSetEventDestination] -> ShowS)
-> Show ConfigurationSetEventDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfigurationSetEventDestination -> ShowS
showsPrec :: Int -> ConfigurationSetEventDestination -> ShowS
$cshow :: ConfigurationSetEventDestination -> String
show :: ConfigurationSetEventDestination -> String
$cshowList :: [ConfigurationSetEventDestination] -> ShowS
showList :: [ConfigurationSetEventDestination] -> ShowS
Prelude.Show)
mkConfigurationSetEventDestination ::
Value Prelude.Text
-> Value Prelude.Text -> ConfigurationSetEventDestination
mkConfigurationSetEventDestination :: Value Text -> Value Text -> ConfigurationSetEventDestination
mkConfigurationSetEventDestination
Value Text
configurationSetName
Value Text
eventDestinationName
= ConfigurationSetEventDestination
{haddock_workaround_ :: ()
haddock_workaround_ = (),
configurationSetName :: Value Text
configurationSetName = Value Text
configurationSetName,
eventDestinationName :: Value Text
eventDestinationName = Value Text
eventDestinationName,
eventDestination :: Maybe EventDestinationProperty
eventDestination = Maybe EventDestinationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfigurationSetEventDestination where
toResourceProperties :: ConfigurationSetEventDestination -> ResourceProperties
toResourceProperties ConfigurationSetEventDestination {Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ConfigurationSetEventDestination -> ()
configurationSetName :: ConfigurationSetEventDestination -> Value Text
eventDestination :: ConfigurationSetEventDestination -> Maybe EventDestinationProperty
eventDestinationName :: ConfigurationSetEventDestination -> Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::PinpointEmail::ConfigurationSetEventDestination",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"ConfigurationSetName" 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
configurationSetName,
Key
"EventDestinationName" 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
eventDestinationName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> EventDestinationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EventDestination" (EventDestinationProperty -> (Key, Value))
-> Maybe EventDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventDestinationProperty
eventDestination]))}
instance JSON.ToJSON ConfigurationSetEventDestination where
toJSON :: ConfigurationSetEventDestination -> Value
toJSON ConfigurationSetEventDestination {Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ConfigurationSetEventDestination -> ()
configurationSetName :: ConfigurationSetEventDestination -> Value Text
eventDestination :: ConfigurationSetEventDestination -> Maybe EventDestinationProperty
eventDestinationName :: ConfigurationSetEventDestination -> Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
..}
= [(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
"ConfigurationSetName" 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
configurationSetName,
Key
"EventDestinationName" 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
eventDestinationName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> EventDestinationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EventDestination" (EventDestinationProperty -> (Key, Value))
-> Maybe EventDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventDestinationProperty
eventDestination])))
instance Property "ConfigurationSetName" ConfigurationSetEventDestination where
type PropertyType "ConfigurationSetName" ConfigurationSetEventDestination = Value Prelude.Text
set :: PropertyType
"ConfigurationSetName" ConfigurationSetEventDestination
-> ConfigurationSetEventDestination
-> ConfigurationSetEventDestination
set PropertyType
"ConfigurationSetName" ConfigurationSetEventDestination
newValue ConfigurationSetEventDestination {Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ConfigurationSetEventDestination -> ()
configurationSetName :: ConfigurationSetEventDestination -> Value Text
eventDestination :: ConfigurationSetEventDestination -> Maybe EventDestinationProperty
eventDestinationName :: ConfigurationSetEventDestination -> Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
..}
= ConfigurationSetEventDestination
{configurationSetName :: Value Text
configurationSetName = PropertyType
"ConfigurationSetName" ConfigurationSetEventDestination
Value Text
newValue, Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ()
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
haddock_workaround_ :: ()
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
..}
instance Property "EventDestination" ConfigurationSetEventDestination where
type PropertyType "EventDestination" ConfigurationSetEventDestination = EventDestinationProperty
set :: PropertyType "EventDestination" ConfigurationSetEventDestination
-> ConfigurationSetEventDestination
-> ConfigurationSetEventDestination
set PropertyType "EventDestination" ConfigurationSetEventDestination
newValue ConfigurationSetEventDestination {Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ConfigurationSetEventDestination -> ()
configurationSetName :: ConfigurationSetEventDestination -> Value Text
eventDestination :: ConfigurationSetEventDestination -> Maybe EventDestinationProperty
eventDestinationName :: ConfigurationSetEventDestination -> Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
..}
= ConfigurationSetEventDestination
{eventDestination :: Maybe EventDestinationProperty
eventDestination = EventDestinationProperty -> Maybe EventDestinationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EventDestination" ConfigurationSetEventDestination
EventDestinationProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestinationName :: Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestinationName :: Value Text
..}
instance Property "EventDestinationName" ConfigurationSetEventDestination where
type PropertyType "EventDestinationName" ConfigurationSetEventDestination = Value Prelude.Text
set :: PropertyType
"EventDestinationName" ConfigurationSetEventDestination
-> ConfigurationSetEventDestination
-> ConfigurationSetEventDestination
set PropertyType
"EventDestinationName" ConfigurationSetEventDestination
newValue ConfigurationSetEventDestination {Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ConfigurationSetEventDestination -> ()
configurationSetName :: ConfigurationSetEventDestination -> Value Text
eventDestination :: ConfigurationSetEventDestination -> Maybe EventDestinationProperty
eventDestinationName :: ConfigurationSetEventDestination -> Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
eventDestinationName :: Value Text
..}
= ConfigurationSetEventDestination
{eventDestinationName :: Value Text
eventDestinationName = PropertyType
"EventDestinationName" ConfigurationSetEventDestination
Value Text
newValue, Maybe EventDestinationProperty
()
Value Text
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
haddock_workaround_ :: ()
configurationSetName :: Value Text
eventDestination :: Maybe EventDestinationProperty
..}