module Stratosphere.Lex.Bot.SessionAttributeProperty ( SessionAttributeProperty(..), mkSessionAttributeProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data SessionAttributeProperty = -- | See: SessionAttributeProperty {haddock_workaround_ :: (), -- | See: key :: (Value Prelude.Text), -- | See: value :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkSessionAttributeProperty :: Value Prelude.Text -> SessionAttributeProperty mkSessionAttributeProperty key = SessionAttributeProperty {haddock_workaround_ = (), key = key, value = Prelude.Nothing} instance ToResourceProperties SessionAttributeProperty where toResourceProperties SessionAttributeProperty {..} = ResourceProperties {awsType = "AWS::Lex::Bot.SessionAttribute", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["Key" JSON..= key] (Prelude.catMaybes [(JSON..=) "Value" Prelude.<$> value]))} instance JSON.ToJSON SessionAttributeProperty where toJSON SessionAttributeProperty {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["Key" JSON..= key] (Prelude.catMaybes [(JSON..=) "Value" Prelude.<$> value]))) instance Property "Key" SessionAttributeProperty where type PropertyType "Key" SessionAttributeProperty = Value Prelude.Text set newValue SessionAttributeProperty {..} = SessionAttributeProperty {key = newValue, ..} instance Property "Value" SessionAttributeProperty where type PropertyType "Value" SessionAttributeProperty = Value Prelude.Text set newValue SessionAttributeProperty {..} = SessionAttributeProperty {value = Prelude.pure newValue, ..}