module Stratosphere.Lex.Bot.CustomVocabularyItemProperty (
CustomVocabularyItemProperty(..), mkCustomVocabularyItemProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomVocabularyItemProperty
=
CustomVocabularyItemProperty {CustomVocabularyItemProperty -> ()
haddock_workaround_ :: (),
CustomVocabularyItemProperty -> Maybe (Value Text)
displayAs :: (Prelude.Maybe (Value Prelude.Text)),
CustomVocabularyItemProperty -> Value Text
phrase :: (Value Prelude.Text),
CustomVocabularyItemProperty -> Maybe (Value Integer)
weight :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool
(CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool)
-> (CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool)
-> Eq CustomVocabularyItemProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool
== :: CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool
$c/= :: CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool
/= :: CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> Bool
Prelude.Eq, Int -> CustomVocabularyItemProperty -> ShowS
[CustomVocabularyItemProperty] -> ShowS
CustomVocabularyItemProperty -> String
(Int -> CustomVocabularyItemProperty -> ShowS)
-> (CustomVocabularyItemProperty -> String)
-> ([CustomVocabularyItemProperty] -> ShowS)
-> Show CustomVocabularyItemProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomVocabularyItemProperty -> ShowS
showsPrec :: Int -> CustomVocabularyItemProperty -> ShowS
$cshow :: CustomVocabularyItemProperty -> String
show :: CustomVocabularyItemProperty -> String
$cshowList :: [CustomVocabularyItemProperty] -> ShowS
showList :: [CustomVocabularyItemProperty] -> ShowS
Prelude.Show)
mkCustomVocabularyItemProperty ::
Value Prelude.Text -> CustomVocabularyItemProperty
mkCustomVocabularyItemProperty :: Value Text -> CustomVocabularyItemProperty
mkCustomVocabularyItemProperty Value Text
phrase
= CustomVocabularyItemProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), phrase :: Value Text
phrase = Value Text
phrase,
displayAs :: Maybe (Value Text)
displayAs = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, weight :: Maybe (Value Integer)
weight = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomVocabularyItemProperty where
toResourceProperties :: CustomVocabularyItemProperty -> ResourceProperties
toResourceProperties CustomVocabularyItemProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomVocabularyItemProperty -> ()
displayAs :: CustomVocabularyItemProperty -> Maybe (Value Text)
phrase :: CustomVocabularyItemProperty -> Value Text
weight :: CustomVocabularyItemProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
weight :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lex::Bot.CustomVocabularyItem",
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
"Phrase" 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
phrase]
([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
"DisplayAs" (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)
displayAs,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Weight" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
weight]))}
instance JSON.ToJSON CustomVocabularyItemProperty where
toJSON :: CustomVocabularyItemProperty -> Value
toJSON CustomVocabularyItemProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomVocabularyItemProperty -> ()
displayAs :: CustomVocabularyItemProperty -> Maybe (Value Text)
phrase :: CustomVocabularyItemProperty -> Value Text
weight :: CustomVocabularyItemProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
weight :: Maybe (Value Integer)
..}
= [(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
"Phrase" 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
phrase]
([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
"DisplayAs" (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)
displayAs,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Weight" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
weight])))
instance Property "DisplayAs" CustomVocabularyItemProperty where
type PropertyType "DisplayAs" CustomVocabularyItemProperty = Value Prelude.Text
set :: PropertyType "DisplayAs" CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> CustomVocabularyItemProperty
set PropertyType "DisplayAs" CustomVocabularyItemProperty
newValue CustomVocabularyItemProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomVocabularyItemProperty -> ()
displayAs :: CustomVocabularyItemProperty -> Maybe (Value Text)
phrase :: CustomVocabularyItemProperty -> Value Text
weight :: CustomVocabularyItemProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
weight :: Maybe (Value Integer)
..}
= CustomVocabularyItemProperty
{displayAs :: Maybe (Value Text)
displayAs = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DisplayAs" CustomVocabularyItemProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
phrase :: Value Text
weight :: Maybe (Value Integer)
haddock_workaround_ :: ()
phrase :: Value Text
weight :: Maybe (Value Integer)
..}
instance Property "Phrase" CustomVocabularyItemProperty where
type PropertyType "Phrase" CustomVocabularyItemProperty = Value Prelude.Text
set :: PropertyType "Phrase" CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> CustomVocabularyItemProperty
set PropertyType "Phrase" CustomVocabularyItemProperty
newValue CustomVocabularyItemProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomVocabularyItemProperty -> ()
displayAs :: CustomVocabularyItemProperty -> Maybe (Value Text)
phrase :: CustomVocabularyItemProperty -> Value Text
weight :: CustomVocabularyItemProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
weight :: Maybe (Value Integer)
..}
= CustomVocabularyItemProperty {phrase :: Value Text
phrase = PropertyType "Phrase" CustomVocabularyItemProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
weight :: Maybe (Value Integer)
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
weight :: Maybe (Value Integer)
..}
instance Property "Weight" CustomVocabularyItemProperty where
type PropertyType "Weight" CustomVocabularyItemProperty = Value Prelude.Integer
set :: PropertyType "Weight" CustomVocabularyItemProperty
-> CustomVocabularyItemProperty -> CustomVocabularyItemProperty
set PropertyType "Weight" CustomVocabularyItemProperty
newValue CustomVocabularyItemProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomVocabularyItemProperty -> ()
displayAs :: CustomVocabularyItemProperty -> Maybe (Value Text)
phrase :: CustomVocabularyItemProperty -> Value Text
weight :: CustomVocabularyItemProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
weight :: Maybe (Value Integer)
..}
= CustomVocabularyItemProperty {weight :: Maybe (Value Integer)
weight = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Weight" CustomVocabularyItemProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
haddock_workaround_ :: ()
displayAs :: Maybe (Value Text)
phrase :: Value Text
..}