module Stratosphere.Backup.BackupPlan.CopyActionResourceTypeProperty (
module Exports, CopyActionResourceTypeProperty(..),
mkCopyActionResourceTypeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Backup.BackupPlan.LifecycleResourceTypeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CopyActionResourceTypeProperty
=
CopyActionResourceTypeProperty {CopyActionResourceTypeProperty -> ()
haddock_workaround_ :: (),
CopyActionResourceTypeProperty -> Value Text
destinationBackupVaultArn :: (Value Prelude.Text),
CopyActionResourceTypeProperty
-> Maybe LifecycleResourceTypeProperty
lifecycle :: (Prelude.Maybe LifecycleResourceTypeProperty)}
deriving stock (CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool
(CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool)
-> (CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool)
-> Eq CopyActionResourceTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool
== :: CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool
$c/= :: CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool
/= :: CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> Bool
Prelude.Eq, Int -> CopyActionResourceTypeProperty -> ShowS
[CopyActionResourceTypeProperty] -> ShowS
CopyActionResourceTypeProperty -> String
(Int -> CopyActionResourceTypeProperty -> ShowS)
-> (CopyActionResourceTypeProperty -> String)
-> ([CopyActionResourceTypeProperty] -> ShowS)
-> Show CopyActionResourceTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CopyActionResourceTypeProperty -> ShowS
showsPrec :: Int -> CopyActionResourceTypeProperty -> ShowS
$cshow :: CopyActionResourceTypeProperty -> String
show :: CopyActionResourceTypeProperty -> String
$cshowList :: [CopyActionResourceTypeProperty] -> ShowS
showList :: [CopyActionResourceTypeProperty] -> ShowS
Prelude.Show)
mkCopyActionResourceTypeProperty ::
Value Prelude.Text -> CopyActionResourceTypeProperty
mkCopyActionResourceTypeProperty :: Value Text -> CopyActionResourceTypeProperty
mkCopyActionResourceTypeProperty Value Text
destinationBackupVaultArn
= CopyActionResourceTypeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
destinationBackupVaultArn :: Value Text
destinationBackupVaultArn = Value Text
destinationBackupVaultArn,
lifecycle :: Maybe LifecycleResourceTypeProperty
lifecycle = Maybe LifecycleResourceTypeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CopyActionResourceTypeProperty where
toResourceProperties :: CopyActionResourceTypeProperty -> ResourceProperties
toResourceProperties CopyActionResourceTypeProperty {Maybe LifecycleResourceTypeProperty
()
Value Text
haddock_workaround_ :: CopyActionResourceTypeProperty -> ()
destinationBackupVaultArn :: CopyActionResourceTypeProperty -> Value Text
lifecycle :: CopyActionResourceTypeProperty
-> Maybe LifecycleResourceTypeProperty
haddock_workaround_ :: ()
destinationBackupVaultArn :: Value Text
lifecycle :: Maybe LifecycleResourceTypeProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Backup::BackupPlan.CopyActionResourceType",
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
"DestinationBackupVaultArn" 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
destinationBackupVaultArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> LifecycleResourceTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Lifecycle" (LifecycleResourceTypeProperty -> (Key, Value))
-> Maybe LifecycleResourceTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LifecycleResourceTypeProperty
lifecycle]))}
instance JSON.ToJSON CopyActionResourceTypeProperty where
toJSON :: CopyActionResourceTypeProperty -> Value
toJSON CopyActionResourceTypeProperty {Maybe LifecycleResourceTypeProperty
()
Value Text
haddock_workaround_ :: CopyActionResourceTypeProperty -> ()
destinationBackupVaultArn :: CopyActionResourceTypeProperty -> Value Text
lifecycle :: CopyActionResourceTypeProperty
-> Maybe LifecycleResourceTypeProperty
haddock_workaround_ :: ()
destinationBackupVaultArn :: Value Text
lifecycle :: Maybe LifecycleResourceTypeProperty
..}
= [(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
"DestinationBackupVaultArn" 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
destinationBackupVaultArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> LifecycleResourceTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Lifecycle" (LifecycleResourceTypeProperty -> (Key, Value))
-> Maybe LifecycleResourceTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LifecycleResourceTypeProperty
lifecycle])))
instance Property "DestinationBackupVaultArn" CopyActionResourceTypeProperty where
type PropertyType "DestinationBackupVaultArn" CopyActionResourceTypeProperty = Value Prelude.Text
set :: PropertyType
"DestinationBackupVaultArn" CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> CopyActionResourceTypeProperty
set PropertyType
"DestinationBackupVaultArn" CopyActionResourceTypeProperty
newValue CopyActionResourceTypeProperty {Maybe LifecycleResourceTypeProperty
()
Value Text
haddock_workaround_ :: CopyActionResourceTypeProperty -> ()
destinationBackupVaultArn :: CopyActionResourceTypeProperty -> Value Text
lifecycle :: CopyActionResourceTypeProperty
-> Maybe LifecycleResourceTypeProperty
haddock_workaround_ :: ()
destinationBackupVaultArn :: Value Text
lifecycle :: Maybe LifecycleResourceTypeProperty
..}
= CopyActionResourceTypeProperty
{destinationBackupVaultArn :: Value Text
destinationBackupVaultArn = PropertyType
"DestinationBackupVaultArn" CopyActionResourceTypeProperty
Value Text
newValue, Maybe LifecycleResourceTypeProperty
()
haddock_workaround_ :: ()
lifecycle :: Maybe LifecycleResourceTypeProperty
haddock_workaround_ :: ()
lifecycle :: Maybe LifecycleResourceTypeProperty
..}
instance Property "Lifecycle" CopyActionResourceTypeProperty where
type PropertyType "Lifecycle" CopyActionResourceTypeProperty = LifecycleResourceTypeProperty
set :: PropertyType "Lifecycle" CopyActionResourceTypeProperty
-> CopyActionResourceTypeProperty -> CopyActionResourceTypeProperty
set PropertyType "Lifecycle" CopyActionResourceTypeProperty
newValue CopyActionResourceTypeProperty {Maybe LifecycleResourceTypeProperty
()
Value Text
haddock_workaround_ :: CopyActionResourceTypeProperty -> ()
destinationBackupVaultArn :: CopyActionResourceTypeProperty -> Value Text
lifecycle :: CopyActionResourceTypeProperty
-> Maybe LifecycleResourceTypeProperty
haddock_workaround_ :: ()
destinationBackupVaultArn :: Value Text
lifecycle :: Maybe LifecycleResourceTypeProperty
..}
= CopyActionResourceTypeProperty
{lifecycle :: Maybe LifecycleResourceTypeProperty
lifecycle = LifecycleResourceTypeProperty
-> Maybe LifecycleResourceTypeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Lifecycle" CopyActionResourceTypeProperty
LifecycleResourceTypeProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
destinationBackupVaultArn :: Value Text
haddock_workaround_ :: ()
destinationBackupVaultArn :: Value Text
..}