module Stratosphere.ResilienceHub.ResiliencyPolicy.PolicyMapProperty (
module Exports, PolicyMapProperty(..), mkPolicyMapProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ResilienceHub.ResiliencyPolicy.FailurePolicyProperty as Exports
import Stratosphere.ResourceProperties
data PolicyMapProperty
=
PolicyMapProperty {PolicyMapProperty -> ()
haddock_workaround_ :: (),
PolicyMapProperty -> FailurePolicyProperty
aZ :: FailurePolicyProperty,
PolicyMapProperty -> FailurePolicyProperty
hardware :: FailurePolicyProperty,
PolicyMapProperty -> Maybe FailurePolicyProperty
region :: (Prelude.Maybe FailurePolicyProperty),
PolicyMapProperty -> FailurePolicyProperty
software :: FailurePolicyProperty}
deriving stock (PolicyMapProperty -> PolicyMapProperty -> Bool
(PolicyMapProperty -> PolicyMapProperty -> Bool)
-> (PolicyMapProperty -> PolicyMapProperty -> Bool)
-> Eq PolicyMapProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyMapProperty -> PolicyMapProperty -> Bool
== :: PolicyMapProperty -> PolicyMapProperty -> Bool
$c/= :: PolicyMapProperty -> PolicyMapProperty -> Bool
/= :: PolicyMapProperty -> PolicyMapProperty -> Bool
Prelude.Eq, Int -> PolicyMapProperty -> ShowS
[PolicyMapProperty] -> ShowS
PolicyMapProperty -> String
(Int -> PolicyMapProperty -> ShowS)
-> (PolicyMapProperty -> String)
-> ([PolicyMapProperty] -> ShowS)
-> Show PolicyMapProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyMapProperty -> ShowS
showsPrec :: Int -> PolicyMapProperty -> ShowS
$cshow :: PolicyMapProperty -> String
show :: PolicyMapProperty -> String
$cshowList :: [PolicyMapProperty] -> ShowS
showList :: [PolicyMapProperty] -> ShowS
Prelude.Show)
mkPolicyMapProperty ::
FailurePolicyProperty
-> FailurePolicyProperty
-> FailurePolicyProperty -> PolicyMapProperty
mkPolicyMapProperty :: FailurePolicyProperty
-> FailurePolicyProperty
-> FailurePolicyProperty
-> PolicyMapProperty
mkPolicyMapProperty FailurePolicyProperty
aZ FailurePolicyProperty
hardware FailurePolicyProperty
software
= PolicyMapProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), aZ :: FailurePolicyProperty
aZ = FailurePolicyProperty
aZ, hardware :: FailurePolicyProperty
hardware = FailurePolicyProperty
hardware,
software :: FailurePolicyProperty
software = FailurePolicyProperty
software, region :: Maybe FailurePolicyProperty
region = Maybe FailurePolicyProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PolicyMapProperty where
toResourceProperties :: PolicyMapProperty -> ResourceProperties
toResourceProperties PolicyMapProperty {Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: PolicyMapProperty -> ()
aZ :: PolicyMapProperty -> FailurePolicyProperty
hardware :: PolicyMapProperty -> FailurePolicyProperty
region :: PolicyMapProperty -> Maybe FailurePolicyProperty
software :: PolicyMapProperty -> FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ResilienceHub::ResiliencyPolicy.PolicyMap",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"AZ" Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FailurePolicyProperty
aZ, Key
"Hardware" Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FailurePolicyProperty
hardware,
Key
"Software" Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FailurePolicyProperty
software]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Region" (FailurePolicyProperty -> (Key, Value))
-> Maybe FailurePolicyProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FailurePolicyProperty
region]))}
instance JSON.ToJSON PolicyMapProperty where
toJSON :: PolicyMapProperty -> Value
toJSON PolicyMapProperty {Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: PolicyMapProperty -> ()
aZ :: PolicyMapProperty -> FailurePolicyProperty
hardware :: PolicyMapProperty -> FailurePolicyProperty
region :: PolicyMapProperty -> Maybe FailurePolicyProperty
software :: PolicyMapProperty -> FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"AZ" Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FailurePolicyProperty
aZ, Key
"Hardware" Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FailurePolicyProperty
hardware,
Key
"Software" Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FailurePolicyProperty
software]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> FailurePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Region" (FailurePolicyProperty -> (Key, Value))
-> Maybe FailurePolicyProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FailurePolicyProperty
region])))
instance Property "AZ" PolicyMapProperty where
type PropertyType "AZ" PolicyMapProperty = FailurePolicyProperty
set :: PropertyType "AZ" PolicyMapProperty
-> PolicyMapProperty -> PolicyMapProperty
set PropertyType "AZ" PolicyMapProperty
newValue PolicyMapProperty {Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: PolicyMapProperty -> ()
aZ :: PolicyMapProperty -> FailurePolicyProperty
hardware :: PolicyMapProperty -> FailurePolicyProperty
region :: PolicyMapProperty -> Maybe FailurePolicyProperty
software :: PolicyMapProperty -> FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
= PolicyMapProperty {aZ :: FailurePolicyProperty
aZ = PropertyType "AZ" PolicyMapProperty
FailurePolicyProperty
newValue, Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: ()
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
haddock_workaround_ :: ()
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
instance Property "Hardware" PolicyMapProperty where
type PropertyType "Hardware" PolicyMapProperty = FailurePolicyProperty
set :: PropertyType "Hardware" PolicyMapProperty
-> PolicyMapProperty -> PolicyMapProperty
set PropertyType "Hardware" PolicyMapProperty
newValue PolicyMapProperty {Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: PolicyMapProperty -> ()
aZ :: PolicyMapProperty -> FailurePolicyProperty
hardware :: PolicyMapProperty -> FailurePolicyProperty
region :: PolicyMapProperty -> Maybe FailurePolicyProperty
software :: PolicyMapProperty -> FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
= PolicyMapProperty {hardware :: FailurePolicyProperty
hardware = PropertyType "Hardware" PolicyMapProperty
FailurePolicyProperty
newValue, Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
instance Property "Region" PolicyMapProperty where
type PropertyType "Region" PolicyMapProperty = FailurePolicyProperty
set :: PropertyType "Region" PolicyMapProperty
-> PolicyMapProperty -> PolicyMapProperty
set PropertyType "Region" PolicyMapProperty
newValue PolicyMapProperty {Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: PolicyMapProperty -> ()
aZ :: PolicyMapProperty -> FailurePolicyProperty
hardware :: PolicyMapProperty -> FailurePolicyProperty
region :: PolicyMapProperty -> Maybe FailurePolicyProperty
software :: PolicyMapProperty -> FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
= PolicyMapProperty {region :: Maybe FailurePolicyProperty
region = FailurePolicyProperty -> Maybe FailurePolicyProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Region" PolicyMapProperty
FailurePolicyProperty
newValue, ()
FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
software :: FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
software :: FailurePolicyProperty
..}
instance Property "Software" PolicyMapProperty where
type PropertyType "Software" PolicyMapProperty = FailurePolicyProperty
set :: PropertyType "Software" PolicyMapProperty
-> PolicyMapProperty -> PolicyMapProperty
set PropertyType "Software" PolicyMapProperty
newValue PolicyMapProperty {Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: PolicyMapProperty -> ()
aZ :: PolicyMapProperty -> FailurePolicyProperty
hardware :: PolicyMapProperty -> FailurePolicyProperty
region :: PolicyMapProperty -> Maybe FailurePolicyProperty
software :: PolicyMapProperty -> FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
software :: FailurePolicyProperty
..}
= PolicyMapProperty {software :: FailurePolicyProperty
software = PropertyType "Software" PolicyMapProperty
FailurePolicyProperty
newValue, Maybe FailurePolicyProperty
()
FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
haddock_workaround_ :: ()
aZ :: FailurePolicyProperty
hardware :: FailurePolicyProperty
region :: Maybe FailurePolicyProperty
..}