module Stratosphere.IoT.ThingType.PropagatingAttributeProperty (
PropagatingAttributeProperty(..), mkPropagatingAttributeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PropagatingAttributeProperty
=
PropagatingAttributeProperty {PropagatingAttributeProperty -> ()
haddock_workaround_ :: (),
PropagatingAttributeProperty -> Maybe (Value Text)
connectionAttribute :: (Prelude.Maybe (Value Prelude.Text)),
PropagatingAttributeProperty -> Maybe (Value Text)
thingAttribute :: (Prelude.Maybe (Value Prelude.Text)),
PropagatingAttributeProperty -> Value Text
userPropertyKey :: (Value Prelude.Text)}
deriving stock (PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool
(PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool)
-> (PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool)
-> Eq PropagatingAttributeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool
== :: PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool
$c/= :: PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool
/= :: PropagatingAttributeProperty
-> PropagatingAttributeProperty -> Bool
Prelude.Eq, Int -> PropagatingAttributeProperty -> ShowS
[PropagatingAttributeProperty] -> ShowS
PropagatingAttributeProperty -> String
(Int -> PropagatingAttributeProperty -> ShowS)
-> (PropagatingAttributeProperty -> String)
-> ([PropagatingAttributeProperty] -> ShowS)
-> Show PropagatingAttributeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PropagatingAttributeProperty -> ShowS
showsPrec :: Int -> PropagatingAttributeProperty -> ShowS
$cshow :: PropagatingAttributeProperty -> String
show :: PropagatingAttributeProperty -> String
$cshowList :: [PropagatingAttributeProperty] -> ShowS
showList :: [PropagatingAttributeProperty] -> ShowS
Prelude.Show)
mkPropagatingAttributeProperty ::
Value Prelude.Text -> PropagatingAttributeProperty
mkPropagatingAttributeProperty :: Value Text -> PropagatingAttributeProperty
mkPropagatingAttributeProperty Value Text
userPropertyKey
= PropagatingAttributeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), userPropertyKey :: Value Text
userPropertyKey = Value Text
userPropertyKey,
connectionAttribute :: Maybe (Value Text)
connectionAttribute = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
thingAttribute :: Maybe (Value Text)
thingAttribute = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PropagatingAttributeProperty where
toResourceProperties :: PropagatingAttributeProperty -> ResourceProperties
toResourceProperties PropagatingAttributeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PropagatingAttributeProperty -> ()
connectionAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
thingAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
userPropertyKey :: PropagatingAttributeProperty -> Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::ThingType.PropagatingAttribute",
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
"UserPropertyKey" 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
userPropertyKey]
([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
"ConnectionAttribute" (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)
connectionAttribute,
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
"ThingAttribute" (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)
thingAttribute]))}
instance JSON.ToJSON PropagatingAttributeProperty where
toJSON :: PropagatingAttributeProperty -> Value
toJSON PropagatingAttributeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PropagatingAttributeProperty -> ()
connectionAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
thingAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
userPropertyKey :: PropagatingAttributeProperty -> Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
userPropertyKey :: 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
"UserPropertyKey" 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
userPropertyKey]
([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
"ConnectionAttribute" (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)
connectionAttribute,
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
"ThingAttribute" (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)
thingAttribute])))
instance Property "ConnectionAttribute" PropagatingAttributeProperty where
type PropertyType "ConnectionAttribute" PropagatingAttributeProperty = Value Prelude.Text
set :: PropertyType "ConnectionAttribute" PropagatingAttributeProperty
-> PropagatingAttributeProperty -> PropagatingAttributeProperty
set PropertyType "ConnectionAttribute" PropagatingAttributeProperty
newValue PropagatingAttributeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PropagatingAttributeProperty -> ()
connectionAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
thingAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
userPropertyKey :: PropagatingAttributeProperty -> Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
..}
= PropagatingAttributeProperty
{connectionAttribute :: Maybe (Value Text)
connectionAttribute = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConnectionAttribute" PropagatingAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
thingAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
haddock_workaround_ :: ()
thingAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
..}
instance Property "ThingAttribute" PropagatingAttributeProperty where
type PropertyType "ThingAttribute" PropagatingAttributeProperty = Value Prelude.Text
set :: PropertyType "ThingAttribute" PropagatingAttributeProperty
-> PropagatingAttributeProperty -> PropagatingAttributeProperty
set PropertyType "ThingAttribute" PropagatingAttributeProperty
newValue PropagatingAttributeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PropagatingAttributeProperty -> ()
connectionAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
thingAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
userPropertyKey :: PropagatingAttributeProperty -> Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
..}
= PropagatingAttributeProperty
{thingAttribute :: Maybe (Value Text)
thingAttribute = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThingAttribute" PropagatingAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
..}
instance Property "UserPropertyKey" PropagatingAttributeProperty where
type PropertyType "UserPropertyKey" PropagatingAttributeProperty = Value Prelude.Text
set :: PropertyType "UserPropertyKey" PropagatingAttributeProperty
-> PropagatingAttributeProperty -> PropagatingAttributeProperty
set PropertyType "UserPropertyKey" PropagatingAttributeProperty
newValue PropagatingAttributeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PropagatingAttributeProperty -> ()
connectionAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
thingAttribute :: PropagatingAttributeProperty -> Maybe (Value Text)
userPropertyKey :: PropagatingAttributeProperty -> Value Text
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
userPropertyKey :: Value Text
..}
= PropagatingAttributeProperty {userPropertyKey :: Value Text
userPropertyKey = PropertyType "UserPropertyKey" PropagatingAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionAttribute :: Maybe (Value Text)
thingAttribute :: Maybe (Value Text)
..}