module Stratosphere.Lex.BotVersion (
module Exports, BotVersion(..), mkBotVersion
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.BotVersion.BotVersionLocaleSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BotVersion
=
BotVersion {BotVersion -> ()
haddock_workaround_ :: (),
BotVersion -> Value Text
botId :: (Value Prelude.Text),
BotVersion -> [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty],
BotVersion -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (BotVersion -> BotVersion -> Bool
(BotVersion -> BotVersion -> Bool)
-> (BotVersion -> BotVersion -> Bool) -> Eq BotVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BotVersion -> BotVersion -> Bool
== :: BotVersion -> BotVersion -> Bool
$c/= :: BotVersion -> BotVersion -> Bool
/= :: BotVersion -> BotVersion -> Bool
Prelude.Eq, Int -> BotVersion -> ShowS
[BotVersion] -> ShowS
BotVersion -> String
(Int -> BotVersion -> ShowS)
-> (BotVersion -> String)
-> ([BotVersion] -> ShowS)
-> Show BotVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BotVersion -> ShowS
showsPrec :: Int -> BotVersion -> ShowS
$cshow :: BotVersion -> String
show :: BotVersion -> String
$cshowList :: [BotVersion] -> ShowS
showList :: [BotVersion] -> ShowS
Prelude.Show)
mkBotVersion ::
Value Prelude.Text
-> [BotVersionLocaleSpecificationProperty] -> BotVersion
mkBotVersion :: Value Text -> [BotVersionLocaleSpecificationProperty] -> BotVersion
mkBotVersion Value Text
botId [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification
= BotVersion
{haddock_workaround_ :: ()
haddock_workaround_ = (), botId :: Value Text
botId = Value Text
botId,
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification = [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BotVersion where
toResourceProperties :: BotVersion -> ResourceProperties
toResourceProperties BotVersion {[BotVersionLocaleSpecificationProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BotVersion -> ()
botId :: BotVersion -> Value Text
botVersionLocaleSpecification :: BotVersion -> [BotVersionLocaleSpecificationProperty]
description :: BotVersion -> Maybe (Value Text)
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lex::BotVersion", 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
"BotId" 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
botId,
Key
"BotVersionLocaleSpecification"
Key -> [BotVersionLocaleSpecificationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification]
([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
"Description" (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)
description]))}
instance JSON.ToJSON BotVersion where
toJSON :: BotVersion -> Value
toJSON BotVersion {[BotVersionLocaleSpecificationProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BotVersion -> ()
botId :: BotVersion -> Value Text
botVersionLocaleSpecification :: BotVersion -> [BotVersionLocaleSpecificationProperty]
description :: BotVersion -> Maybe (Value Text)
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (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
"BotId" 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
botId,
Key
"BotVersionLocaleSpecification"
Key -> [BotVersionLocaleSpecificationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification]
([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
"Description" (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)
description])))
instance Property "BotId" BotVersion where
type PropertyType "BotId" BotVersion = Value Prelude.Text
set :: PropertyType "BotId" BotVersion -> BotVersion -> BotVersion
set PropertyType "BotId" BotVersion
newValue BotVersion {[BotVersionLocaleSpecificationProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BotVersion -> ()
botId :: BotVersion -> Value Text
botVersionLocaleSpecification :: BotVersion -> [BotVersionLocaleSpecificationProperty]
description :: BotVersion -> Maybe (Value Text)
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (Value Text)
..} = BotVersion {botId :: Value Text
botId = PropertyType "BotId" BotVersion
Value Text
newValue, [BotVersionLocaleSpecificationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (Value Text)
haddock_workaround_ :: ()
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (Value Text)
..}
instance Property "BotVersionLocaleSpecification" BotVersion where
type PropertyType "BotVersionLocaleSpecification" BotVersion = [BotVersionLocaleSpecificationProperty]
set :: PropertyType "BotVersionLocaleSpecification" BotVersion
-> BotVersion -> BotVersion
set PropertyType "BotVersionLocaleSpecification" BotVersion
newValue BotVersion {[BotVersionLocaleSpecificationProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BotVersion -> ()
botId :: BotVersion -> Value Text
botVersionLocaleSpecification :: BotVersion -> [BotVersionLocaleSpecificationProperty]
description :: BotVersion -> Maybe (Value Text)
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (Value Text)
..}
= BotVersion {botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
botVersionLocaleSpecification = [BotVersionLocaleSpecificationProperty]
PropertyType "BotVersionLocaleSpecification" BotVersion
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
botId :: Value Text
description :: Maybe (Value Text)
haddock_workaround_ :: ()
botId :: Value Text
description :: Maybe (Value Text)
..}
instance Property "Description" BotVersion where
type PropertyType "Description" BotVersion = Value Prelude.Text
set :: PropertyType "Description" BotVersion -> BotVersion -> BotVersion
set PropertyType "Description" BotVersion
newValue BotVersion {[BotVersionLocaleSpecificationProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BotVersion -> ()
botId :: BotVersion -> Value Text
botVersionLocaleSpecification :: BotVersion -> [BotVersionLocaleSpecificationProperty]
description :: BotVersion -> Maybe (Value Text)
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
description :: Maybe (Value Text)
..}
= BotVersion {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" BotVersion
Value Text
newValue, [BotVersionLocaleSpecificationProperty]
()
Value Text
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
haddock_workaround_ :: ()
botId :: Value Text
botVersionLocaleSpecification :: [BotVersionLocaleSpecificationProperty]
..}