module Stratosphere.SES.ReceiptRule.LambdaActionProperty (
        LambdaActionProperty(..), mkLambdaActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LambdaActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html>
    LambdaActionProperty {LambdaActionProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-functionarn>
                          LambdaActionProperty -> Value Text
functionArn :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-invocationtype>
                          LambdaActionProperty -> Maybe (Value Text)
invocationType :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-topicarn>
                          LambdaActionProperty -> Maybe (Value Text)
topicArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LambdaActionProperty -> LambdaActionProperty -> Bool
(LambdaActionProperty -> LambdaActionProperty -> Bool)
-> (LambdaActionProperty -> LambdaActionProperty -> Bool)
-> Eq LambdaActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LambdaActionProperty -> LambdaActionProperty -> Bool
== :: LambdaActionProperty -> LambdaActionProperty -> Bool
$c/= :: LambdaActionProperty -> LambdaActionProperty -> Bool
/= :: LambdaActionProperty -> LambdaActionProperty -> Bool
Prelude.Eq, Int -> LambdaActionProperty -> ShowS
[LambdaActionProperty] -> ShowS
LambdaActionProperty -> String
(Int -> LambdaActionProperty -> ShowS)
-> (LambdaActionProperty -> String)
-> ([LambdaActionProperty] -> ShowS)
-> Show LambdaActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LambdaActionProperty -> ShowS
showsPrec :: Int -> LambdaActionProperty -> ShowS
$cshow :: LambdaActionProperty -> String
show :: LambdaActionProperty -> String
$cshowList :: [LambdaActionProperty] -> ShowS
showList :: [LambdaActionProperty] -> ShowS
Prelude.Show)
mkLambdaActionProperty ::
  Value Prelude.Text -> LambdaActionProperty
mkLambdaActionProperty :: Value Text -> LambdaActionProperty
mkLambdaActionProperty Value Text
functionArn
  = LambdaActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), functionArn :: Value Text
functionArn = Value Text
functionArn,
       invocationType :: Maybe (Value Text)
invocationType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, topicArn :: Maybe (Value Text)
topicArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LambdaActionProperty where
  toResourceProperties :: LambdaActionProperty -> ResourceProperties
toResourceProperties LambdaActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LambdaActionProperty -> ()
functionArn :: LambdaActionProperty -> Value Text
invocationType :: LambdaActionProperty -> Maybe (Value Text)
topicArn :: LambdaActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ReceiptRule.LambdaAction",
         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
"FunctionArn" 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
functionArn]
                           ([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
"InvocationType" (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)
invocationType,
                               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
"TopicArn" (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)
topicArn]))}
instance JSON.ToJSON LambdaActionProperty where
  toJSON :: LambdaActionProperty -> Value
toJSON LambdaActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LambdaActionProperty -> ()
functionArn :: LambdaActionProperty -> Value Text
invocationType :: LambdaActionProperty -> Maybe (Value Text)
topicArn :: LambdaActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
topicArn :: Maybe (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
"FunctionArn" 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
functionArn]
              ([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
"InvocationType" (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)
invocationType,
                  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
"TopicArn" (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)
topicArn])))
instance Property "FunctionArn" LambdaActionProperty where
  type PropertyType "FunctionArn" LambdaActionProperty = Value Prelude.Text
  set :: PropertyType "FunctionArn" LambdaActionProperty
-> LambdaActionProperty -> LambdaActionProperty
set PropertyType "FunctionArn" LambdaActionProperty
newValue LambdaActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LambdaActionProperty -> ()
functionArn :: LambdaActionProperty -> Value Text
invocationType :: LambdaActionProperty -> Maybe (Value Text)
topicArn :: LambdaActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = LambdaActionProperty {functionArn :: Value Text
functionArn = PropertyType "FunctionArn" LambdaActionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
invocationType :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
invocationType :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
instance Property "InvocationType" LambdaActionProperty where
  type PropertyType "InvocationType" LambdaActionProperty = Value Prelude.Text
  set :: PropertyType "InvocationType" LambdaActionProperty
-> LambdaActionProperty -> LambdaActionProperty
set PropertyType "InvocationType" LambdaActionProperty
newValue LambdaActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LambdaActionProperty -> ()
functionArn :: LambdaActionProperty -> Value Text
invocationType :: LambdaActionProperty -> Maybe (Value Text)
topicArn :: LambdaActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = LambdaActionProperty {invocationType :: Maybe (Value Text)
invocationType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InvocationType" LambdaActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
functionArn :: Value Text
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
topicArn :: Maybe (Value Text)
..}
instance Property "TopicArn" LambdaActionProperty where
  type PropertyType "TopicArn" LambdaActionProperty = Value Prelude.Text
  set :: PropertyType "TopicArn" LambdaActionProperty
-> LambdaActionProperty -> LambdaActionProperty
set PropertyType "TopicArn" LambdaActionProperty
newValue LambdaActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LambdaActionProperty -> ()
functionArn :: LambdaActionProperty -> Value Text
invocationType :: LambdaActionProperty -> Maybe (Value Text)
topicArn :: LambdaActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = LambdaActionProperty {topicArn :: Maybe (Value Text)
topicArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TopicArn" LambdaActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
haddock_workaround_ :: ()
functionArn :: Value Text
invocationType :: Maybe (Value Text)
..}