module Stratosphere.XRay.Group (
module Exports, Group(..), mkGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.XRay.Group.InsightsConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Group
=
Group {Group -> ()
haddock_workaround_ :: (),
Group -> Maybe (Value Text)
filterExpression :: (Prelude.Maybe (Value Prelude.Text)),
Group -> Value Text
groupName :: (Value Prelude.Text),
Group -> Maybe InsightsConfigurationProperty
insightsConfiguration :: (Prelude.Maybe InsightsConfigurationProperty),
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
groupName
= Group
{haddock_workaround_ :: ()
haddock_workaround_ = (), groupName :: Value Text
groupName = Value Text
groupName,
filterExpression :: Maybe (Value Text)
filterExpression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
insightsConfiguration :: Maybe InsightsConfigurationProperty
insightsConfiguration = Maybe InsightsConfigurationProperty
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 (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: Group -> ()
filterExpression :: Group -> Maybe (Value Text)
groupName :: Group -> Value Text
insightsConfiguration :: Group -> Maybe InsightsConfigurationProperty
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::XRay::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
"GroupName" 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
groupName]
([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
"FilterExpression" (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)
filterExpression,
Key -> InsightsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InsightsConfiguration"
(InsightsConfigurationProperty -> (Key, Value))
-> Maybe InsightsConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InsightsConfigurationProperty
insightsConfiguration,
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 (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: Group -> ()
filterExpression :: Group -> Maybe (Value Text)
groupName :: Group -> Value Text
insightsConfiguration :: Group -> Maybe InsightsConfigurationProperty
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
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
"GroupName" 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
groupName]
([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
"FilterExpression" (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)
filterExpression,
Key -> InsightsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InsightsConfiguration"
(InsightsConfigurationProperty -> (Key, Value))
-> Maybe InsightsConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InsightsConfigurationProperty
insightsConfiguration,
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 "FilterExpression" Group where
type PropertyType "FilterExpression" Group = Value Prelude.Text
set :: PropertyType "FilterExpression" Group -> Group -> Group
set PropertyType "FilterExpression" Group
newValue Group {Maybe [Tag]
Maybe (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: Group -> ()
filterExpression :: Group -> Maybe (Value Text)
groupName :: Group -> Value Text
insightsConfiguration :: Group -> Maybe InsightsConfigurationProperty
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
..}
= Group {filterExpression :: Maybe (Value Text)
filterExpression = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FilterExpression" Group
Value Text
newValue, Maybe [Tag]
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
..}
instance Property "GroupName" Group where
type PropertyType "GroupName" Group = Value Prelude.Text
set :: PropertyType "GroupName" Group -> Group -> Group
set PropertyType "GroupName" Group
newValue Group {Maybe [Tag]
Maybe (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: Group -> ()
filterExpression :: Group -> Maybe (Value Text)
groupName :: Group -> Value Text
insightsConfiguration :: Group -> Maybe InsightsConfigurationProperty
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
..} = Group {groupName :: Value Text
groupName = PropertyType "GroupName" Group
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe InsightsConfigurationProperty
()
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
..}
instance Property "InsightsConfiguration" Group where
type PropertyType "InsightsConfiguration" Group = InsightsConfigurationProperty
set :: PropertyType "InsightsConfiguration" Group -> Group -> Group
set PropertyType "InsightsConfiguration" Group
newValue Group {Maybe [Tag]
Maybe (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: Group -> ()
filterExpression :: Group -> Maybe (Value Text)
groupName :: Group -> Value Text
insightsConfiguration :: Group -> Maybe InsightsConfigurationProperty
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
tags :: Maybe [Tag]
..}
= Group {insightsConfiguration :: Maybe InsightsConfigurationProperty
insightsConfiguration = InsightsConfigurationProperty
-> Maybe InsightsConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InsightsConfiguration" Group
InsightsConfigurationProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
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 (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: Group -> ()
filterExpression :: Group -> Maybe (Value Text)
groupName :: Group -> Value Text
insightsConfiguration :: Group -> Maybe InsightsConfigurationProperty
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
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 (Value Text)
Maybe InsightsConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
haddock_workaround_ :: ()
filterExpression :: Maybe (Value Text)
groupName :: Value Text
insightsConfiguration :: Maybe InsightsConfigurationProperty
..}