module Stratosphere.ResourceGroups.Group (
module Exports, Group(..), mkGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ResourceGroups.Group.ConfigurationItemProperty as Exports
import {-# SOURCE #-} Stratosphere.ResourceGroups.Group.ResourceQueryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Group
=
Group {Group -> ()
haddock_workaround_ :: (),
Group -> Maybe [ConfigurationItemProperty]
configuration :: (Prelude.Maybe [ConfigurationItemProperty]),
Group -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Group -> Value Text
name :: (Value Prelude.Text),
Group -> Maybe ResourceQueryProperty
resourceQuery :: (Prelude.Maybe ResourceQueryProperty),
Group -> Maybe (ValueList Text)
resources :: (Prelude.Maybe (ValueList Prelude.Text)),
Group -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Group -> Group -> Bool
(Group -> Group -> Bool) -> (Group -> Group -> Bool) -> Eq Group
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Group -> Group -> Bool
== :: Group -> Group -> Bool
$c/= :: Group -> Group -> Bool
/= :: Group -> Group -> Bool
Prelude.Eq, Int -> Group -> ShowS
[Group] -> ShowS
Group -> String
(Int -> Group -> ShowS)
-> (Group -> String) -> ([Group] -> ShowS) -> Show Group
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Group -> ShowS
showsPrec :: Int -> Group -> ShowS
$cshow :: Group -> String
show :: Group -> String
$cshowList :: [Group] -> ShowS
showList :: [Group] -> ShowS
Prelude.Show)
mkGroup :: Value Prelude.Text -> Group
mkGroup :: Value Text -> Group
mkGroup Value Text
name
= Group
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
configuration :: Maybe [ConfigurationItemProperty]
configuration = Maybe [ConfigurationItemProperty]
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
resourceQuery :: Maybe ResourceQueryProperty
resourceQuery = Maybe ResourceQueryProperty
forall a. Maybe a
Prelude.Nothing, resources :: Maybe (ValueList Text)
resources = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Group where
toResourceProperties :: Group -> ResourceProperties
toResourceProperties Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ResourceGroups::Group",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ConfigurationItemProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Configuration" ([ConfigurationItemProperty] -> (Key, Value))
-> Maybe [ConfigurationItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigurationItemProperty]
configuration,
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
"Description" (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)
description,
Key -> ResourceQueryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ResourceQuery" (ResourceQueryProperty -> (Key, Value))
-> Maybe ResourceQueryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceQueryProperty
resourceQuery,
Key -> ValueList 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
"Resources" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resources,
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]))}
instance JSON.ToJSON Group where
toJSON :: Group -> Value
toJSON Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
= [(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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ConfigurationItemProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Configuration" ([ConfigurationItemProperty] -> (Key, Value))
-> Maybe [ConfigurationItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigurationItemProperty]
configuration,
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
"Description" (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)
description,
Key -> ResourceQueryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ResourceQuery" (ResourceQueryProperty -> (Key, Value))
-> Maybe ResourceQueryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceQueryProperty
resourceQuery,
Key -> ValueList 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
"Resources" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resources,
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])))
instance Property "Configuration" Group where
type PropertyType "Configuration" Group = [ConfigurationItemProperty]
set :: PropertyType "Configuration" Group -> Group -> Group
set PropertyType "Configuration" Group
newValue Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
= Group {configuration :: Maybe [ConfigurationItemProperty]
configuration = [ConfigurationItemProperty] -> Maybe [ConfigurationItemProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConfigurationItemProperty]
PropertyType "Configuration" Group
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Description" Group where
type PropertyType "Description" Group = Value Prelude.Text
set :: PropertyType "Description" Group -> Group -> Group
set PropertyType "Description" Group
newValue Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
= Group {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Group
Value Text
newValue, Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Name" Group where
type PropertyType "Name" Group = Value Prelude.Text
set :: PropertyType "Name" Group -> Group -> Group
set PropertyType "Name" Group
newValue Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..} = Group {name :: Value Text
name = PropertyType "Name" Group
Value Text
newValue, Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "ResourceQuery" Group where
type PropertyType "ResourceQuery" Group = ResourceQueryProperty
set :: PropertyType "ResourceQuery" Group -> Group -> Group
set PropertyType "ResourceQuery" Group
newValue Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
= Group {resourceQuery :: Maybe ResourceQueryProperty
resourceQuery = ResourceQueryProperty -> Maybe ResourceQueryProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceQuery" Group
ResourceQueryProperty
newValue, Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Resources" Group where
type PropertyType "Resources" Group = ValueList Prelude.Text
set :: PropertyType "Resources" Group -> Group -> Group
set PropertyType "Resources" Group
newValue Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
= Group {resources :: Maybe (ValueList Text)
resources = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Resources" Group
ValueList Text
newValue, Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" Group where
type PropertyType "Tags" Group = [Tag]
set :: PropertyType "Tags" Group -> Group -> Group
set PropertyType "Tags" Group
newValue Group {Maybe [Tag]
Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: Group -> ()
configuration :: Group -> Maybe [ConfigurationItemProperty]
description :: Group -> Maybe (Value Text)
name :: Group -> Value Text
resourceQuery :: Group -> Maybe ResourceQueryProperty
resources :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..} = Group {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" Group
newValue, Maybe [ConfigurationItemProperty]
Maybe (ValueList Text)
Maybe (Value Text)
Maybe ResourceQueryProperty
()
Value Text
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
haddock_workaround_ :: ()
configuration :: Maybe [ConfigurationItemProperty]
description :: Maybe (Value Text)
name :: Value Text
resourceQuery :: Maybe ResourceQueryProperty
resources :: Maybe (ValueList Text)
..}