module Stratosphere.Lambda.EventInvokeConfig (
        module Exports, EventInvokeConfig(..), mkEventInvokeConfig
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lambda.EventInvokeConfig.DestinationConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EventInvokeConfig
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html>
    EventInvokeConfig {EventInvokeConfig -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig>
                       EventInvokeConfig -> Maybe DestinationConfigProperty
destinationConfig :: (Prelude.Maybe DestinationConfigProperty),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-functionname>
                       EventInvokeConfig -> Value Text
functionName :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumeventageinseconds>
                       EventInvokeConfig -> Maybe (Value Integer)
maximumEventAgeInSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumretryattempts>
                       EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: (Prelude.Maybe (Value Prelude.Integer)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-qualifier>
                       EventInvokeConfig -> Value Text
qualifier :: (Value Prelude.Text)}
  deriving stock (EventInvokeConfig -> EventInvokeConfig -> Bool
(EventInvokeConfig -> EventInvokeConfig -> Bool)
-> (EventInvokeConfig -> EventInvokeConfig -> Bool)
-> Eq EventInvokeConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventInvokeConfig -> EventInvokeConfig -> Bool
== :: EventInvokeConfig -> EventInvokeConfig -> Bool
$c/= :: EventInvokeConfig -> EventInvokeConfig -> Bool
/= :: EventInvokeConfig -> EventInvokeConfig -> Bool
Prelude.Eq, Int -> EventInvokeConfig -> ShowS
[EventInvokeConfig] -> ShowS
EventInvokeConfig -> String
(Int -> EventInvokeConfig -> ShowS)
-> (EventInvokeConfig -> String)
-> ([EventInvokeConfig] -> ShowS)
-> Show EventInvokeConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventInvokeConfig -> ShowS
showsPrec :: Int -> EventInvokeConfig -> ShowS
$cshow :: EventInvokeConfig -> String
show :: EventInvokeConfig -> String
$cshowList :: [EventInvokeConfig] -> ShowS
showList :: [EventInvokeConfig] -> ShowS
Prelude.Show)
mkEventInvokeConfig ::
  Value Prelude.Text -> Value Prelude.Text -> EventInvokeConfig
mkEventInvokeConfig :: Value Text -> Value Text -> EventInvokeConfig
mkEventInvokeConfig Value Text
functionName Value Text
qualifier
  = EventInvokeConfig
      {haddock_workaround_ :: ()
haddock_workaround_ = (), functionName :: Value Text
functionName = Value Text
functionName,
       qualifier :: Value Text
qualifier = Value Text
qualifier, destinationConfig :: Maybe DestinationConfigProperty
destinationConfig = Maybe DestinationConfigProperty
forall a. Maybe a
Prelude.Nothing,
       maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumEventAgeInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       maximumRetryAttempts :: Maybe (Value Integer)
maximumRetryAttempts = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EventInvokeConfig where
  toResourceProperties :: EventInvokeConfig -> ResourceProperties
toResourceProperties EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lambda::EventInvokeConfig",
         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
"FunctionName" 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
functionName,
                            Key
"Qualifier" 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
qualifier]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DestinationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DestinationConfig" (DestinationConfigProperty -> (Key, Value))
-> Maybe DestinationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationConfigProperty
destinationConfig,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumEventAgeInSeconds"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumEventAgeInSeconds,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumRetryAttempts"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumRetryAttempts]))}
instance JSON.ToJSON EventInvokeConfig where
  toJSON :: EventInvokeConfig -> Value
toJSON EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: 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
"FunctionName" 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
functionName,
               Key
"Qualifier" 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
qualifier]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DestinationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DestinationConfig" (DestinationConfigProperty -> (Key, Value))
-> Maybe DestinationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationConfigProperty
destinationConfig,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumEventAgeInSeconds"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumEventAgeInSeconds,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumRetryAttempts"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumRetryAttempts])))
instance Property "DestinationConfig" EventInvokeConfig where
  type PropertyType "DestinationConfig" EventInvokeConfig = DestinationConfigProperty
  set :: PropertyType "DestinationConfig" EventInvokeConfig
-> EventInvokeConfig -> EventInvokeConfig
set PropertyType "DestinationConfig" EventInvokeConfig
newValue EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
    = EventInvokeConfig {destinationConfig :: Maybe DestinationConfigProperty
destinationConfig = DestinationConfigProperty -> Maybe DestinationConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationConfig" EventInvokeConfig
DestinationConfigProperty
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
haddock_workaround_ :: ()
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
instance Property "FunctionName" EventInvokeConfig where
  type PropertyType "FunctionName" EventInvokeConfig = Value Prelude.Text
  set :: PropertyType "FunctionName" EventInvokeConfig
-> EventInvokeConfig -> EventInvokeConfig
set PropertyType "FunctionName" EventInvokeConfig
newValue EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
    = EventInvokeConfig {functionName :: Value Text
functionName = PropertyType "FunctionName" EventInvokeConfig
Value Text
newValue, Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
instance Property "MaximumEventAgeInSeconds" EventInvokeConfig where
  type PropertyType "MaximumEventAgeInSeconds" EventInvokeConfig = Value Prelude.Integer
  set :: PropertyType "MaximumEventAgeInSeconds" EventInvokeConfig
-> EventInvokeConfig -> EventInvokeConfig
set PropertyType "MaximumEventAgeInSeconds" EventInvokeConfig
newValue EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
    = EventInvokeConfig
        {maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumEventAgeInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumEventAgeInSeconds" EventInvokeConfig
Value Integer
newValue, Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
instance Property "MaximumRetryAttempts" EventInvokeConfig where
  type PropertyType "MaximumRetryAttempts" EventInvokeConfig = Value Prelude.Integer
  set :: PropertyType "MaximumRetryAttempts" EventInvokeConfig
-> EventInvokeConfig -> EventInvokeConfig
set PropertyType "MaximumRetryAttempts" EventInvokeConfig
newValue EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
    = EventInvokeConfig
        {maximumRetryAttempts :: Maybe (Value Integer)
maximumRetryAttempts = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumRetryAttempts" EventInvokeConfig
Value Integer
newValue, Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
qualifier :: Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
qualifier :: Value Text
..}
instance Property "Qualifier" EventInvokeConfig where
  type PropertyType "Qualifier" EventInvokeConfig = Value Prelude.Text
  set :: PropertyType "Qualifier" EventInvokeConfig
-> EventInvokeConfig -> EventInvokeConfig
set PropertyType "Qualifier" EventInvokeConfig
newValue EventInvokeConfig {Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: EventInvokeConfig -> ()
destinationConfig :: EventInvokeConfig -> Maybe DestinationConfigProperty
functionName :: EventInvokeConfig -> Value Text
maximumEventAgeInSeconds :: EventInvokeConfig -> Maybe (Value Integer)
maximumRetryAttempts :: EventInvokeConfig -> Maybe (Value Integer)
qualifier :: EventInvokeConfig -> Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
qualifier :: Value Text
..}
    = EventInvokeConfig {qualifier :: Value Text
qualifier = PropertyType "Qualifier" EventInvokeConfig
Value Text
newValue, Maybe (Value Integer)
Maybe DestinationConfigProperty
()
Value Text
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
haddock_workaround_ :: ()
destinationConfig :: Maybe DestinationConfigProperty
functionName :: Value Text
maximumEventAgeInSeconds :: Maybe (Value Integer)
maximumRetryAttempts :: Maybe (Value Integer)
..}