module Stratosphere.Backup.BackupPlan.BackupPlanResourceTypeProperty (
        module Exports, BackupPlanResourceTypeProperty(..),
        mkBackupPlanResourceTypeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Backup.BackupPlan.AdvancedBackupSettingResourceTypeProperty as Exports
import {-# SOURCE #-} Stratosphere.Backup.BackupPlan.BackupRuleResourceTypeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BackupPlanResourceTypeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html>
    BackupPlanResourceTypeProperty {BackupPlanResourceTypeProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html#cfn-backup-backupplan-backupplanresourcetype-advancedbackupsettings>
                                    BackupPlanResourceTypeProperty
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
advancedBackupSettings :: (Prelude.Maybe [AdvancedBackupSettingResourceTypeProperty]),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html#cfn-backup-backupplan-backupplanresourcetype-backupplanname>
                                    BackupPlanResourceTypeProperty -> Value Text
backupPlanName :: (Value Prelude.Text),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html#cfn-backup-backupplan-backupplanresourcetype-backupplanrule>
                                    BackupPlanResourceTypeProperty -> [BackupRuleResourceTypeProperty]
backupPlanRule :: [BackupRuleResourceTypeProperty]}
  deriving stock (BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> Bool
(BackupPlanResourceTypeProperty
 -> BackupPlanResourceTypeProperty -> Bool)
-> (BackupPlanResourceTypeProperty
    -> BackupPlanResourceTypeProperty -> Bool)
-> Eq BackupPlanResourceTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> Bool
== :: BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> Bool
$c/= :: BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> Bool
/= :: BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> Bool
Prelude.Eq, Int -> BackupPlanResourceTypeProperty -> ShowS
[BackupPlanResourceTypeProperty] -> ShowS
BackupPlanResourceTypeProperty -> String
(Int -> BackupPlanResourceTypeProperty -> ShowS)
-> (BackupPlanResourceTypeProperty -> String)
-> ([BackupPlanResourceTypeProperty] -> ShowS)
-> Show BackupPlanResourceTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BackupPlanResourceTypeProperty -> ShowS
showsPrec :: Int -> BackupPlanResourceTypeProperty -> ShowS
$cshow :: BackupPlanResourceTypeProperty -> String
show :: BackupPlanResourceTypeProperty -> String
$cshowList :: [BackupPlanResourceTypeProperty] -> ShowS
showList :: [BackupPlanResourceTypeProperty] -> ShowS
Prelude.Show)
mkBackupPlanResourceTypeProperty ::
  Value Prelude.Text
  -> [BackupRuleResourceTypeProperty]
     -> BackupPlanResourceTypeProperty
mkBackupPlanResourceTypeProperty :: Value Text
-> [BackupRuleResourceTypeProperty]
-> BackupPlanResourceTypeProperty
mkBackupPlanResourceTypeProperty Value Text
backupPlanName [BackupRuleResourceTypeProperty]
backupPlanRule
  = BackupPlanResourceTypeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), backupPlanName :: Value Text
backupPlanName = Value Text
backupPlanName,
       backupPlanRule :: [BackupRuleResourceTypeProperty]
backupPlanRule = [BackupRuleResourceTypeProperty]
backupPlanRule,
       advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
advancedBackupSettings = Maybe [AdvancedBackupSettingResourceTypeProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BackupPlanResourceTypeProperty where
  toResourceProperties :: BackupPlanResourceTypeProperty -> ResourceProperties
toResourceProperties BackupPlanResourceTypeProperty {[BackupRuleResourceTypeProperty]
Maybe [AdvancedBackupSettingResourceTypeProperty]
()
Value Text
haddock_workaround_ :: BackupPlanResourceTypeProperty -> ()
advancedBackupSettings :: BackupPlanResourceTypeProperty
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: BackupPlanResourceTypeProperty -> Value Text
backupPlanRule :: BackupPlanResourceTypeProperty -> [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Backup::BackupPlan.BackupPlanResourceType",
         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
"BackupPlanName" 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..= Value Text
backupPlanName,
                            Key
"BackupPlanRule" Key -> [BackupRuleResourceTypeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [BackupRuleResourceTypeProperty]
backupPlanRule]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [AdvancedBackupSettingResourceTypeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AdvancedBackupSettings"
                                 ([AdvancedBackupSettingResourceTypeProperty] -> (Key, Value))
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AdvancedBackupSettingResourceTypeProperty]
advancedBackupSettings]))}
instance JSON.ToJSON BackupPlanResourceTypeProperty where
  toJSON :: BackupPlanResourceTypeProperty -> Value
toJSON BackupPlanResourceTypeProperty {[BackupRuleResourceTypeProperty]
Maybe [AdvancedBackupSettingResourceTypeProperty]
()
Value Text
haddock_workaround_ :: BackupPlanResourceTypeProperty -> ()
advancedBackupSettings :: BackupPlanResourceTypeProperty
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: BackupPlanResourceTypeProperty -> Value Text
backupPlanRule :: BackupPlanResourceTypeProperty -> [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
    = [(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
"BackupPlanName" 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..= Value Text
backupPlanName,
               Key
"BackupPlanRule" Key -> [BackupRuleResourceTypeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [BackupRuleResourceTypeProperty]
backupPlanRule]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [AdvancedBackupSettingResourceTypeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AdvancedBackupSettings"
                    ([AdvancedBackupSettingResourceTypeProperty] -> (Key, Value))
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AdvancedBackupSettingResourceTypeProperty]
advancedBackupSettings])))
instance Property "AdvancedBackupSettings" BackupPlanResourceTypeProperty where
  type PropertyType "AdvancedBackupSettings" BackupPlanResourceTypeProperty = [AdvancedBackupSettingResourceTypeProperty]
  set :: PropertyType
  "AdvancedBackupSettings" BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> BackupPlanResourceTypeProperty
set PropertyType
  "AdvancedBackupSettings" BackupPlanResourceTypeProperty
newValue BackupPlanResourceTypeProperty {[BackupRuleResourceTypeProperty]
Maybe [AdvancedBackupSettingResourceTypeProperty]
()
Value Text
haddock_workaround_ :: BackupPlanResourceTypeProperty -> ()
advancedBackupSettings :: BackupPlanResourceTypeProperty
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: BackupPlanResourceTypeProperty -> Value Text
backupPlanRule :: BackupPlanResourceTypeProperty -> [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
    = BackupPlanResourceTypeProperty
        {advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
advancedBackupSettings = [AdvancedBackupSettingResourceTypeProperty]
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AdvancedBackupSettingResourceTypeProperty]
PropertyType
  "AdvancedBackupSettings" BackupPlanResourceTypeProperty
newValue, [BackupRuleResourceTypeProperty]
()
Value Text
haddock_workaround_ :: ()
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
instance Property "BackupPlanName" BackupPlanResourceTypeProperty where
  type PropertyType "BackupPlanName" BackupPlanResourceTypeProperty = Value Prelude.Text
  set :: PropertyType "BackupPlanName" BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> BackupPlanResourceTypeProperty
set PropertyType "BackupPlanName" BackupPlanResourceTypeProperty
newValue BackupPlanResourceTypeProperty {[BackupRuleResourceTypeProperty]
Maybe [AdvancedBackupSettingResourceTypeProperty]
()
Value Text
haddock_workaround_ :: BackupPlanResourceTypeProperty -> ()
advancedBackupSettings :: BackupPlanResourceTypeProperty
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: BackupPlanResourceTypeProperty -> Value Text
backupPlanRule :: BackupPlanResourceTypeProperty -> [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
    = BackupPlanResourceTypeProperty {backupPlanName :: Value Text
backupPlanName = PropertyType "BackupPlanName" BackupPlanResourceTypeProperty
Value Text
newValue, [BackupRuleResourceTypeProperty]
Maybe [AdvancedBackupSettingResourceTypeProperty]
()
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanRule :: [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
instance Property "BackupPlanRule" BackupPlanResourceTypeProperty where
  type PropertyType "BackupPlanRule" BackupPlanResourceTypeProperty = [BackupRuleResourceTypeProperty]
  set :: PropertyType "BackupPlanRule" BackupPlanResourceTypeProperty
-> BackupPlanResourceTypeProperty -> BackupPlanResourceTypeProperty
set PropertyType "BackupPlanRule" BackupPlanResourceTypeProperty
newValue BackupPlanResourceTypeProperty {[BackupRuleResourceTypeProperty]
Maybe [AdvancedBackupSettingResourceTypeProperty]
()
Value Text
haddock_workaround_ :: BackupPlanResourceTypeProperty -> ()
advancedBackupSettings :: BackupPlanResourceTypeProperty
-> Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: BackupPlanResourceTypeProperty -> Value Text
backupPlanRule :: BackupPlanResourceTypeProperty -> [BackupRuleResourceTypeProperty]
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
backupPlanRule :: [BackupRuleResourceTypeProperty]
..}
    = BackupPlanResourceTypeProperty {backupPlanRule :: [BackupRuleResourceTypeProperty]
backupPlanRule = [BackupRuleResourceTypeProperty]
PropertyType "BackupPlanRule" BackupPlanResourceTypeProperty
newValue, Maybe [AdvancedBackupSettingResourceTypeProperty]
()
Value Text
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
haddock_workaround_ :: ()
advancedBackupSettings :: Maybe [AdvancedBackupSettingResourceTypeProperty]
backupPlanName :: Value Text
..}