module Stratosphere.Bedrock.Guardrail.TopicConfigProperty ( TopicConfigProperty(..), mkTopicConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data TopicConfigProperty = -- | See: TopicConfigProperty {haddock_workaround_ :: (), -- | See: definition :: (Value Prelude.Text), -- | See: examples :: (Prelude.Maybe (ValueList Prelude.Text)), -- | See: inputAction :: (Prelude.Maybe (Value Prelude.Text)), -- | See: inputEnabled :: (Prelude.Maybe (Value Prelude.Bool)), -- | See: name :: (Value Prelude.Text), -- | See: outputAction :: (Prelude.Maybe (Value Prelude.Text)), -- | See: outputEnabled :: (Prelude.Maybe (Value Prelude.Bool)), -- | See: type' :: (Value Prelude.Text)} deriving stock (Prelude.Eq, Prelude.Show) mkTopicConfigProperty :: Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> TopicConfigProperty mkTopicConfigProperty definition name type' = TopicConfigProperty {haddock_workaround_ = (), definition = definition, name = name, type' = type', examples = Prelude.Nothing, inputAction = Prelude.Nothing, inputEnabled = Prelude.Nothing, outputAction = Prelude.Nothing, outputEnabled = Prelude.Nothing} instance ToResourceProperties TopicConfigProperty where toResourceProperties TopicConfigProperty {..} = ResourceProperties {awsType = "AWS::Bedrock::Guardrail.TopicConfig", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["Definition" JSON..= definition, "Name" JSON..= name, "Type" JSON..= type'] (Prelude.catMaybes [(JSON..=) "Examples" Prelude.<$> examples, (JSON..=) "InputAction" Prelude.<$> inputAction, (JSON..=) "InputEnabled" Prelude.<$> inputEnabled, (JSON..=) "OutputAction" Prelude.<$> outputAction, (JSON..=) "OutputEnabled" Prelude.<$> outputEnabled]))} instance JSON.ToJSON TopicConfigProperty where toJSON TopicConfigProperty {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["Definition" JSON..= definition, "Name" JSON..= name, "Type" JSON..= type'] (Prelude.catMaybes [(JSON..=) "Examples" Prelude.<$> examples, (JSON..=) "InputAction" Prelude.<$> inputAction, (JSON..=) "InputEnabled" Prelude.<$> inputEnabled, (JSON..=) "OutputAction" Prelude.<$> outputAction, (JSON..=) "OutputEnabled" Prelude.<$> outputEnabled]))) instance Property "Definition" TopicConfigProperty where type PropertyType "Definition" TopicConfigProperty = Value Prelude.Text set newValue TopicConfigProperty {..} = TopicConfigProperty {definition = newValue, ..} instance Property "Examples" TopicConfigProperty where type PropertyType "Examples" TopicConfigProperty = ValueList Prelude.Text set newValue TopicConfigProperty {..} = TopicConfigProperty {examples = Prelude.pure newValue, ..} instance Property "InputAction" TopicConfigProperty where type PropertyType "InputAction" TopicConfigProperty = Value Prelude.Text set newValue TopicConfigProperty {..} = TopicConfigProperty {inputAction = Prelude.pure newValue, ..} instance Property "InputEnabled" TopicConfigProperty where type PropertyType "InputEnabled" TopicConfigProperty = Value Prelude.Bool set newValue TopicConfigProperty {..} = TopicConfigProperty {inputEnabled = Prelude.pure newValue, ..} instance Property "Name" TopicConfigProperty where type PropertyType "Name" TopicConfigProperty = Value Prelude.Text set newValue TopicConfigProperty {..} = TopicConfigProperty {name = newValue, ..} instance Property "OutputAction" TopicConfigProperty where type PropertyType "OutputAction" TopicConfigProperty = Value Prelude.Text set newValue TopicConfigProperty {..} = TopicConfigProperty {outputAction = Prelude.pure newValue, ..} instance Property "OutputEnabled" TopicConfigProperty where type PropertyType "OutputEnabled" TopicConfigProperty = Value Prelude.Bool set newValue TopicConfigProperty {..} = TopicConfigProperty {outputEnabled = Prelude.pure newValue, ..} instance Property "Type" TopicConfigProperty where type PropertyType "Type" TopicConfigProperty = Value Prelude.Text set newValue TopicConfigProperty {..} = TopicConfigProperty {type' = newValue, ..}