module Stratosphere.CodeGuruProfiler.ProfilingGroup (
        module Exports, ProfilingGroup(..), mkProfilingGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodeGuruProfiler.ProfilingGroup.AgentPermissionsProperty as Exports
import {-# SOURCE #-} Stratosphere.CodeGuruProfiler.ProfilingGroup.ChannelProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ProfilingGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeguruprofiler-profilinggroup.html>
    ProfilingGroup {ProfilingGroup -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeguruprofiler-profilinggroup.html#cfn-codeguruprofiler-profilinggroup-agentpermissions>
                    ProfilingGroup -> Maybe AgentPermissionsProperty
agentPermissions :: (Prelude.Maybe AgentPermissionsProperty),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeguruprofiler-profilinggroup.html#cfn-codeguruprofiler-profilinggroup-anomalydetectionnotificationconfiguration>
                    ProfilingGroup -> Maybe [ChannelProperty]
anomalyDetectionNotificationConfiguration :: (Prelude.Maybe [ChannelProperty]),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeguruprofiler-profilinggroup.html#cfn-codeguruprofiler-profilinggroup-computeplatform>
                    ProfilingGroup -> Maybe (Value Text)
computePlatform :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeguruprofiler-profilinggroup.html#cfn-codeguruprofiler-profilinggroup-profilinggroupname>
                    ProfilingGroup -> Value Text
profilingGroupName :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codeguruprofiler-profilinggroup.html#cfn-codeguruprofiler-profilinggroup-tags>
                    ProfilingGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ProfilingGroup -> ProfilingGroup -> Bool
(ProfilingGroup -> ProfilingGroup -> Bool)
-> (ProfilingGroup -> ProfilingGroup -> Bool) -> Eq ProfilingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProfilingGroup -> ProfilingGroup -> Bool
== :: ProfilingGroup -> ProfilingGroup -> Bool
$c/= :: ProfilingGroup -> ProfilingGroup -> Bool
/= :: ProfilingGroup -> ProfilingGroup -> Bool
Prelude.Eq, Int -> ProfilingGroup -> ShowS
[ProfilingGroup] -> ShowS
ProfilingGroup -> String
(Int -> ProfilingGroup -> ShowS)
-> (ProfilingGroup -> String)
-> ([ProfilingGroup] -> ShowS)
-> Show ProfilingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProfilingGroup -> ShowS
showsPrec :: Int -> ProfilingGroup -> ShowS
$cshow :: ProfilingGroup -> String
show :: ProfilingGroup -> String
$cshowList :: [ProfilingGroup] -> ShowS
showList :: [ProfilingGroup] -> ShowS
Prelude.Show)
mkProfilingGroup :: Value Prelude.Text -> ProfilingGroup
mkProfilingGroup :: Value Text -> ProfilingGroup
mkProfilingGroup Value Text
profilingGroupName
  = ProfilingGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), profilingGroupName :: Value Text
profilingGroupName = Value Text
profilingGroupName,
       agentPermissions :: Maybe AgentPermissionsProperty
agentPermissions = Maybe AgentPermissionsProperty
forall a. Maybe a
Prelude.Nothing,
       anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
anomalyDetectionNotificationConfiguration = Maybe [ChannelProperty]
forall a. Maybe a
Prelude.Nothing,
       computePlatform :: Maybe (Value Text)
computePlatform = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProfilingGroup where
  toResourceProperties :: ProfilingGroup -> ResourceProperties
toResourceProperties ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeGuruProfiler::ProfilingGroup",
         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
"ProfilingGroupName" 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
profilingGroupName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> AgentPermissionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AgentPermissions" (AgentPermissionsProperty -> (Key, Value))
-> Maybe AgentPermissionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AgentPermissionsProperty
agentPermissions,
                               Key -> [ChannelProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AnomalyDetectionNotificationConfiguration"
                                 ([ChannelProperty] -> (Key, Value))
-> Maybe [ChannelProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ChannelProperty]
anomalyDetectionNotificationConfiguration,
                               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
"ComputePlatform" (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)
computePlatform,
                               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 ProfilingGroup where
  toJSON :: ProfilingGroup -> Value
toJSON ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value 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
"ProfilingGroupName" 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
profilingGroupName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> AgentPermissionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AgentPermissions" (AgentPermissionsProperty -> (Key, Value))
-> Maybe AgentPermissionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AgentPermissionsProperty
agentPermissions,
                  Key -> [ChannelProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AnomalyDetectionNotificationConfiguration"
                    ([ChannelProperty] -> (Key, Value))
-> Maybe [ChannelProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ChannelProperty]
anomalyDetectionNotificationConfiguration,
                  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
"ComputePlatform" (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)
computePlatform,
                  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 "AgentPermissions" ProfilingGroup where
  type PropertyType "AgentPermissions" ProfilingGroup = AgentPermissionsProperty
  set :: PropertyType "AgentPermissions" ProfilingGroup
-> ProfilingGroup -> ProfilingGroup
set PropertyType "AgentPermissions" ProfilingGroup
newValue ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
    = ProfilingGroup {agentPermissions :: Maybe AgentPermissionsProperty
agentPermissions = AgentPermissionsProperty -> Maybe AgentPermissionsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AgentPermissions" ProfilingGroup
AgentPermissionsProperty
newValue, Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "AnomalyDetectionNotificationConfiguration" ProfilingGroup where
  type PropertyType "AnomalyDetectionNotificationConfiguration" ProfilingGroup = [ChannelProperty]
  set :: PropertyType
  "AnomalyDetectionNotificationConfiguration" ProfilingGroup
-> ProfilingGroup -> ProfilingGroup
set PropertyType
  "AnomalyDetectionNotificationConfiguration" ProfilingGroup
newValue ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
    = ProfilingGroup
        {anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
anomalyDetectionNotificationConfiguration = [ChannelProperty] -> Maybe [ChannelProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ChannelProperty]
PropertyType
  "AnomalyDetectionNotificationConfiguration" ProfilingGroup
newValue,
         Maybe [Tag]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ComputePlatform" ProfilingGroup where
  type PropertyType "ComputePlatform" ProfilingGroup = Value Prelude.Text
  set :: PropertyType "ComputePlatform" ProfilingGroup
-> ProfilingGroup -> ProfilingGroup
set PropertyType "ComputePlatform" ProfilingGroup
newValue ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
    = ProfilingGroup {computePlatform :: Maybe (Value Text)
computePlatform = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComputePlatform" ProfilingGroup
Value Text
newValue, Maybe [Tag]
Maybe [ChannelProperty]
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
profilingGroupName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ProfilingGroupName" ProfilingGroup where
  type PropertyType "ProfilingGroupName" ProfilingGroup = Value Prelude.Text
  set :: PropertyType "ProfilingGroupName" ProfilingGroup
-> ProfilingGroup -> ProfilingGroup
set PropertyType "ProfilingGroupName" ProfilingGroup
newValue ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
    = ProfilingGroup {profilingGroupName :: Value Text
profilingGroupName = PropertyType "ProfilingGroupName" ProfilingGroup
Value Text
newValue, Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ProfilingGroup where
  type PropertyType "Tags" ProfilingGroup = [Tag]
  set :: PropertyType "Tags" ProfilingGroup
-> ProfilingGroup -> ProfilingGroup
set PropertyType "Tags" ProfilingGroup
newValue ProfilingGroup {Maybe [Tag]
Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ProfilingGroup -> ()
agentPermissions :: ProfilingGroup -> Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: ProfilingGroup -> Maybe [ChannelProperty]
computePlatform :: ProfilingGroup -> Maybe (Value Text)
profilingGroupName :: ProfilingGroup -> Value Text
tags :: ProfilingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
tags :: Maybe [Tag]
..}
    = ProfilingGroup {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" ProfilingGroup
newValue, Maybe [ChannelProperty]
Maybe (Value Text)
Maybe AgentPermissionsProperty
()
Value Text
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
haddock_workaround_ :: ()
agentPermissions :: Maybe AgentPermissionsProperty
anomalyDetectionNotificationConfiguration :: Maybe [ChannelProperty]
computePlatform :: Maybe (Value Text)
profilingGroupName :: Value Text
..}