module Stratosphere.IoT.ThingType.Mqtt5ConfigurationProperty (
        module Exports, Mqtt5ConfigurationProperty(..),
        mkMqtt5ConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.ThingType.PropagatingAttributeProperty as Exports
import Stratosphere.ResourceProperties
data Mqtt5ConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-thingtype-mqtt5configuration.html>
    Mqtt5ConfigurationProperty {Mqtt5ConfigurationProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-thingtype-mqtt5configuration.html#cfn-iot-thingtype-mqtt5configuration-propagatingattributes>
                                Mqtt5ConfigurationProperty -> Maybe [PropagatingAttributeProperty]
propagatingAttributes :: (Prelude.Maybe [PropagatingAttributeProperty])}
  deriving stock (Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty -> Bool
(Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty -> Bool)
-> (Mqtt5ConfigurationProperty
    -> Mqtt5ConfigurationProperty -> Bool)
-> Eq Mqtt5ConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty -> Bool
== :: Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty -> Bool
$c/= :: Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty -> Bool
/= :: Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty -> Bool
Prelude.Eq, Int -> Mqtt5ConfigurationProperty -> ShowS
[Mqtt5ConfigurationProperty] -> ShowS
Mqtt5ConfigurationProperty -> String
(Int -> Mqtt5ConfigurationProperty -> ShowS)
-> (Mqtt5ConfigurationProperty -> String)
-> ([Mqtt5ConfigurationProperty] -> ShowS)
-> Show Mqtt5ConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Mqtt5ConfigurationProperty -> ShowS
showsPrec :: Int -> Mqtt5ConfigurationProperty -> ShowS
$cshow :: Mqtt5ConfigurationProperty -> String
show :: Mqtt5ConfigurationProperty -> String
$cshowList :: [Mqtt5ConfigurationProperty] -> ShowS
showList :: [Mqtt5ConfigurationProperty] -> ShowS
Prelude.Show)
mkMqtt5ConfigurationProperty :: Mqtt5ConfigurationProperty
mkMqtt5ConfigurationProperty :: Mqtt5ConfigurationProperty
mkMqtt5ConfigurationProperty
  = Mqtt5ConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), propagatingAttributes :: Maybe [PropagatingAttributeProperty]
propagatingAttributes = Maybe [PropagatingAttributeProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Mqtt5ConfigurationProperty where
  toResourceProperties :: Mqtt5ConfigurationProperty -> ResourceProperties
toResourceProperties Mqtt5ConfigurationProperty {Maybe [PropagatingAttributeProperty]
()
haddock_workaround_ :: Mqtt5ConfigurationProperty -> ()
propagatingAttributes :: Mqtt5ConfigurationProperty -> Maybe [PropagatingAttributeProperty]
haddock_workaround_ :: ()
propagatingAttributes :: Maybe [PropagatingAttributeProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::ThingType.Mqtt5Configuration",
         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 -> [PropagatingAttributeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PropagatingAttributes"
                              ([PropagatingAttributeProperty] -> (Key, Value))
-> Maybe [PropagatingAttributeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PropagatingAttributeProperty]
propagatingAttributes])}
instance JSON.ToJSON Mqtt5ConfigurationProperty where
  toJSON :: Mqtt5ConfigurationProperty -> Value
toJSON Mqtt5ConfigurationProperty {Maybe [PropagatingAttributeProperty]
()
haddock_workaround_ :: Mqtt5ConfigurationProperty -> ()
propagatingAttributes :: Mqtt5ConfigurationProperty -> Maybe [PropagatingAttributeProperty]
haddock_workaround_ :: ()
propagatingAttributes :: Maybe [PropagatingAttributeProperty]
..}
    = [(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 -> [PropagatingAttributeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PropagatingAttributes"
                 ([PropagatingAttributeProperty] -> (Key, Value))
-> Maybe [PropagatingAttributeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PropagatingAttributeProperty]
propagatingAttributes]))
instance Property "PropagatingAttributes" Mqtt5ConfigurationProperty where
  type PropertyType "PropagatingAttributes" Mqtt5ConfigurationProperty = [PropagatingAttributeProperty]
  set :: PropertyType "PropagatingAttributes" Mqtt5ConfigurationProperty
-> Mqtt5ConfigurationProperty -> Mqtt5ConfigurationProperty
set PropertyType "PropagatingAttributes" Mqtt5ConfigurationProperty
newValue Mqtt5ConfigurationProperty {Maybe [PropagatingAttributeProperty]
()
haddock_workaround_ :: Mqtt5ConfigurationProperty -> ()
propagatingAttributes :: Mqtt5ConfigurationProperty -> Maybe [PropagatingAttributeProperty]
haddock_workaround_ :: ()
propagatingAttributes :: Maybe [PropagatingAttributeProperty]
..}
    = Mqtt5ConfigurationProperty
        {propagatingAttributes :: Maybe [PropagatingAttributeProperty]
propagatingAttributes = [PropagatingAttributeProperty]
-> Maybe [PropagatingAttributeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PropagatingAttributeProperty]
PropertyType "PropagatingAttributes" Mqtt5ConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}