module Stratosphere.PinpointEmail.ConfigurationSetEventDestination.PinpointDestinationProperty (
        PinpointDestinationProperty(..), mkPinpointDestinationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PinpointDestinationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationseteventdestination-pinpointdestination.html>
    PinpointDestinationProperty {PinpointDestinationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationseteventdestination-pinpointdestination.html#cfn-pinpointemail-configurationseteventdestination-pinpointdestination-applicationarn>
                                 PinpointDestinationProperty -> Maybe (Value Text)
applicationArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PinpointDestinationProperty -> PinpointDestinationProperty -> Bool
(PinpointDestinationProperty
 -> PinpointDestinationProperty -> Bool)
-> (PinpointDestinationProperty
    -> PinpointDestinationProperty -> Bool)
-> Eq PinpointDestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PinpointDestinationProperty -> PinpointDestinationProperty -> Bool
== :: PinpointDestinationProperty -> PinpointDestinationProperty -> Bool
$c/= :: PinpointDestinationProperty -> PinpointDestinationProperty -> Bool
/= :: PinpointDestinationProperty -> PinpointDestinationProperty -> Bool
Prelude.Eq, Int -> PinpointDestinationProperty -> ShowS
[PinpointDestinationProperty] -> ShowS
PinpointDestinationProperty -> String
(Int -> PinpointDestinationProperty -> ShowS)
-> (PinpointDestinationProperty -> String)
-> ([PinpointDestinationProperty] -> ShowS)
-> Show PinpointDestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PinpointDestinationProperty -> ShowS
showsPrec :: Int -> PinpointDestinationProperty -> ShowS
$cshow :: PinpointDestinationProperty -> String
show :: PinpointDestinationProperty -> String
$cshowList :: [PinpointDestinationProperty] -> ShowS
showList :: [PinpointDestinationProperty] -> ShowS
Prelude.Show)
mkPinpointDestinationProperty :: PinpointDestinationProperty
mkPinpointDestinationProperty :: PinpointDestinationProperty
mkPinpointDestinationProperty
  = PinpointDestinationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), applicationArn :: Maybe (Value Text)
applicationArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PinpointDestinationProperty where
  toResourceProperties :: PinpointDestinationProperty -> ResourceProperties
toResourceProperties PinpointDestinationProperty {Maybe (Value Text)
()
haddock_workaround_ :: PinpointDestinationProperty -> ()
applicationArn :: PinpointDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PinpointEmail::ConfigurationSetEventDestination.PinpointDestination",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"ApplicationArn" (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)
applicationArn])}
instance JSON.ToJSON PinpointDestinationProperty where
  toJSON :: PinpointDestinationProperty -> Value
toJSON PinpointDestinationProperty {Maybe (Value Text)
()
haddock_workaround_ :: PinpointDestinationProperty -> ()
applicationArn :: PinpointDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArn :: Maybe (Value Text)
..}
    = [(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
"ApplicationArn" (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)
applicationArn]))
instance Property "ApplicationArn" PinpointDestinationProperty where
  type PropertyType "ApplicationArn" PinpointDestinationProperty = Value Prelude.Text
  set :: PropertyType "ApplicationArn" PinpointDestinationProperty
-> PinpointDestinationProperty -> PinpointDestinationProperty
set PropertyType "ApplicationArn" PinpointDestinationProperty
newValue PinpointDestinationProperty {Maybe (Value Text)
()
haddock_workaround_ :: PinpointDestinationProperty -> ()
applicationArn :: PinpointDestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArn :: Maybe (Value Text)
..}
    = PinpointDestinationProperty
        {applicationArn :: Maybe (Value Text)
applicationArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApplicationArn" PinpointDestinationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}