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