module Stratosphere.Lex.Bot.ExternalSourceSettingProperty (
        module Exports, ExternalSourceSettingProperty(..),
        mkExternalSourceSettingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.Bot.GrammarSlotTypeSettingProperty as Exports
import Stratosphere.ResourceProperties
data ExternalSourceSettingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-externalsourcesetting.html>
    ExternalSourceSettingProperty {ExternalSourceSettingProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-externalsourcesetting.html#cfn-lex-bot-externalsourcesetting-grammarslottypesetting>
                                   ExternalSourceSettingProperty
-> Maybe GrammarSlotTypeSettingProperty
grammarSlotTypeSetting :: (Prelude.Maybe GrammarSlotTypeSettingProperty)}
  deriving stock (ExternalSourceSettingProperty
-> ExternalSourceSettingProperty -> Bool
(ExternalSourceSettingProperty
 -> ExternalSourceSettingProperty -> Bool)
-> (ExternalSourceSettingProperty
    -> ExternalSourceSettingProperty -> Bool)
-> Eq ExternalSourceSettingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExternalSourceSettingProperty
-> ExternalSourceSettingProperty -> Bool
== :: ExternalSourceSettingProperty
-> ExternalSourceSettingProperty -> Bool
$c/= :: ExternalSourceSettingProperty
-> ExternalSourceSettingProperty -> Bool
/= :: ExternalSourceSettingProperty
-> ExternalSourceSettingProperty -> Bool
Prelude.Eq, Int -> ExternalSourceSettingProperty -> ShowS
[ExternalSourceSettingProperty] -> ShowS
ExternalSourceSettingProperty -> String
(Int -> ExternalSourceSettingProperty -> ShowS)
-> (ExternalSourceSettingProperty -> String)
-> ([ExternalSourceSettingProperty] -> ShowS)
-> Show ExternalSourceSettingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExternalSourceSettingProperty -> ShowS
showsPrec :: Int -> ExternalSourceSettingProperty -> ShowS
$cshow :: ExternalSourceSettingProperty -> String
show :: ExternalSourceSettingProperty -> String
$cshowList :: [ExternalSourceSettingProperty] -> ShowS
showList :: [ExternalSourceSettingProperty] -> ShowS
Prelude.Show)
mkExternalSourceSettingProperty :: ExternalSourceSettingProperty
mkExternalSourceSettingProperty :: ExternalSourceSettingProperty
mkExternalSourceSettingProperty
  = ExternalSourceSettingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       grammarSlotTypeSetting :: Maybe GrammarSlotTypeSettingProperty
grammarSlotTypeSetting = Maybe GrammarSlotTypeSettingProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExternalSourceSettingProperty where
  toResourceProperties :: ExternalSourceSettingProperty -> ResourceProperties
toResourceProperties ExternalSourceSettingProperty {Maybe GrammarSlotTypeSettingProperty
()
haddock_workaround_ :: ExternalSourceSettingProperty -> ()
grammarSlotTypeSetting :: ExternalSourceSettingProperty
-> Maybe GrammarSlotTypeSettingProperty
haddock_workaround_ :: ()
grammarSlotTypeSetting :: Maybe GrammarSlotTypeSettingProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lex::Bot.ExternalSourceSetting",
         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 -> GrammarSlotTypeSettingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"GrammarSlotTypeSetting"
                              (GrammarSlotTypeSettingProperty -> (Key, Value))
-> Maybe GrammarSlotTypeSettingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GrammarSlotTypeSettingProperty
grammarSlotTypeSetting])}
instance JSON.ToJSON ExternalSourceSettingProperty where
  toJSON :: ExternalSourceSettingProperty -> Value
toJSON ExternalSourceSettingProperty {Maybe GrammarSlotTypeSettingProperty
()
haddock_workaround_ :: ExternalSourceSettingProperty -> ()
grammarSlotTypeSetting :: ExternalSourceSettingProperty
-> Maybe GrammarSlotTypeSettingProperty
haddock_workaround_ :: ()
grammarSlotTypeSetting :: Maybe GrammarSlotTypeSettingProperty
..}
    = [(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 -> GrammarSlotTypeSettingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"GrammarSlotTypeSetting"
                 (GrammarSlotTypeSettingProperty -> (Key, Value))
-> Maybe GrammarSlotTypeSettingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GrammarSlotTypeSettingProperty
grammarSlotTypeSetting]))
instance Property "GrammarSlotTypeSetting" ExternalSourceSettingProperty where
  type PropertyType "GrammarSlotTypeSetting" ExternalSourceSettingProperty = GrammarSlotTypeSettingProperty
  set :: PropertyType "GrammarSlotTypeSetting" ExternalSourceSettingProperty
-> ExternalSourceSettingProperty -> ExternalSourceSettingProperty
set PropertyType "GrammarSlotTypeSetting" ExternalSourceSettingProperty
newValue ExternalSourceSettingProperty {Maybe GrammarSlotTypeSettingProperty
()
haddock_workaround_ :: ExternalSourceSettingProperty -> ()
grammarSlotTypeSetting :: ExternalSourceSettingProperty
-> Maybe GrammarSlotTypeSettingProperty
haddock_workaround_ :: ()
grammarSlotTypeSetting :: Maybe GrammarSlotTypeSettingProperty
..}
    = ExternalSourceSettingProperty
        {grammarSlotTypeSetting :: Maybe GrammarSlotTypeSettingProperty
grammarSlotTypeSetting = GrammarSlotTypeSettingProperty
-> Maybe GrammarSlotTypeSettingProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GrammarSlotTypeSetting" ExternalSourceSettingProperty
GrammarSlotTypeSettingProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}