module Stratosphere.Config.RemediationConfiguration.StaticValueProperty (
        StaticValueProperty(..), mkStaticValueProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StaticValueProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-remediationconfiguration-staticvalue.html>
    StaticValueProperty {StaticValueProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-remediationconfiguration-staticvalue.html#cfn-config-remediationconfiguration-staticvalue-values>
                         StaticValueProperty -> Maybe (ValueList Text)
values :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (StaticValueProperty -> StaticValueProperty -> Bool
(StaticValueProperty -> StaticValueProperty -> Bool)
-> (StaticValueProperty -> StaticValueProperty -> Bool)
-> Eq StaticValueProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StaticValueProperty -> StaticValueProperty -> Bool
== :: StaticValueProperty -> StaticValueProperty -> Bool
$c/= :: StaticValueProperty -> StaticValueProperty -> Bool
/= :: StaticValueProperty -> StaticValueProperty -> Bool
Prelude.Eq, Int -> StaticValueProperty -> ShowS
[StaticValueProperty] -> ShowS
StaticValueProperty -> String
(Int -> StaticValueProperty -> ShowS)
-> (StaticValueProperty -> String)
-> ([StaticValueProperty] -> ShowS)
-> Show StaticValueProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StaticValueProperty -> ShowS
showsPrec :: Int -> StaticValueProperty -> ShowS
$cshow :: StaticValueProperty -> String
show :: StaticValueProperty -> String
$cshowList :: [StaticValueProperty] -> ShowS
showList :: [StaticValueProperty] -> ShowS
Prelude.Show)
mkStaticValueProperty :: StaticValueProperty
mkStaticValueProperty :: StaticValueProperty
mkStaticValueProperty
  = StaticValueProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), values :: Maybe (ValueList Text)
values = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StaticValueProperty where
  toResourceProperties :: StaticValueProperty -> ResourceProperties
toResourceProperties StaticValueProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: StaticValueProperty -> ()
values :: StaticValueProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Config::RemediationConfiguration.StaticValue",
         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 -> ValueList 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
"Values" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
values])}
instance JSON.ToJSON StaticValueProperty where
  toJSON :: StaticValueProperty -> Value
toJSON StaticValueProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: StaticValueProperty -> ()
values :: StaticValueProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
values :: Maybe (ValueList 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 -> ValueList 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
"Values" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
values]))
instance Property "Values" StaticValueProperty where
  type PropertyType "Values" StaticValueProperty = ValueList Prelude.Text
  set :: PropertyType "Values" StaticValueProperty
-> StaticValueProperty -> StaticValueProperty
set PropertyType "Values" StaticValueProperty
newValue StaticValueProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: StaticValueProperty -> ()
values :: StaticValueProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
..}
    = StaticValueProperty {values :: Maybe (ValueList Text)
values = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Values" StaticValueProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}