module Stratosphere.ApplicationInsights.Application.ComponentConfigurationProperty (
        module Exports, ComponentConfigurationProperty(..),
        mkComponentConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ApplicationInsights.Application.ConfigurationDetailsProperty as Exports
import {-# SOURCE #-} Stratosphere.ApplicationInsights.Application.SubComponentTypeConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data ComponentConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentconfiguration.html>
    ComponentConfigurationProperty {ComponentConfigurationProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentconfiguration.html#cfn-applicationinsights-application-componentconfiguration-configurationdetails>
                                    ComponentConfigurationProperty
-> Maybe ConfigurationDetailsProperty
configurationDetails :: (Prelude.Maybe ConfigurationDetailsProperty),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentconfiguration.html#cfn-applicationinsights-application-componentconfiguration-subcomponenttypeconfigurations>
                                    ComponentConfigurationProperty
-> Maybe [SubComponentTypeConfigurationProperty]
subComponentTypeConfigurations :: (Prelude.Maybe [SubComponentTypeConfigurationProperty])}
  deriving stock (ComponentConfigurationProperty
-> ComponentConfigurationProperty -> Bool
(ComponentConfigurationProperty
 -> ComponentConfigurationProperty -> Bool)
-> (ComponentConfigurationProperty
    -> ComponentConfigurationProperty -> Bool)
-> Eq ComponentConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComponentConfigurationProperty
-> ComponentConfigurationProperty -> Bool
== :: ComponentConfigurationProperty
-> ComponentConfigurationProperty -> Bool
$c/= :: ComponentConfigurationProperty
-> ComponentConfigurationProperty -> Bool
/= :: ComponentConfigurationProperty
-> ComponentConfigurationProperty -> Bool
Prelude.Eq, Int -> ComponentConfigurationProperty -> ShowS
[ComponentConfigurationProperty] -> ShowS
ComponentConfigurationProperty -> String
(Int -> ComponentConfigurationProperty -> ShowS)
-> (ComponentConfigurationProperty -> String)
-> ([ComponentConfigurationProperty] -> ShowS)
-> Show ComponentConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ComponentConfigurationProperty -> ShowS
showsPrec :: Int -> ComponentConfigurationProperty -> ShowS
$cshow :: ComponentConfigurationProperty -> String
show :: ComponentConfigurationProperty -> String
$cshowList :: [ComponentConfigurationProperty] -> ShowS
showList :: [ComponentConfigurationProperty] -> ShowS
Prelude.Show)
mkComponentConfigurationProperty :: ComponentConfigurationProperty
mkComponentConfigurationProperty :: ComponentConfigurationProperty
mkComponentConfigurationProperty
  = ComponentConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), configurationDetails :: Maybe ConfigurationDetailsProperty
configurationDetails = Maybe ConfigurationDetailsProperty
forall a. Maybe a
Prelude.Nothing,
       subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
subComponentTypeConfigurations = Maybe [SubComponentTypeConfigurationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ComponentConfigurationProperty where
  toResourceProperties :: ComponentConfigurationProperty -> ResourceProperties
toResourceProperties ComponentConfigurationProperty {Maybe [SubComponentTypeConfigurationProperty]
Maybe ConfigurationDetailsProperty
()
haddock_workaround_ :: ComponentConfigurationProperty -> ()
configurationDetails :: ComponentConfigurationProperty
-> Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: ComponentConfigurationProperty
-> Maybe [SubComponentTypeConfigurationProperty]
haddock_workaround_ :: ()
configurationDetails :: Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationInsights::Application.ComponentConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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 -> ConfigurationDetailsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConfigurationDetails" (ConfigurationDetailsProperty -> (Key, Value))
-> Maybe ConfigurationDetailsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConfigurationDetailsProperty
configurationDetails,
                            Key -> [SubComponentTypeConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SubComponentTypeConfigurations"
                              ([SubComponentTypeConfigurationProperty] -> (Key, Value))
-> Maybe [SubComponentTypeConfigurationProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SubComponentTypeConfigurationProperty]
subComponentTypeConfigurations])}
instance JSON.ToJSON ComponentConfigurationProperty where
  toJSON :: ComponentConfigurationProperty -> Value
toJSON ComponentConfigurationProperty {Maybe [SubComponentTypeConfigurationProperty]
Maybe ConfigurationDetailsProperty
()
haddock_workaround_ :: ComponentConfigurationProperty -> ()
configurationDetails :: ComponentConfigurationProperty
-> Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: ComponentConfigurationProperty
-> Maybe [SubComponentTypeConfigurationProperty]
haddock_workaround_ :: ()
configurationDetails :: Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
..}
    = [(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 -> ConfigurationDetailsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConfigurationDetails" (ConfigurationDetailsProperty -> (Key, Value))
-> Maybe ConfigurationDetailsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConfigurationDetailsProperty
configurationDetails,
               Key -> [SubComponentTypeConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SubComponentTypeConfigurations"
                 ([SubComponentTypeConfigurationProperty] -> (Key, Value))
-> Maybe [SubComponentTypeConfigurationProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SubComponentTypeConfigurationProperty]
subComponentTypeConfigurations]))
instance Property "ConfigurationDetails" ComponentConfigurationProperty where
  type PropertyType "ConfigurationDetails" ComponentConfigurationProperty = ConfigurationDetailsProperty
  set :: PropertyType "ConfigurationDetails" ComponentConfigurationProperty
-> ComponentConfigurationProperty -> ComponentConfigurationProperty
set PropertyType "ConfigurationDetails" ComponentConfigurationProperty
newValue ComponentConfigurationProperty {Maybe [SubComponentTypeConfigurationProperty]
Maybe ConfigurationDetailsProperty
()
haddock_workaround_ :: ComponentConfigurationProperty -> ()
configurationDetails :: ComponentConfigurationProperty
-> Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: ComponentConfigurationProperty
-> Maybe [SubComponentTypeConfigurationProperty]
haddock_workaround_ :: ()
configurationDetails :: Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
..}
    = ComponentConfigurationProperty
        {configurationDetails :: Maybe ConfigurationDetailsProperty
configurationDetails = ConfigurationDetailsProperty -> Maybe ConfigurationDetailsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConfigurationDetails" ComponentConfigurationProperty
ConfigurationDetailsProperty
newValue, Maybe [SubComponentTypeConfigurationProperty]
()
haddock_workaround_ :: ()
subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
haddock_workaround_ :: ()
subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
..}
instance Property "SubComponentTypeConfigurations" ComponentConfigurationProperty where
  type PropertyType "SubComponentTypeConfigurations" ComponentConfigurationProperty = [SubComponentTypeConfigurationProperty]
  set :: PropertyType
  "SubComponentTypeConfigurations" ComponentConfigurationProperty
-> ComponentConfigurationProperty -> ComponentConfigurationProperty
set PropertyType
  "SubComponentTypeConfigurations" ComponentConfigurationProperty
newValue ComponentConfigurationProperty {Maybe [SubComponentTypeConfigurationProperty]
Maybe ConfigurationDetailsProperty
()
haddock_workaround_ :: ComponentConfigurationProperty -> ()
configurationDetails :: ComponentConfigurationProperty
-> Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: ComponentConfigurationProperty
-> Maybe [SubComponentTypeConfigurationProperty]
haddock_workaround_ :: ()
configurationDetails :: Maybe ConfigurationDetailsProperty
subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
..}
    = ComponentConfigurationProperty
        {subComponentTypeConfigurations :: Maybe [SubComponentTypeConfigurationProperty]
subComponentTypeConfigurations = [SubComponentTypeConfigurationProperty]
-> Maybe [SubComponentTypeConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SubComponentTypeConfigurationProperty]
PropertyType
  "SubComponentTypeConfigurations" ComponentConfigurationProperty
newValue, Maybe ConfigurationDetailsProperty
()
haddock_workaround_ :: ()
configurationDetails :: Maybe ConfigurationDetailsProperty
haddock_workaround_ :: ()
configurationDetails :: Maybe ConfigurationDetailsProperty
..}