module Stratosphere.Lambda.EventInvokeConfig.DestinationConfigProperty (
module Exports, DestinationConfigProperty(..),
mkDestinationConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lambda.EventInvokeConfig.OnFailureProperty as Exports
import {-# SOURCE #-} Stratosphere.Lambda.EventInvokeConfig.OnSuccessProperty as Exports
import Stratosphere.ResourceProperties
data DestinationConfigProperty
=
DestinationConfigProperty {DestinationConfigProperty -> ()
haddock_workaround_ :: (),
DestinationConfigProperty -> Maybe OnFailureProperty
onFailure :: (Prelude.Maybe OnFailureProperty),
DestinationConfigProperty -> Maybe OnSuccessProperty
onSuccess :: (Prelude.Maybe OnSuccessProperty)}
deriving stock (DestinationConfigProperty -> DestinationConfigProperty -> Bool
(DestinationConfigProperty -> DestinationConfigProperty -> Bool)
-> (DestinationConfigProperty -> DestinationConfigProperty -> Bool)
-> Eq DestinationConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DestinationConfigProperty -> DestinationConfigProperty -> Bool
== :: DestinationConfigProperty -> DestinationConfigProperty -> Bool
$c/= :: DestinationConfigProperty -> DestinationConfigProperty -> Bool
/= :: DestinationConfigProperty -> DestinationConfigProperty -> Bool
Prelude.Eq, Int -> DestinationConfigProperty -> ShowS
[DestinationConfigProperty] -> ShowS
DestinationConfigProperty -> String
(Int -> DestinationConfigProperty -> ShowS)
-> (DestinationConfigProperty -> String)
-> ([DestinationConfigProperty] -> ShowS)
-> Show DestinationConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DestinationConfigProperty -> ShowS
showsPrec :: Int -> DestinationConfigProperty -> ShowS
$cshow :: DestinationConfigProperty -> String
show :: DestinationConfigProperty -> String
$cshowList :: [DestinationConfigProperty] -> ShowS
showList :: [DestinationConfigProperty] -> ShowS
Prelude.Show)
mkDestinationConfigProperty :: DestinationConfigProperty
mkDestinationConfigProperty :: DestinationConfigProperty
mkDestinationConfigProperty
= DestinationConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), onFailure :: Maybe OnFailureProperty
onFailure = Maybe OnFailureProperty
forall a. Maybe a
Prelude.Nothing,
onSuccess :: Maybe OnSuccessProperty
onSuccess = Maybe OnSuccessProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DestinationConfigProperty where
toResourceProperties :: DestinationConfigProperty -> ResourceProperties
toResourceProperties DestinationConfigProperty {Maybe OnFailureProperty
Maybe OnSuccessProperty
()
haddock_workaround_ :: DestinationConfigProperty -> ()
onFailure :: DestinationConfigProperty -> Maybe OnFailureProperty
onSuccess :: DestinationConfigProperty -> Maybe OnSuccessProperty
haddock_workaround_ :: ()
onFailure :: Maybe OnFailureProperty
onSuccess :: Maybe OnSuccessProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lambda::EventInvokeConfig.DestinationConfig",
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 -> OnFailureProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnFailure" (OnFailureProperty -> (Key, Value))
-> Maybe OnFailureProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnFailureProperty
onFailure,
Key -> OnSuccessProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnSuccess" (OnSuccessProperty -> (Key, Value))
-> Maybe OnSuccessProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnSuccessProperty
onSuccess])}
instance JSON.ToJSON DestinationConfigProperty where
toJSON :: DestinationConfigProperty -> Value
toJSON DestinationConfigProperty {Maybe OnFailureProperty
Maybe OnSuccessProperty
()
haddock_workaround_ :: DestinationConfigProperty -> ()
onFailure :: DestinationConfigProperty -> Maybe OnFailureProperty
onSuccess :: DestinationConfigProperty -> Maybe OnSuccessProperty
haddock_workaround_ :: ()
onFailure :: Maybe OnFailureProperty
onSuccess :: Maybe OnSuccessProperty
..}
= [(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 -> OnFailureProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnFailure" (OnFailureProperty -> (Key, Value))
-> Maybe OnFailureProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnFailureProperty
onFailure,
Key -> OnSuccessProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnSuccess" (OnSuccessProperty -> (Key, Value))
-> Maybe OnSuccessProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnSuccessProperty
onSuccess]))
instance Property "OnFailure" DestinationConfigProperty where
type PropertyType "OnFailure" DestinationConfigProperty = OnFailureProperty
set :: PropertyType "OnFailure" DestinationConfigProperty
-> DestinationConfigProperty -> DestinationConfigProperty
set PropertyType "OnFailure" DestinationConfigProperty
newValue DestinationConfigProperty {Maybe OnFailureProperty
Maybe OnSuccessProperty
()
haddock_workaround_ :: DestinationConfigProperty -> ()
onFailure :: DestinationConfigProperty -> Maybe OnFailureProperty
onSuccess :: DestinationConfigProperty -> Maybe OnSuccessProperty
haddock_workaround_ :: ()
onFailure :: Maybe OnFailureProperty
onSuccess :: Maybe OnSuccessProperty
..}
= DestinationConfigProperty {onFailure :: Maybe OnFailureProperty
onFailure = OnFailureProperty -> Maybe OnFailureProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OnFailure" DestinationConfigProperty
OnFailureProperty
newValue, Maybe OnSuccessProperty
()
haddock_workaround_ :: ()
onSuccess :: Maybe OnSuccessProperty
haddock_workaround_ :: ()
onSuccess :: Maybe OnSuccessProperty
..}
instance Property "OnSuccess" DestinationConfigProperty where
type PropertyType "OnSuccess" DestinationConfigProperty = OnSuccessProperty
set :: PropertyType "OnSuccess" DestinationConfigProperty
-> DestinationConfigProperty -> DestinationConfigProperty
set PropertyType "OnSuccess" DestinationConfigProperty
newValue DestinationConfigProperty {Maybe OnFailureProperty
Maybe OnSuccessProperty
()
haddock_workaround_ :: DestinationConfigProperty -> ()
onFailure :: DestinationConfigProperty -> Maybe OnFailureProperty
onSuccess :: DestinationConfigProperty -> Maybe OnSuccessProperty
haddock_workaround_ :: ()
onFailure :: Maybe OnFailureProperty
onSuccess :: Maybe OnSuccessProperty
..}
= DestinationConfigProperty {onSuccess :: Maybe OnSuccessProperty
onSuccess = OnSuccessProperty -> Maybe OnSuccessProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OnSuccess" DestinationConfigProperty
OnSuccessProperty
newValue, Maybe OnFailureProperty
()
haddock_workaround_ :: ()
onFailure :: Maybe OnFailureProperty
haddock_workaround_ :: ()
onFailure :: Maybe OnFailureProperty
..}