module Stratosphere.S3.Bucket.LambdaConfigurationProperty (
module Exports, LambdaConfigurationProperty(..),
mkLambdaConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.NotificationFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LambdaConfigurationProperty
=
LambdaConfigurationProperty {LambdaConfigurationProperty -> ()
haddock_workaround_ :: (),
LambdaConfigurationProperty -> Value Text
event :: (Value Prelude.Text),
LambdaConfigurationProperty -> Maybe NotificationFilterProperty
filter :: (Prelude.Maybe NotificationFilterProperty),
LambdaConfigurationProperty -> Value Text
function :: (Value Prelude.Text)}
deriving stock (LambdaConfigurationProperty -> LambdaConfigurationProperty -> Bool
(LambdaConfigurationProperty
-> LambdaConfigurationProperty -> Bool)
-> (LambdaConfigurationProperty
-> LambdaConfigurationProperty -> Bool)
-> Eq LambdaConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LambdaConfigurationProperty -> LambdaConfigurationProperty -> Bool
== :: LambdaConfigurationProperty -> LambdaConfigurationProperty -> Bool
$c/= :: LambdaConfigurationProperty -> LambdaConfigurationProperty -> Bool
/= :: LambdaConfigurationProperty -> LambdaConfigurationProperty -> Bool
Prelude.Eq, Int -> LambdaConfigurationProperty -> ShowS
[LambdaConfigurationProperty] -> ShowS
LambdaConfigurationProperty -> String
(Int -> LambdaConfigurationProperty -> ShowS)
-> (LambdaConfigurationProperty -> String)
-> ([LambdaConfigurationProperty] -> ShowS)
-> Show LambdaConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LambdaConfigurationProperty -> ShowS
showsPrec :: Int -> LambdaConfigurationProperty -> ShowS
$cshow :: LambdaConfigurationProperty -> String
show :: LambdaConfigurationProperty -> String
$cshowList :: [LambdaConfigurationProperty] -> ShowS
showList :: [LambdaConfigurationProperty] -> ShowS
Prelude.Show)
mkLambdaConfigurationProperty ::
Value Prelude.Text
-> Value Prelude.Text -> LambdaConfigurationProperty
mkLambdaConfigurationProperty :: Value Text -> Value Text -> LambdaConfigurationProperty
mkLambdaConfigurationProperty Value Text
event Value Text
function
= LambdaConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), event :: Value Text
event = Value Text
event, function :: Value Text
function = Value Text
function,
filter :: Maybe NotificationFilterProperty
filter = Maybe NotificationFilterProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LambdaConfigurationProperty where
toResourceProperties :: LambdaConfigurationProperty -> ResourceProperties
toResourceProperties LambdaConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: LambdaConfigurationProperty -> ()
event :: LambdaConfigurationProperty -> Value Text
filter :: LambdaConfigurationProperty -> Maybe NotificationFilterProperty
function :: LambdaConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
function :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.LambdaConfiguration",
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
"Event" 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
event, Key
"Function" 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
function]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> NotificationFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Filter" (NotificationFilterProperty -> (Key, Value))
-> Maybe NotificationFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationFilterProperty
filter]))}
instance JSON.ToJSON LambdaConfigurationProperty where
toJSON :: LambdaConfigurationProperty -> Value
toJSON LambdaConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: LambdaConfigurationProperty -> ()
event :: LambdaConfigurationProperty -> Value Text
filter :: LambdaConfigurationProperty -> Maybe NotificationFilterProperty
function :: LambdaConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
function :: 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
"Event" 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
event, Key
"Function" 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
function]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> NotificationFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Filter" (NotificationFilterProperty -> (Key, Value))
-> Maybe NotificationFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationFilterProperty
filter])))
instance Property "Event" LambdaConfigurationProperty where
type PropertyType "Event" LambdaConfigurationProperty = Value Prelude.Text
set :: PropertyType "Event" LambdaConfigurationProperty
-> LambdaConfigurationProperty -> LambdaConfigurationProperty
set PropertyType "Event" LambdaConfigurationProperty
newValue LambdaConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: LambdaConfigurationProperty -> ()
event :: LambdaConfigurationProperty -> Value Text
filter :: LambdaConfigurationProperty -> Maybe NotificationFilterProperty
function :: LambdaConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
function :: Value Text
..}
= LambdaConfigurationProperty {event :: Value Text
event = PropertyType "Event" LambdaConfigurationProperty
Value Text
newValue, Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: ()
filter :: Maybe NotificationFilterProperty
function :: Value Text
haddock_workaround_ :: ()
filter :: Maybe NotificationFilterProperty
function :: Value Text
..}
instance Property "Filter" LambdaConfigurationProperty where
type PropertyType "Filter" LambdaConfigurationProperty = NotificationFilterProperty
set :: PropertyType "Filter" LambdaConfigurationProperty
-> LambdaConfigurationProperty -> LambdaConfigurationProperty
set PropertyType "Filter" LambdaConfigurationProperty
newValue LambdaConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: LambdaConfigurationProperty -> ()
event :: LambdaConfigurationProperty -> Value Text
filter :: LambdaConfigurationProperty -> Maybe NotificationFilterProperty
function :: LambdaConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
function :: Value Text
..}
= LambdaConfigurationProperty {filter :: Maybe NotificationFilterProperty
filter = NotificationFilterProperty -> Maybe NotificationFilterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Filter" LambdaConfigurationProperty
NotificationFilterProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
event :: Value Text
function :: Value Text
haddock_workaround_ :: ()
event :: Value Text
function :: Value Text
..}
instance Property "Function" LambdaConfigurationProperty where
type PropertyType "Function" LambdaConfigurationProperty = Value Prelude.Text
set :: PropertyType "Function" LambdaConfigurationProperty
-> LambdaConfigurationProperty -> LambdaConfigurationProperty
set PropertyType "Function" LambdaConfigurationProperty
newValue LambdaConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: LambdaConfigurationProperty -> ()
event :: LambdaConfigurationProperty -> Value Text
filter :: LambdaConfigurationProperty -> Maybe NotificationFilterProperty
function :: LambdaConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
function :: Value Text
..}
= LambdaConfigurationProperty {function :: Value Text
function = PropertyType "Function" LambdaConfigurationProperty
Value Text
newValue, Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
..}