module Stratosphere.IoT.ThingGroup (
module Exports, ThingGroup(..), mkThingGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.ThingGroup.ThingGroupPropertiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ThingGroup
=
ThingGroup {ThingGroup -> ()
haddock_workaround_ :: (),
ThingGroup -> Maybe (Value Text)
parentGroupName :: (Prelude.Maybe (Value Prelude.Text)),
ThingGroup -> Maybe (Value Text)
queryString :: (Prelude.Maybe (Value Prelude.Text)),
ThingGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
ThingGroup -> Maybe (Value Text)
thingGroupName :: (Prelude.Maybe (Value Prelude.Text)),
ThingGroup -> Maybe ThingGroupPropertiesProperty
thingGroupProperties :: (Prelude.Maybe ThingGroupPropertiesProperty)}
deriving stock (ThingGroup -> ThingGroup -> Bool
(ThingGroup -> ThingGroup -> Bool)
-> (ThingGroup -> ThingGroup -> Bool) -> Eq ThingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ThingGroup -> ThingGroup -> Bool
== :: ThingGroup -> ThingGroup -> Bool
$c/= :: ThingGroup -> ThingGroup -> Bool
/= :: ThingGroup -> ThingGroup -> Bool
Prelude.Eq, Int -> ThingGroup -> ShowS
[ThingGroup] -> ShowS
ThingGroup -> String
(Int -> ThingGroup -> ShowS)
-> (ThingGroup -> String)
-> ([ThingGroup] -> ShowS)
-> Show ThingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ThingGroup -> ShowS
showsPrec :: Int -> ThingGroup -> ShowS
$cshow :: ThingGroup -> String
show :: ThingGroup -> String
$cshowList :: [ThingGroup] -> ShowS
showList :: [ThingGroup] -> ShowS
Prelude.Show)
mkThingGroup :: ThingGroup
mkThingGroup :: ThingGroup
mkThingGroup
= ThingGroup
{haddock_workaround_ :: ()
haddock_workaround_ = (), parentGroupName :: Maybe (Value Text)
parentGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
queryString :: Maybe (Value Text)
queryString = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
thingGroupName :: Maybe (Value Text)
thingGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
thingGroupProperties = Maybe ThingGroupPropertiesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ThingGroup where
toResourceProperties :: ThingGroup -> ResourceProperties
toResourceProperties ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::ThingGroup", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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 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
"ParentGroupName" (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)
parentGroupName,
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
"QueryString" (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)
queryString,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
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
"ThingGroupName" (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)
thingGroupName,
Key -> ThingGroupPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThingGroupProperties"
(ThingGroupPropertiesProperty -> (Key, Value))
-> Maybe ThingGroupPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThingGroupPropertiesProperty
thingGroupProperties])}
instance JSON.ToJSON ThingGroup where
toJSON :: ThingGroup -> Value
toJSON ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= [(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 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
"ParentGroupName" (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)
parentGroupName,
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
"QueryString" (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)
queryString,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
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
"ThingGroupName" (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)
thingGroupName,
Key -> ThingGroupPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThingGroupProperties"
(ThingGroupPropertiesProperty -> (Key, Value))
-> Maybe ThingGroupPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThingGroupPropertiesProperty
thingGroupProperties]))
instance Property "ParentGroupName" ThingGroup where
type PropertyType "ParentGroupName" ThingGroup = Value Prelude.Text
set :: PropertyType "ParentGroupName" ThingGroup
-> ThingGroup -> ThingGroup
set PropertyType "ParentGroupName" ThingGroup
newValue ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= ThingGroup {parentGroupName :: Maybe (Value Text)
parentGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ParentGroupName" ThingGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ()
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
instance Property "QueryString" ThingGroup where
type PropertyType "QueryString" ThingGroup = Value Prelude.Text
set :: PropertyType "QueryString" ThingGroup -> ThingGroup -> ThingGroup
set PropertyType "QueryString" ThingGroup
newValue ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= ThingGroup {queryString :: Maybe (Value Text)
queryString = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "QueryString" ThingGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
instance Property "Tags" ThingGroup where
type PropertyType "Tags" ThingGroup = [Tag]
set :: PropertyType "Tags" ThingGroup -> ThingGroup -> ThingGroup
set PropertyType "Tags" ThingGroup
newValue ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= ThingGroup {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ThingGroup
newValue, Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
instance Property "ThingGroupName" ThingGroup where
type PropertyType "ThingGroupName" ThingGroup = Value Prelude.Text
set :: PropertyType "ThingGroupName" ThingGroup
-> ThingGroup -> ThingGroup
set PropertyType "ThingGroupName" ThingGroup
newValue ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= ThingGroup {thingGroupName :: Maybe (Value Text)
thingGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThingGroupName" ThingGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
instance Property "ThingGroupProperties" ThingGroup where
type PropertyType "ThingGroupProperties" ThingGroup = ThingGroupPropertiesProperty
set :: PropertyType "ThingGroupProperties" ThingGroup
-> ThingGroup -> ThingGroup
set PropertyType "ThingGroupProperties" ThingGroup
newValue ThingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe ThingGroupPropertiesProperty
()
haddock_workaround_ :: ThingGroup -> ()
parentGroupName :: ThingGroup -> Maybe (Value Text)
queryString :: ThingGroup -> Maybe (Value Text)
tags :: ThingGroup -> Maybe [Tag]
thingGroupName :: ThingGroup -> Maybe (Value Text)
thingGroupProperties :: ThingGroup -> Maybe ThingGroupPropertiesProperty
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
thingGroupProperties :: Maybe ThingGroupPropertiesProperty
..}
= ThingGroup {thingGroupProperties :: Maybe ThingGroupPropertiesProperty
thingGroupProperties = ThingGroupPropertiesProperty -> Maybe ThingGroupPropertiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThingGroupProperties" ThingGroup
ThingGroupPropertiesProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
haddock_workaround_ :: ()
parentGroupName :: Maybe (Value Text)
queryString :: Maybe (Value Text)
tags :: Maybe [Tag]
thingGroupName :: Maybe (Value Text)
..}