module Stratosphere.Backup.BackupSelection.ConditionParameterProperty (
        ConditionParameterProperty(..), mkConditionParameterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionParameterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionparameter.html>
    ConditionParameterProperty {ConditionParameterProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionparameter.html#cfn-backup-backupselection-conditionparameter-conditionkey>
                                ConditionParameterProperty -> Maybe (Value Text)
conditionKey :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionparameter.html#cfn-backup-backupselection-conditionparameter-conditionvalue>
                                ConditionParameterProperty -> Maybe (Value Text)
conditionValue :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConditionParameterProperty -> ConditionParameterProperty -> Bool
(ConditionParameterProperty -> ConditionParameterProperty -> Bool)
-> (ConditionParameterProperty
    -> ConditionParameterProperty -> Bool)
-> Eq ConditionParameterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionParameterProperty -> ConditionParameterProperty -> Bool
== :: ConditionParameterProperty -> ConditionParameterProperty -> Bool
$c/= :: ConditionParameterProperty -> ConditionParameterProperty -> Bool
/= :: ConditionParameterProperty -> ConditionParameterProperty -> Bool
Prelude.Eq, Int -> ConditionParameterProperty -> ShowS
[ConditionParameterProperty] -> ShowS
ConditionParameterProperty -> String
(Int -> ConditionParameterProperty -> ShowS)
-> (ConditionParameterProperty -> String)
-> ([ConditionParameterProperty] -> ShowS)
-> Show ConditionParameterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionParameterProperty -> ShowS
showsPrec :: Int -> ConditionParameterProperty -> ShowS
$cshow :: ConditionParameterProperty -> String
show :: ConditionParameterProperty -> String
$cshowList :: [ConditionParameterProperty] -> ShowS
showList :: [ConditionParameterProperty] -> ShowS
Prelude.Show)
mkConditionParameterProperty :: ConditionParameterProperty
mkConditionParameterProperty :: ConditionParameterProperty
mkConditionParameterProperty
  = ConditionParameterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), conditionKey :: Maybe (Value Text)
conditionKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       conditionValue :: Maybe (Value Text)
conditionValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionParameterProperty where
  toResourceProperties :: ConditionParameterProperty -> ResourceProperties
toResourceProperties ConditionParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionParameterProperty -> ()
conditionKey :: ConditionParameterProperty -> Maybe (Value Text)
conditionValue :: ConditionParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionKey :: Maybe (Value Text)
conditionValue :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Backup::BackupSelection.ConditionParameter",
         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
"ConditionKey" (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)
conditionKey,
                            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
"ConditionValue" (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)
conditionValue])}
instance JSON.ToJSON ConditionParameterProperty where
  toJSON :: ConditionParameterProperty -> Value
toJSON ConditionParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionParameterProperty -> ()
conditionKey :: ConditionParameterProperty -> Maybe (Value Text)
conditionValue :: ConditionParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionKey :: Maybe (Value Text)
conditionValue :: 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
"ConditionKey" (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)
conditionKey,
               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
"ConditionValue" (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)
conditionValue]))
instance Property "ConditionKey" ConditionParameterProperty where
  type PropertyType "ConditionKey" ConditionParameterProperty = Value Prelude.Text
  set :: PropertyType "ConditionKey" ConditionParameterProperty
-> ConditionParameterProperty -> ConditionParameterProperty
set PropertyType "ConditionKey" ConditionParameterProperty
newValue ConditionParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionParameterProperty -> ()
conditionKey :: ConditionParameterProperty -> Maybe (Value Text)
conditionValue :: ConditionParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionKey :: Maybe (Value Text)
conditionValue :: Maybe (Value Text)
..}
    = ConditionParameterProperty
        {conditionKey :: Maybe (Value Text)
conditionKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConditionKey" ConditionParameterProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
conditionValue :: Maybe (Value Text)
haddock_workaround_ :: ()
conditionValue :: Maybe (Value Text)
..}
instance Property "ConditionValue" ConditionParameterProperty where
  type PropertyType "ConditionValue" ConditionParameterProperty = Value Prelude.Text
  set :: PropertyType "ConditionValue" ConditionParameterProperty
-> ConditionParameterProperty -> ConditionParameterProperty
set PropertyType "ConditionValue" ConditionParameterProperty
newValue ConditionParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionParameterProperty -> ()
conditionKey :: ConditionParameterProperty -> Maybe (Value Text)
conditionValue :: ConditionParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionKey :: Maybe (Value Text)
conditionValue :: Maybe (Value Text)
..}
    = ConditionParameterProperty
        {conditionValue :: Maybe (Value Text)
conditionValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConditionValue" ConditionParameterProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
conditionKey :: Maybe (Value Text)
haddock_workaround_ :: ()
conditionKey :: Maybe (Value Text)
..}