module Stratosphere.IoT.ThingGroup.AttributePayloadProperty (
AttributePayloadProperty(..), mkAttributePayloadProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AttributePayloadProperty
=
AttributePayloadProperty {AttributePayloadProperty -> ()
haddock_workaround_ :: (),
AttributePayloadProperty -> Maybe (Map Text (Value Text))
attributes :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (AttributePayloadProperty -> AttributePayloadProperty -> Bool
(AttributePayloadProperty -> AttributePayloadProperty -> Bool)
-> (AttributePayloadProperty -> AttributePayloadProperty -> Bool)
-> Eq AttributePayloadProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AttributePayloadProperty -> AttributePayloadProperty -> Bool
== :: AttributePayloadProperty -> AttributePayloadProperty -> Bool
$c/= :: AttributePayloadProperty -> AttributePayloadProperty -> Bool
/= :: AttributePayloadProperty -> AttributePayloadProperty -> Bool
Prelude.Eq, Int -> AttributePayloadProperty -> ShowS
[AttributePayloadProperty] -> ShowS
AttributePayloadProperty -> String
(Int -> AttributePayloadProperty -> ShowS)
-> (AttributePayloadProperty -> String)
-> ([AttributePayloadProperty] -> ShowS)
-> Show AttributePayloadProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AttributePayloadProperty -> ShowS
showsPrec :: Int -> AttributePayloadProperty -> ShowS
$cshow :: AttributePayloadProperty -> String
show :: AttributePayloadProperty -> String
$cshowList :: [AttributePayloadProperty] -> ShowS
showList :: [AttributePayloadProperty] -> ShowS
Prelude.Show)
mkAttributePayloadProperty :: AttributePayloadProperty
mkAttributePayloadProperty :: AttributePayloadProperty
mkAttributePayloadProperty
= AttributePayloadProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), attributes :: Maybe (Map Text (Value Text))
attributes = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AttributePayloadProperty where
toResourceProperties :: AttributePayloadProperty -> ResourceProperties
toResourceProperties AttributePayloadProperty {Maybe (Map Text (Value Text))
()
haddock_workaround_ :: AttributePayloadProperty -> ()
attributes :: AttributePayloadProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::ThingGroup.AttributePayload",
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 -> Map Text (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
"Attributes" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
attributes])}
instance JSON.ToJSON AttributePayloadProperty where
toJSON :: AttributePayloadProperty -> Value
toJSON AttributePayloadProperty {Maybe (Map Text (Value Text))
()
haddock_workaround_ :: AttributePayloadProperty -> ()
attributes :: AttributePayloadProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
..}
= [(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 -> Map Text (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
"Attributes" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
attributes]))
instance Property "Attributes" AttributePayloadProperty where
type PropertyType "Attributes" AttributePayloadProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Attributes" AttributePayloadProperty
-> AttributePayloadProperty -> AttributePayloadProperty
set PropertyType "Attributes" AttributePayloadProperty
newValue AttributePayloadProperty {Maybe (Map Text (Value Text))
()
haddock_workaround_ :: AttributePayloadProperty -> ()
attributes :: AttributePayloadProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
..}
= AttributePayloadProperty {attributes :: Maybe (Map Text (Value Text))
attributes = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Attributes" AttributePayloadProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}