module Stratosphere.S3.Bucket.TopicConfigurationProperty (
module Exports, TopicConfigurationProperty(..),
mkTopicConfigurationProperty
) 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 TopicConfigurationProperty
=
TopicConfigurationProperty {TopicConfigurationProperty -> ()
haddock_workaround_ :: (),
TopicConfigurationProperty -> Value Text
event :: (Value Prelude.Text),
TopicConfigurationProperty -> Maybe NotificationFilterProperty
filter :: (Prelude.Maybe NotificationFilterProperty),
TopicConfigurationProperty -> Value Text
topic :: (Value Prelude.Text)}
deriving stock (TopicConfigurationProperty -> TopicConfigurationProperty -> Bool
(TopicConfigurationProperty -> TopicConfigurationProperty -> Bool)
-> (TopicConfigurationProperty
-> TopicConfigurationProperty -> Bool)
-> Eq TopicConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TopicConfigurationProperty -> TopicConfigurationProperty -> Bool
== :: TopicConfigurationProperty -> TopicConfigurationProperty -> Bool
$c/= :: TopicConfigurationProperty -> TopicConfigurationProperty -> Bool
/= :: TopicConfigurationProperty -> TopicConfigurationProperty -> Bool
Prelude.Eq, Int -> TopicConfigurationProperty -> ShowS
[TopicConfigurationProperty] -> ShowS
TopicConfigurationProperty -> String
(Int -> TopicConfigurationProperty -> ShowS)
-> (TopicConfigurationProperty -> String)
-> ([TopicConfigurationProperty] -> ShowS)
-> Show TopicConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TopicConfigurationProperty -> ShowS
showsPrec :: Int -> TopicConfigurationProperty -> ShowS
$cshow :: TopicConfigurationProperty -> String
show :: TopicConfigurationProperty -> String
$cshowList :: [TopicConfigurationProperty] -> ShowS
showList :: [TopicConfigurationProperty] -> ShowS
Prelude.Show)
mkTopicConfigurationProperty ::
Value Prelude.Text
-> Value Prelude.Text -> TopicConfigurationProperty
mkTopicConfigurationProperty :: Value Text -> Value Text -> TopicConfigurationProperty
mkTopicConfigurationProperty Value Text
event Value Text
topic
= TopicConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), event :: Value Text
event = Value Text
event, topic :: Value Text
topic = Value Text
topic,
filter :: Maybe NotificationFilterProperty
filter = Maybe NotificationFilterProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TopicConfigurationProperty where
toResourceProperties :: TopicConfigurationProperty -> ResourceProperties
toResourceProperties TopicConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: TopicConfigurationProperty -> ()
event :: TopicConfigurationProperty -> Value Text
filter :: TopicConfigurationProperty -> Maybe NotificationFilterProperty
topic :: TopicConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
topic :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.TopicConfiguration",
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
"Topic" 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
topic]
([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 TopicConfigurationProperty where
toJSON :: TopicConfigurationProperty -> Value
toJSON TopicConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: TopicConfigurationProperty -> ()
event :: TopicConfigurationProperty -> Value Text
filter :: TopicConfigurationProperty -> Maybe NotificationFilterProperty
topic :: TopicConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
topic :: 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
"Topic" 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
topic]
([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" TopicConfigurationProperty where
type PropertyType "Event" TopicConfigurationProperty = Value Prelude.Text
set :: PropertyType "Event" TopicConfigurationProperty
-> TopicConfigurationProperty -> TopicConfigurationProperty
set PropertyType "Event" TopicConfigurationProperty
newValue TopicConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: TopicConfigurationProperty -> ()
event :: TopicConfigurationProperty -> Value Text
filter :: TopicConfigurationProperty -> Maybe NotificationFilterProperty
topic :: TopicConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
topic :: Value Text
..}
= TopicConfigurationProperty {event :: Value Text
event = PropertyType "Event" TopicConfigurationProperty
Value Text
newValue, Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: ()
filter :: Maybe NotificationFilterProperty
topic :: Value Text
haddock_workaround_ :: ()
filter :: Maybe NotificationFilterProperty
topic :: Value Text
..}
instance Property "Filter" TopicConfigurationProperty where
type PropertyType "Filter" TopicConfigurationProperty = NotificationFilterProperty
set :: PropertyType "Filter" TopicConfigurationProperty
-> TopicConfigurationProperty -> TopicConfigurationProperty
set PropertyType "Filter" TopicConfigurationProperty
newValue TopicConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: TopicConfigurationProperty -> ()
event :: TopicConfigurationProperty -> Value Text
filter :: TopicConfigurationProperty -> Maybe NotificationFilterProperty
topic :: TopicConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
topic :: Value Text
..}
= TopicConfigurationProperty {filter :: Maybe NotificationFilterProperty
filter = NotificationFilterProperty -> Maybe NotificationFilterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Filter" TopicConfigurationProperty
NotificationFilterProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
event :: Value Text
topic :: Value Text
haddock_workaround_ :: ()
event :: Value Text
topic :: Value Text
..}
instance Property "Topic" TopicConfigurationProperty where
type PropertyType "Topic" TopicConfigurationProperty = Value Prelude.Text
set :: PropertyType "Topic" TopicConfigurationProperty
-> TopicConfigurationProperty -> TopicConfigurationProperty
set PropertyType "Topic" TopicConfigurationProperty
newValue TopicConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: TopicConfigurationProperty -> ()
event :: TopicConfigurationProperty -> Value Text
filter :: TopicConfigurationProperty -> Maybe NotificationFilterProperty
topic :: TopicConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
topic :: Value Text
..}
= TopicConfigurationProperty {topic :: Value Text
topic = PropertyType "Topic" TopicConfigurationProperty
Value Text
newValue, Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
..}