module Stratosphere.Lex.Bot.ImageResponseCardProperty (
module Exports, ImageResponseCardProperty(..),
mkImageResponseCardProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.Bot.ButtonProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ImageResponseCardProperty
=
ImageResponseCardProperty {ImageResponseCardProperty -> ()
haddock_workaround_ :: (),
ImageResponseCardProperty -> Maybe [ButtonProperty]
buttons :: (Prelude.Maybe [ButtonProperty]),
ImageResponseCardProperty -> Maybe (Value Text)
imageUrl :: (Prelude.Maybe (Value Prelude.Text)),
ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: (Prelude.Maybe (Value Prelude.Text)),
ImageResponseCardProperty -> Value Text
title :: (Value Prelude.Text)}
deriving stock (ImageResponseCardProperty -> ImageResponseCardProperty -> Bool
(ImageResponseCardProperty -> ImageResponseCardProperty -> Bool)
-> (ImageResponseCardProperty -> ImageResponseCardProperty -> Bool)
-> Eq ImageResponseCardProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageResponseCardProperty -> ImageResponseCardProperty -> Bool
== :: ImageResponseCardProperty -> ImageResponseCardProperty -> Bool
$c/= :: ImageResponseCardProperty -> ImageResponseCardProperty -> Bool
/= :: ImageResponseCardProperty -> ImageResponseCardProperty -> Bool
Prelude.Eq, Int -> ImageResponseCardProperty -> ShowS
[ImageResponseCardProperty] -> ShowS
ImageResponseCardProperty -> String
(Int -> ImageResponseCardProperty -> ShowS)
-> (ImageResponseCardProperty -> String)
-> ([ImageResponseCardProperty] -> ShowS)
-> Show ImageResponseCardProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImageResponseCardProperty -> ShowS
showsPrec :: Int -> ImageResponseCardProperty -> ShowS
$cshow :: ImageResponseCardProperty -> String
show :: ImageResponseCardProperty -> String
$cshowList :: [ImageResponseCardProperty] -> ShowS
showList :: [ImageResponseCardProperty] -> ShowS
Prelude.Show)
mkImageResponseCardProperty ::
Value Prelude.Text -> ImageResponseCardProperty
mkImageResponseCardProperty :: Value Text -> ImageResponseCardProperty
mkImageResponseCardProperty Value Text
title
= ImageResponseCardProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), title :: Value Text
title = Value Text
title,
buttons :: Maybe [ButtonProperty]
buttons = Maybe [ButtonProperty]
forall a. Maybe a
Prelude.Nothing, imageUrl :: Maybe (Value Text)
imageUrl = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
subtitle :: Maybe (Value Text)
subtitle = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ImageResponseCardProperty where
toResourceProperties :: ImageResponseCardProperty -> ResourceProperties
toResourceProperties ImageResponseCardProperty {Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ImageResponseCardProperty -> ()
buttons :: ImageResponseCardProperty -> Maybe [ButtonProperty]
imageUrl :: ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: ImageResponseCardProperty -> Maybe (Value Text)
title :: ImageResponseCardProperty -> Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lex::Bot.ImageResponseCard",
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
"Title" 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
title]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ButtonProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Buttons" ([ButtonProperty] -> (Key, Value))
-> Maybe [ButtonProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ButtonProperty]
buttons,
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
"ImageUrl" (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)
imageUrl,
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
"Subtitle" (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)
subtitle]))}
instance JSON.ToJSON ImageResponseCardProperty where
toJSON :: ImageResponseCardProperty -> Value
toJSON ImageResponseCardProperty {Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ImageResponseCardProperty -> ()
buttons :: ImageResponseCardProperty -> Maybe [ButtonProperty]
imageUrl :: ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: ImageResponseCardProperty -> Maybe (Value Text)
title :: ImageResponseCardProperty -> Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: 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
"Title" 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
title]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ButtonProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Buttons" ([ButtonProperty] -> (Key, Value))
-> Maybe [ButtonProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ButtonProperty]
buttons,
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
"ImageUrl" (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)
imageUrl,
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
"Subtitle" (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)
subtitle])))
instance Property "Buttons" ImageResponseCardProperty where
type PropertyType "Buttons" ImageResponseCardProperty = [ButtonProperty]
set :: PropertyType "Buttons" ImageResponseCardProperty
-> ImageResponseCardProperty -> ImageResponseCardProperty
set PropertyType "Buttons" ImageResponseCardProperty
newValue ImageResponseCardProperty {Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ImageResponseCardProperty -> ()
buttons :: ImageResponseCardProperty -> Maybe [ButtonProperty]
imageUrl :: ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: ImageResponseCardProperty -> Maybe (Value Text)
title :: ImageResponseCardProperty -> Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
..}
= ImageResponseCardProperty {buttons :: Maybe [ButtonProperty]
buttons = [ButtonProperty] -> Maybe [ButtonProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ButtonProperty]
PropertyType "Buttons" ImageResponseCardProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
haddock_workaround_ :: ()
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
..}
instance Property "ImageUrl" ImageResponseCardProperty where
type PropertyType "ImageUrl" ImageResponseCardProperty = Value Prelude.Text
set :: PropertyType "ImageUrl" ImageResponseCardProperty
-> ImageResponseCardProperty -> ImageResponseCardProperty
set PropertyType "ImageUrl" ImageResponseCardProperty
newValue ImageResponseCardProperty {Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ImageResponseCardProperty -> ()
buttons :: ImageResponseCardProperty -> Maybe [ButtonProperty]
imageUrl :: ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: ImageResponseCardProperty -> Maybe (Value Text)
title :: ImageResponseCardProperty -> Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
..}
= ImageResponseCardProperty {imageUrl :: Maybe (Value Text)
imageUrl = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ImageUrl" ImageResponseCardProperty
Value Text
newValue, Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
subtitle :: Maybe (Value Text)
title :: Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
subtitle :: Maybe (Value Text)
title :: Value Text
..}
instance Property "Subtitle" ImageResponseCardProperty where
type PropertyType "Subtitle" ImageResponseCardProperty = Value Prelude.Text
set :: PropertyType "Subtitle" ImageResponseCardProperty
-> ImageResponseCardProperty -> ImageResponseCardProperty
set PropertyType "Subtitle" ImageResponseCardProperty
newValue ImageResponseCardProperty {Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ImageResponseCardProperty -> ()
buttons :: ImageResponseCardProperty -> Maybe [ButtonProperty]
imageUrl :: ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: ImageResponseCardProperty -> Maybe (Value Text)
title :: ImageResponseCardProperty -> Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
..}
= ImageResponseCardProperty {subtitle :: Maybe (Value Text)
subtitle = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Subtitle" ImageResponseCardProperty
Value Text
newValue, Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
title :: Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
title :: Value Text
..}
instance Property "Title" ImageResponseCardProperty where
type PropertyType "Title" ImageResponseCardProperty = Value Prelude.Text
set :: PropertyType "Title" ImageResponseCardProperty
-> ImageResponseCardProperty -> ImageResponseCardProperty
set PropertyType "Title" ImageResponseCardProperty
newValue ImageResponseCardProperty {Maybe [ButtonProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ImageResponseCardProperty -> ()
buttons :: ImageResponseCardProperty -> Maybe [ButtonProperty]
imageUrl :: ImageResponseCardProperty -> Maybe (Value Text)
subtitle :: ImageResponseCardProperty -> Maybe (Value Text)
title :: ImageResponseCardProperty -> Value Text
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
title :: Value Text
..}
= ImageResponseCardProperty {title :: Value Text
title = PropertyType "Title" ImageResponseCardProperty
Value Text
newValue, Maybe [ButtonProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
haddock_workaround_ :: ()
buttons :: Maybe [ButtonProperty]
imageUrl :: Maybe (Value Text)
subtitle :: Maybe (Value Text)
..}