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