module Stratosphere.Events.EventBus ( module Exports, EventBus(..), mkEventBus ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.Events.EventBus.DeadLetterConfigProperty as Exports import {-# SOURCE #-} Stratosphere.Events.EventBus.LogConfigProperty as Exports import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data EventBus = -- | See: EventBus {haddock_workaround_ :: (), -- | See: deadLetterConfig :: (Prelude.Maybe DeadLetterConfigProperty), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: eventSourceName :: (Prelude.Maybe (Value Prelude.Text)), -- | See: kmsKeyIdentifier :: (Prelude.Maybe (Value Prelude.Text)), -- | See: logConfig :: (Prelude.Maybe LogConfigProperty), -- | See: name :: (Value Prelude.Text), -- | See: policy :: (Prelude.Maybe JSON.Object), -- | See: tags :: (Prelude.Maybe [Tag])} deriving stock (Prelude.Eq, Prelude.Show) mkEventBus :: Value Prelude.Text -> EventBus mkEventBus name = EventBus {haddock_workaround_ = (), name = name, deadLetterConfig = Prelude.Nothing, description = Prelude.Nothing, eventSourceName = Prelude.Nothing, kmsKeyIdentifier = Prelude.Nothing, logConfig = Prelude.Nothing, policy = Prelude.Nothing, tags = Prelude.Nothing} instance ToResourceProperties EventBus where toResourceProperties EventBus {..} = ResourceProperties {awsType = "AWS::Events::EventBus", supportsTags = Prelude.True, properties = Prelude.fromList ((Prelude.<>) ["Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "DeadLetterConfig" Prelude.<$> deadLetterConfig, (JSON..=) "Description" Prelude.<$> description, (JSON..=) "EventSourceName" Prelude.<$> eventSourceName, (JSON..=) "KmsKeyIdentifier" Prelude.<$> kmsKeyIdentifier, (JSON..=) "LogConfig" Prelude.<$> logConfig, (JSON..=) "Policy" Prelude.<$> policy, (JSON..=) "Tags" Prelude.<$> tags]))} instance JSON.ToJSON EventBus where toJSON EventBus {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "DeadLetterConfig" Prelude.<$> deadLetterConfig, (JSON..=) "Description" Prelude.<$> description, (JSON..=) "EventSourceName" Prelude.<$> eventSourceName, (JSON..=) "KmsKeyIdentifier" Prelude.<$> kmsKeyIdentifier, (JSON..=) "LogConfig" Prelude.<$> logConfig, (JSON..=) "Policy" Prelude.<$> policy, (JSON..=) "Tags" Prelude.<$> tags]))) instance Property "DeadLetterConfig" EventBus where type PropertyType "DeadLetterConfig" EventBus = DeadLetterConfigProperty set newValue EventBus {..} = EventBus {deadLetterConfig = Prelude.pure newValue, ..} instance Property "Description" EventBus where type PropertyType "Description" EventBus = Value Prelude.Text set newValue EventBus {..} = EventBus {description = Prelude.pure newValue, ..} instance Property "EventSourceName" EventBus where type PropertyType "EventSourceName" EventBus = Value Prelude.Text set newValue EventBus {..} = EventBus {eventSourceName = Prelude.pure newValue, ..} instance Property "KmsKeyIdentifier" EventBus where type PropertyType "KmsKeyIdentifier" EventBus = Value Prelude.Text set newValue EventBus {..} = EventBus {kmsKeyIdentifier = Prelude.pure newValue, ..} instance Property "LogConfig" EventBus where type PropertyType "LogConfig" EventBus = LogConfigProperty set newValue EventBus {..} = EventBus {logConfig = Prelude.pure newValue, ..} instance Property "Name" EventBus where type PropertyType "Name" EventBus = Value Prelude.Text set newValue EventBus {..} = EventBus {name = newValue, ..} instance Property "Policy" EventBus where type PropertyType "Policy" EventBus = JSON.Object set newValue EventBus {..} = EventBus {policy = Prelude.pure newValue, ..} instance Property "Tags" EventBus where type PropertyType "Tags" EventBus = [Tag] set newValue EventBus {..} = EventBus {tags = Prelude.pure newValue, ..}