module Stratosphere.Config.ConfigRule.CustomPolicyDetailsProperty (
        CustomPolicyDetailsProperty(..), mkCustomPolicyDetailsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomPolicyDetailsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-custompolicydetails.html>
    CustomPolicyDetailsProperty {CustomPolicyDetailsProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-custompolicydetails.html#cfn-config-configrule-custompolicydetails-enabledebuglogdelivery>
                                 CustomPolicyDetailsProperty -> Maybe (Value Bool)
enableDebugLogDelivery :: (Prelude.Maybe (Value Prelude.Bool)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-custompolicydetails.html#cfn-config-configrule-custompolicydetails-policyruntime>
                                 CustomPolicyDetailsProperty -> Maybe (Value Text)
policyRuntime :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-custompolicydetails.html#cfn-config-configrule-custompolicydetails-policytext>
                                 CustomPolicyDetailsProperty -> Maybe (Value Text)
policyText :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty -> Bool
(CustomPolicyDetailsProperty
 -> CustomPolicyDetailsProperty -> Bool)
-> (CustomPolicyDetailsProperty
    -> CustomPolicyDetailsProperty -> Bool)
-> Eq CustomPolicyDetailsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty -> Bool
== :: CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty -> Bool
$c/= :: CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty -> Bool
/= :: CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty -> Bool
Prelude.Eq, Int -> CustomPolicyDetailsProperty -> ShowS
[CustomPolicyDetailsProperty] -> ShowS
CustomPolicyDetailsProperty -> String
(Int -> CustomPolicyDetailsProperty -> ShowS)
-> (CustomPolicyDetailsProperty -> String)
-> ([CustomPolicyDetailsProperty] -> ShowS)
-> Show CustomPolicyDetailsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomPolicyDetailsProperty -> ShowS
showsPrec :: Int -> CustomPolicyDetailsProperty -> ShowS
$cshow :: CustomPolicyDetailsProperty -> String
show :: CustomPolicyDetailsProperty -> String
$cshowList :: [CustomPolicyDetailsProperty] -> ShowS
showList :: [CustomPolicyDetailsProperty] -> ShowS
Prelude.Show)
mkCustomPolicyDetailsProperty :: CustomPolicyDetailsProperty
mkCustomPolicyDetailsProperty :: CustomPolicyDetailsProperty
mkCustomPolicyDetailsProperty
  = CustomPolicyDetailsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       enableDebugLogDelivery :: Maybe (Value Bool)
enableDebugLogDelivery = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       policyRuntime :: Maybe (Value Text)
policyRuntime = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, policyText :: Maybe (Value Text)
policyText = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomPolicyDetailsProperty where
  toResourceProperties :: CustomPolicyDetailsProperty -> ResourceProperties
toResourceProperties CustomPolicyDetailsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CustomPolicyDetailsProperty -> ()
enableDebugLogDelivery :: CustomPolicyDetailsProperty -> Maybe (Value Bool)
policyRuntime :: CustomPolicyDetailsProperty -> Maybe (Value Text)
policyText :: CustomPolicyDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Config::ConfigRule.CustomPolicyDetails",
         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 -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableDebugLogDelivery"
                              (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableDebugLogDelivery,
                            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
"PolicyRuntime" (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)
policyRuntime,
                            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
"PolicyText" (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)
policyText])}
instance JSON.ToJSON CustomPolicyDetailsProperty where
  toJSON :: CustomPolicyDetailsProperty -> Value
toJSON CustomPolicyDetailsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CustomPolicyDetailsProperty -> ()
enableDebugLogDelivery :: CustomPolicyDetailsProperty -> Maybe (Value Bool)
policyRuntime :: CustomPolicyDetailsProperty -> Maybe (Value Text)
policyText :: CustomPolicyDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
..}
    = [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableDebugLogDelivery"
                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableDebugLogDelivery,
               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
"PolicyRuntime" (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)
policyRuntime,
               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
"PolicyText" (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)
policyText]))
instance Property "EnableDebugLogDelivery" CustomPolicyDetailsProperty where
  type PropertyType "EnableDebugLogDelivery" CustomPolicyDetailsProperty = Value Prelude.Bool
  set :: PropertyType "EnableDebugLogDelivery" CustomPolicyDetailsProperty
-> CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty
set PropertyType "EnableDebugLogDelivery" CustomPolicyDetailsProperty
newValue CustomPolicyDetailsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CustomPolicyDetailsProperty -> ()
enableDebugLogDelivery :: CustomPolicyDetailsProperty -> Maybe (Value Bool)
policyRuntime :: CustomPolicyDetailsProperty -> Maybe (Value Text)
policyText :: CustomPolicyDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
..}
    = CustomPolicyDetailsProperty
        {enableDebugLogDelivery :: Maybe (Value Bool)
enableDebugLogDelivery = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EnableDebugLogDelivery" CustomPolicyDetailsProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
haddock_workaround_ :: ()
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
..}
instance Property "PolicyRuntime" CustomPolicyDetailsProperty where
  type PropertyType "PolicyRuntime" CustomPolicyDetailsProperty = Value Prelude.Text
  set :: PropertyType "PolicyRuntime" CustomPolicyDetailsProperty
-> CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty
set PropertyType "PolicyRuntime" CustomPolicyDetailsProperty
newValue CustomPolicyDetailsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CustomPolicyDetailsProperty -> ()
enableDebugLogDelivery :: CustomPolicyDetailsProperty -> Maybe (Value Bool)
policyRuntime :: CustomPolicyDetailsProperty -> Maybe (Value Text)
policyText :: CustomPolicyDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
..}
    = CustomPolicyDetailsProperty
        {policyRuntime :: Maybe (Value Text)
policyRuntime = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PolicyRuntime" CustomPolicyDetailsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyText :: Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyText :: Maybe (Value Text)
..}
instance Property "PolicyText" CustomPolicyDetailsProperty where
  type PropertyType "PolicyText" CustomPolicyDetailsProperty = Value Prelude.Text
  set :: PropertyType "PolicyText" CustomPolicyDetailsProperty
-> CustomPolicyDetailsProperty -> CustomPolicyDetailsProperty
set PropertyType "PolicyText" CustomPolicyDetailsProperty
newValue CustomPolicyDetailsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CustomPolicyDetailsProperty -> ()
enableDebugLogDelivery :: CustomPolicyDetailsProperty -> Maybe (Value Bool)
policyRuntime :: CustomPolicyDetailsProperty -> Maybe (Value Text)
policyText :: CustomPolicyDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
policyText :: Maybe (Value Text)
..}
    = CustomPolicyDetailsProperty
        {policyText :: Maybe (Value Text)
policyText = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PolicyText" CustomPolicyDetailsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
haddock_workaround_ :: ()
enableDebugLogDelivery :: Maybe (Value Bool)
policyRuntime :: Maybe (Value Text)
..}