module Stratosphere.Chatbot.CustomAction.CustomActionAttachmentProperty (
module Exports, CustomActionAttachmentProperty(..),
mkCustomActionAttachmentProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Chatbot.CustomAction.CustomActionAttachmentCriteriaProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomActionAttachmentProperty
=
CustomActionAttachmentProperty {CustomActionAttachmentProperty -> ()
haddock_workaround_ :: (),
CustomActionAttachmentProperty -> Maybe (Value Text)
buttonText :: (Prelude.Maybe (Value Prelude.Text)),
CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
criteria :: (Prelude.Maybe [CustomActionAttachmentCriteriaProperty]),
CustomActionAttachmentProperty -> Maybe (Value Text)
notificationType :: (Prelude.Maybe (Value Prelude.Text)),
CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
variables :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool
(CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool)
-> (CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool)
-> Eq CustomActionAttachmentProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool
== :: CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool
$c/= :: CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool
/= :: CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> Bool
Prelude.Eq, Int -> CustomActionAttachmentProperty -> ShowS
[CustomActionAttachmentProperty] -> ShowS
CustomActionAttachmentProperty -> String
(Int -> CustomActionAttachmentProperty -> ShowS)
-> (CustomActionAttachmentProperty -> String)
-> ([CustomActionAttachmentProperty] -> ShowS)
-> Show CustomActionAttachmentProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomActionAttachmentProperty -> ShowS
showsPrec :: Int -> CustomActionAttachmentProperty -> ShowS
$cshow :: CustomActionAttachmentProperty -> String
show :: CustomActionAttachmentProperty -> String
$cshowList :: [CustomActionAttachmentProperty] -> ShowS
showList :: [CustomActionAttachmentProperty] -> ShowS
Prelude.Show)
mkCustomActionAttachmentProperty :: CustomActionAttachmentProperty
mkCustomActionAttachmentProperty :: CustomActionAttachmentProperty
mkCustomActionAttachmentProperty
= CustomActionAttachmentProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), buttonText :: Maybe (Value Text)
buttonText = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
criteria = Maybe [CustomActionAttachmentCriteriaProperty]
forall a. Maybe a
Prelude.Nothing, notificationType :: Maybe (Value Text)
notificationType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
variables :: Maybe (Map Text (Value Text))
variables = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomActionAttachmentProperty where
toResourceProperties :: CustomActionAttachmentProperty -> ResourceProperties
toResourceProperties CustomActionAttachmentProperty {Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: CustomActionAttachmentProperty -> ()
buttonText :: CustomActionAttachmentProperty -> Maybe (Value Text)
criteria :: CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: CustomActionAttachmentProperty -> Maybe (Value Text)
variables :: CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Chatbot::CustomAction.CustomActionAttachment",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"ButtonText" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
buttonText,
Key -> [CustomActionAttachmentCriteriaProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Criteria" ([CustomActionAttachmentCriteriaProperty] -> (Key, Value))
-> Maybe [CustomActionAttachmentCriteriaProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CustomActionAttachmentCriteriaProperty]
criteria,
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..=) Key
"NotificationType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
notificationType,
Key -> Map Text (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..=) Key
"Variables" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
variables])}
instance JSON.ToJSON CustomActionAttachmentProperty where
toJSON :: CustomActionAttachmentProperty -> Value
toJSON CustomActionAttachmentProperty {Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: CustomActionAttachmentProperty -> ()
buttonText :: CustomActionAttachmentProperty -> Maybe (Value Text)
criteria :: CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: CustomActionAttachmentProperty -> Maybe (Value Text)
variables :: CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"ButtonText" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
buttonText,
Key -> [CustomActionAttachmentCriteriaProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Criteria" ([CustomActionAttachmentCriteriaProperty] -> (Key, Value))
-> Maybe [CustomActionAttachmentCriteriaProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CustomActionAttachmentCriteriaProperty]
criteria,
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..=) Key
"NotificationType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
notificationType,
Key -> Map Text (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..=) Key
"Variables" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
variables]))
instance Property "ButtonText" CustomActionAttachmentProperty where
type PropertyType "ButtonText" CustomActionAttachmentProperty = Value Prelude.Text
set :: PropertyType "ButtonText" CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> CustomActionAttachmentProperty
set PropertyType "ButtonText" CustomActionAttachmentProperty
newValue CustomActionAttachmentProperty {Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: CustomActionAttachmentProperty -> ()
buttonText :: CustomActionAttachmentProperty -> Maybe (Value Text)
criteria :: CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: CustomActionAttachmentProperty -> Maybe (Value Text)
variables :: CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
= CustomActionAttachmentProperty
{buttonText :: Maybe (Value Text)
buttonText = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ButtonText" CustomActionAttachmentProperty
Value Text
newValue, Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
instance Property "Criteria" CustomActionAttachmentProperty where
type PropertyType "Criteria" CustomActionAttachmentProperty = [CustomActionAttachmentCriteriaProperty]
set :: PropertyType "Criteria" CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> CustomActionAttachmentProperty
set PropertyType "Criteria" CustomActionAttachmentProperty
newValue CustomActionAttachmentProperty {Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: CustomActionAttachmentProperty -> ()
buttonText :: CustomActionAttachmentProperty -> Maybe (Value Text)
criteria :: CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: CustomActionAttachmentProperty -> Maybe (Value Text)
variables :: CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
= CustomActionAttachmentProperty
{criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
criteria = [CustomActionAttachmentCriteriaProperty]
-> Maybe [CustomActionAttachmentCriteriaProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CustomActionAttachmentCriteriaProperty]
PropertyType "Criteria" CustomActionAttachmentProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
instance Property "NotificationType" CustomActionAttachmentProperty where
type PropertyType "NotificationType" CustomActionAttachmentProperty = Value Prelude.Text
set :: PropertyType "NotificationType" CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> CustomActionAttachmentProperty
set PropertyType "NotificationType" CustomActionAttachmentProperty
newValue CustomActionAttachmentProperty {Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: CustomActionAttachmentProperty -> ()
buttonText :: CustomActionAttachmentProperty -> Maybe (Value Text)
criteria :: CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: CustomActionAttachmentProperty -> Maybe (Value Text)
variables :: CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
= CustomActionAttachmentProperty
{notificationType :: Maybe (Value Text)
notificationType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NotificationType" CustomActionAttachmentProperty
Value Text
newValue, Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
variables :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
variables :: Maybe (Map Text (Value Text))
..}
instance Property "Variables" CustomActionAttachmentProperty where
type PropertyType "Variables" CustomActionAttachmentProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Variables" CustomActionAttachmentProperty
-> CustomActionAttachmentProperty -> CustomActionAttachmentProperty
set PropertyType "Variables" CustomActionAttachmentProperty
newValue CustomActionAttachmentProperty {Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: CustomActionAttachmentProperty -> ()
buttonText :: CustomActionAttachmentProperty -> Maybe (Value Text)
criteria :: CustomActionAttachmentProperty
-> Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: CustomActionAttachmentProperty -> Maybe (Value Text)
variables :: CustomActionAttachmentProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
variables :: Maybe (Map Text (Value Text))
..}
= CustomActionAttachmentProperty
{variables :: Maybe (Map Text (Value Text))
variables = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Variables" CustomActionAttachmentProperty
newValue, Maybe [CustomActionAttachmentCriteriaProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
haddock_workaround_ :: ()
buttonText :: Maybe (Value Text)
criteria :: Maybe [CustomActionAttachmentCriteriaProperty]
notificationType :: Maybe (Value Text)
..}