module Stratosphere.Config.ConfigRule.ComplianceProperty (
ComplianceProperty(..), mkComplianceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ComplianceProperty
=
ComplianceProperty {ComplianceProperty -> ()
haddock_workaround_ :: (),
ComplianceProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ComplianceProperty -> ComplianceProperty -> Bool
(ComplianceProperty -> ComplianceProperty -> Bool)
-> (ComplianceProperty -> ComplianceProperty -> Bool)
-> Eq ComplianceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComplianceProperty -> ComplianceProperty -> Bool
== :: ComplianceProperty -> ComplianceProperty -> Bool
$c/= :: ComplianceProperty -> ComplianceProperty -> Bool
/= :: ComplianceProperty -> ComplianceProperty -> Bool
Prelude.Eq, Int -> ComplianceProperty -> ShowS
[ComplianceProperty] -> ShowS
ComplianceProperty -> String
(Int -> ComplianceProperty -> ShowS)
-> (ComplianceProperty -> String)
-> ([ComplianceProperty] -> ShowS)
-> Show ComplianceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ComplianceProperty -> ShowS
showsPrec :: Int -> ComplianceProperty -> ShowS
$cshow :: ComplianceProperty -> String
show :: ComplianceProperty -> String
$cshowList :: [ComplianceProperty] -> ShowS
showList :: [ComplianceProperty] -> ShowS
Prelude.Show)
mkComplianceProperty :: ComplianceProperty
mkComplianceProperty :: ComplianceProperty
mkComplianceProperty
= ComplianceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ComplianceProperty where
toResourceProperties :: ComplianceProperty -> ResourceProperties
toResourceProperties ComplianceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ComplianceProperty -> ()
type' :: ComplianceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Config::ConfigRule.Compliance",
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 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
"Type" (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)
type'])}
instance JSON.ToJSON ComplianceProperty where
toJSON :: ComplianceProperty -> Value
toJSON ComplianceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ComplianceProperty -> ()
type' :: ComplianceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: 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 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
"Type" (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)
type']))
instance Property "Type" ComplianceProperty where
type PropertyType "Type" ComplianceProperty = Value Prelude.Text
set :: PropertyType "Type" ComplianceProperty
-> ComplianceProperty -> ComplianceProperty
set PropertyType "Type" ComplianceProperty
newValue ComplianceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ComplianceProperty -> ()
type' :: ComplianceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
= ComplianceProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" ComplianceProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}