module Stratosphere.Backup.RestoreTestingSelection.ProtectedResourceConditionsProperty (
        module Exports, ProtectedResourceConditionsProperty(..),
        mkProtectedResourceConditionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Backup.RestoreTestingSelection.KeyValueProperty as Exports
import Stratosphere.ResourceProperties
data ProtectedResourceConditionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-restoretestingselection-protectedresourceconditions.html>
    ProtectedResourceConditionsProperty {ProtectedResourceConditionsProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-restoretestingselection-protectedresourceconditions.html#cfn-backup-restoretestingselection-protectedresourceconditions-stringequals>
                                         ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
stringEquals :: (Prelude.Maybe [KeyValueProperty]),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-restoretestingselection-protectedresourceconditions.html#cfn-backup-restoretestingselection-protectedresourceconditions-stringnotequals>
                                         ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
stringNotEquals :: (Prelude.Maybe [KeyValueProperty])}
  deriving stock (ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty -> Bool
(ProtectedResourceConditionsProperty
 -> ProtectedResourceConditionsProperty -> Bool)
-> (ProtectedResourceConditionsProperty
    -> ProtectedResourceConditionsProperty -> Bool)
-> Eq ProtectedResourceConditionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty -> Bool
== :: ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty -> Bool
$c/= :: ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty -> Bool
/= :: ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty -> Bool
Prelude.Eq, Int -> ProtectedResourceConditionsProperty -> ShowS
[ProtectedResourceConditionsProperty] -> ShowS
ProtectedResourceConditionsProperty -> String
(Int -> ProtectedResourceConditionsProperty -> ShowS)
-> (ProtectedResourceConditionsProperty -> String)
-> ([ProtectedResourceConditionsProperty] -> ShowS)
-> Show ProtectedResourceConditionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProtectedResourceConditionsProperty -> ShowS
showsPrec :: Int -> ProtectedResourceConditionsProperty -> ShowS
$cshow :: ProtectedResourceConditionsProperty -> String
show :: ProtectedResourceConditionsProperty -> String
$cshowList :: [ProtectedResourceConditionsProperty] -> ShowS
showList :: [ProtectedResourceConditionsProperty] -> ShowS
Prelude.Show)
mkProtectedResourceConditionsProperty ::
  ProtectedResourceConditionsProperty
mkProtectedResourceConditionsProperty :: ProtectedResourceConditionsProperty
mkProtectedResourceConditionsProperty
  = ProtectedResourceConditionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), stringEquals :: Maybe [KeyValueProperty]
stringEquals = Maybe [KeyValueProperty]
forall a. Maybe a
Prelude.Nothing,
       stringNotEquals :: Maybe [KeyValueProperty]
stringNotEquals = Maybe [KeyValueProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProtectedResourceConditionsProperty where
  toResourceProperties :: ProtectedResourceConditionsProperty -> ResourceProperties
toResourceProperties ProtectedResourceConditionsProperty {Maybe [KeyValueProperty]
()
haddock_workaround_ :: ProtectedResourceConditionsProperty -> ()
stringEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
stringNotEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
haddock_workaround_ :: ()
stringEquals :: Maybe [KeyValueProperty]
stringNotEquals :: Maybe [KeyValueProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Backup::RestoreTestingSelection.ProtectedResourceConditions",
         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 -> [KeyValueProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StringEquals" ([KeyValueProperty] -> (Key, Value))
-> Maybe [KeyValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [KeyValueProperty]
stringEquals,
                            Key -> [KeyValueProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StringNotEquals" ([KeyValueProperty] -> (Key, Value))
-> Maybe [KeyValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [KeyValueProperty]
stringNotEquals])}
instance JSON.ToJSON ProtectedResourceConditionsProperty where
  toJSON :: ProtectedResourceConditionsProperty -> Value
toJSON ProtectedResourceConditionsProperty {Maybe [KeyValueProperty]
()
haddock_workaround_ :: ProtectedResourceConditionsProperty -> ()
stringEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
stringNotEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
haddock_workaround_ :: ()
stringEquals :: Maybe [KeyValueProperty]
stringNotEquals :: Maybe [KeyValueProperty]
..}
    = [(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 -> [KeyValueProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StringEquals" ([KeyValueProperty] -> (Key, Value))
-> Maybe [KeyValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [KeyValueProperty]
stringEquals,
               Key -> [KeyValueProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StringNotEquals" ([KeyValueProperty] -> (Key, Value))
-> Maybe [KeyValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [KeyValueProperty]
stringNotEquals]))
instance Property "StringEquals" ProtectedResourceConditionsProperty where
  type PropertyType "StringEquals" ProtectedResourceConditionsProperty = [KeyValueProperty]
  set :: PropertyType "StringEquals" ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty
set PropertyType "StringEquals" ProtectedResourceConditionsProperty
newValue ProtectedResourceConditionsProperty {Maybe [KeyValueProperty]
()
haddock_workaround_ :: ProtectedResourceConditionsProperty -> ()
stringEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
stringNotEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
haddock_workaround_ :: ()
stringEquals :: Maybe [KeyValueProperty]
stringNotEquals :: Maybe [KeyValueProperty]
..}
    = ProtectedResourceConditionsProperty
        {stringEquals :: Maybe [KeyValueProperty]
stringEquals = [KeyValueProperty] -> Maybe [KeyValueProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [KeyValueProperty]
PropertyType "StringEquals" ProtectedResourceConditionsProperty
newValue, Maybe [KeyValueProperty]
()
haddock_workaround_ :: ()
stringNotEquals :: Maybe [KeyValueProperty]
haddock_workaround_ :: ()
stringNotEquals :: Maybe [KeyValueProperty]
..}
instance Property "StringNotEquals" ProtectedResourceConditionsProperty where
  type PropertyType "StringNotEquals" ProtectedResourceConditionsProperty = [KeyValueProperty]
  set :: PropertyType "StringNotEquals" ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty
-> ProtectedResourceConditionsProperty
set PropertyType "StringNotEquals" ProtectedResourceConditionsProperty
newValue ProtectedResourceConditionsProperty {Maybe [KeyValueProperty]
()
haddock_workaround_ :: ProtectedResourceConditionsProperty -> ()
stringEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
stringNotEquals :: ProtectedResourceConditionsProperty -> Maybe [KeyValueProperty]
haddock_workaround_ :: ()
stringEquals :: Maybe [KeyValueProperty]
stringNotEquals :: Maybe [KeyValueProperty]
..}
    = ProtectedResourceConditionsProperty
        {stringNotEquals :: Maybe [KeyValueProperty]
stringNotEquals = [KeyValueProperty] -> Maybe [KeyValueProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [KeyValueProperty]
PropertyType "StringNotEquals" ProtectedResourceConditionsProperty
newValue, Maybe [KeyValueProperty]
()
haddock_workaround_ :: ()
stringEquals :: Maybe [KeyValueProperty]
haddock_workaround_ :: ()
stringEquals :: Maybe [KeyValueProperty]
..}