{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Backup.Types.BackupRule where
import Amazonka.Backup.Types.CopyAction
import Amazonka.Backup.Types.Lifecycle
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BackupRule = BackupRule'
{
BackupRule -> Maybe Text
ruleId :: Prelude.Maybe Prelude.Text,
BackupRule -> Maybe Lifecycle
lifecycle :: Prelude.Maybe Lifecycle,
BackupRule -> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
BackupRule -> Maybe Text
scheduleExpression :: Prelude.Maybe Prelude.Text,
BackupRule -> Maybe Bool
enableContinuousBackup :: Prelude.Maybe Prelude.Bool,
BackupRule -> Maybe Integer
completionWindowMinutes :: Prelude.Maybe Prelude.Integer,
BackupRule -> Maybe [CopyAction]
copyActions :: Prelude.Maybe [CopyAction],
BackupRule -> Maybe Integer
startWindowMinutes :: Prelude.Maybe Prelude.Integer,
BackupRule -> Text
ruleName :: Prelude.Text,
BackupRule -> Text
targetBackupVaultName :: Prelude.Text
}
deriving (BackupRule -> BackupRule -> Bool
(BackupRule -> BackupRule -> Bool)
-> (BackupRule -> BackupRule -> Bool) -> Eq BackupRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackupRule -> BackupRule -> Bool
$c/= :: BackupRule -> BackupRule -> Bool
== :: BackupRule -> BackupRule -> Bool
$c== :: BackupRule -> BackupRule -> Bool
Prelude.Eq, Int -> BackupRule -> ShowS
[BackupRule] -> ShowS
BackupRule -> String
(Int -> BackupRule -> ShowS)
-> (BackupRule -> String)
-> ([BackupRule] -> ShowS)
-> Show BackupRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackupRule] -> ShowS
$cshowList :: [BackupRule] -> ShowS
show :: BackupRule -> String
$cshow :: BackupRule -> String
showsPrec :: Int -> BackupRule -> ShowS
$cshowsPrec :: Int -> BackupRule -> ShowS
Prelude.Show, (forall x. BackupRule -> Rep BackupRule x)
-> (forall x. Rep BackupRule x -> BackupRule) -> Generic BackupRule
forall x. Rep BackupRule x -> BackupRule
forall x. BackupRule -> Rep BackupRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BackupRule x -> BackupRule
$cfrom :: forall x. BackupRule -> Rep BackupRule x
Prelude.Generic)
newBackupRule ::
Prelude.Text ->
Prelude.Text ->
BackupRule
newBackupRule :: Text -> Text -> BackupRule
newBackupRule Text
pRuleName_ Text
pTargetBackupVaultName_ =
BackupRule' :: Maybe Text
-> Maybe Lifecycle
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule
BackupRule'
{ $sel:ruleId:BackupRule' :: Maybe Text
ruleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lifecycle:BackupRule' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
forall a. Maybe a
Prelude.Nothing,
$sel:recoveryPointTags:BackupRule' :: Maybe (Sensitive (HashMap Text Text))
recoveryPointTags = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleExpression:BackupRule' :: Maybe Text
scheduleExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableContinuousBackup:BackupRule' :: Maybe Bool
enableContinuousBackup = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:completionWindowMinutes:BackupRule' :: Maybe Integer
completionWindowMinutes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:copyActions:BackupRule' :: Maybe [CopyAction]
copyActions = Maybe [CopyAction]
forall a. Maybe a
Prelude.Nothing,
$sel:startWindowMinutes:BackupRule' :: Maybe Integer
startWindowMinutes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:ruleName:BackupRule' :: Text
ruleName = Text
pRuleName_,
$sel:targetBackupVaultName:BackupRule' :: Text
targetBackupVaultName = Text
pTargetBackupVaultName_
}
backupRule_ruleId :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Text)
backupRule_ruleId :: (Maybe Text -> f (Maybe Text)) -> BackupRule -> f BackupRule
backupRule_ruleId = (BackupRule -> Maybe Text)
-> (BackupRule -> Maybe Text -> BackupRule)
-> Lens BackupRule BackupRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe Text
ruleId :: Maybe Text
$sel:ruleId:BackupRule' :: BackupRule -> Maybe Text
ruleId} -> Maybe Text
ruleId) (\s :: BackupRule
s@BackupRule' {} Maybe Text
a -> BackupRule
s {$sel:ruleId:BackupRule' :: Maybe Text
ruleId = Maybe Text
a} :: BackupRule)
backupRule_lifecycle :: Lens.Lens' BackupRule (Prelude.Maybe Lifecycle)
backupRule_lifecycle :: (Maybe Lifecycle -> f (Maybe Lifecycle))
-> BackupRule -> f BackupRule
backupRule_lifecycle = (BackupRule -> Maybe Lifecycle)
-> (BackupRule -> Maybe Lifecycle -> BackupRule)
-> Lens BackupRule BackupRule (Maybe Lifecycle) (Maybe Lifecycle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe Lifecycle
lifecycle :: Maybe Lifecycle
$sel:lifecycle:BackupRule' :: BackupRule -> Maybe Lifecycle
lifecycle} -> Maybe Lifecycle
lifecycle) (\s :: BackupRule
s@BackupRule' {} Maybe Lifecycle
a -> BackupRule
s {$sel:lifecycle:BackupRule' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
a} :: BackupRule)
backupRule_recoveryPointTags :: Lens.Lens' BackupRule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
backupRule_recoveryPointTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BackupRule -> f BackupRule
backupRule_recoveryPointTags = (BackupRule -> Maybe (Sensitive (HashMap Text Text)))
-> (BackupRule
-> Maybe (Sensitive (HashMap Text Text)) -> BackupRule)
-> Lens
BackupRule
BackupRule
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe (Sensitive (HashMap Text Text))
recoveryPointTags :: Maybe (Sensitive (HashMap Text Text))
$sel:recoveryPointTags:BackupRule' :: BackupRule -> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags} -> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags) (\s :: BackupRule
s@BackupRule' {} Maybe (Sensitive (HashMap Text Text))
a -> BackupRule
s {$sel:recoveryPointTags:BackupRule' :: Maybe (Sensitive (HashMap Text Text))
recoveryPointTags = Maybe (Sensitive (HashMap Text Text))
a} :: BackupRule) ((Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> BackupRule -> f BackupRule)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BackupRule
-> f BackupRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text)))
-> AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
backupRule_scheduleExpression :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Text)
backupRule_scheduleExpression :: (Maybe Text -> f (Maybe Text)) -> BackupRule -> f BackupRule
backupRule_scheduleExpression = (BackupRule -> Maybe Text)
-> (BackupRule -> Maybe Text -> BackupRule)
-> Lens BackupRule BackupRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe Text
scheduleExpression :: Maybe Text
$sel:scheduleExpression:BackupRule' :: BackupRule -> Maybe Text
scheduleExpression} -> Maybe Text
scheduleExpression) (\s :: BackupRule
s@BackupRule' {} Maybe Text
a -> BackupRule
s {$sel:scheduleExpression:BackupRule' :: Maybe Text
scheduleExpression = Maybe Text
a} :: BackupRule)
backupRule_enableContinuousBackup :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Bool)
backupRule_enableContinuousBackup :: (Maybe Bool -> f (Maybe Bool)) -> BackupRule -> f BackupRule
backupRule_enableContinuousBackup = (BackupRule -> Maybe Bool)
-> (BackupRule -> Maybe Bool -> BackupRule)
-> Lens BackupRule BackupRule (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe Bool
enableContinuousBackup :: Maybe Bool
$sel:enableContinuousBackup:BackupRule' :: BackupRule -> Maybe Bool
enableContinuousBackup} -> Maybe Bool
enableContinuousBackup) (\s :: BackupRule
s@BackupRule' {} Maybe Bool
a -> BackupRule
s {$sel:enableContinuousBackup:BackupRule' :: Maybe Bool
enableContinuousBackup = Maybe Bool
a} :: BackupRule)
backupRule_completionWindowMinutes :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Integer)
backupRule_completionWindowMinutes :: (Maybe Integer -> f (Maybe Integer)) -> BackupRule -> f BackupRule
backupRule_completionWindowMinutes = (BackupRule -> Maybe Integer)
-> (BackupRule -> Maybe Integer -> BackupRule)
-> Lens BackupRule BackupRule (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe Integer
completionWindowMinutes :: Maybe Integer
$sel:completionWindowMinutes:BackupRule' :: BackupRule -> Maybe Integer
completionWindowMinutes} -> Maybe Integer
completionWindowMinutes) (\s :: BackupRule
s@BackupRule' {} Maybe Integer
a -> BackupRule
s {$sel:completionWindowMinutes:BackupRule' :: Maybe Integer
completionWindowMinutes = Maybe Integer
a} :: BackupRule)
backupRule_copyActions :: Lens.Lens' BackupRule (Prelude.Maybe [CopyAction])
backupRule_copyActions :: (Maybe [CopyAction] -> f (Maybe [CopyAction]))
-> BackupRule -> f BackupRule
backupRule_copyActions = (BackupRule -> Maybe [CopyAction])
-> (BackupRule -> Maybe [CopyAction] -> BackupRule)
-> Lens
BackupRule BackupRule (Maybe [CopyAction]) (Maybe [CopyAction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe [CopyAction]
copyActions :: Maybe [CopyAction]
$sel:copyActions:BackupRule' :: BackupRule -> Maybe [CopyAction]
copyActions} -> Maybe [CopyAction]
copyActions) (\s :: BackupRule
s@BackupRule' {} Maybe [CopyAction]
a -> BackupRule
s {$sel:copyActions:BackupRule' :: Maybe [CopyAction]
copyActions = Maybe [CopyAction]
a} :: BackupRule) ((Maybe [CopyAction] -> f (Maybe [CopyAction]))
-> BackupRule -> f BackupRule)
-> ((Maybe [CopyAction] -> f (Maybe [CopyAction]))
-> Maybe [CopyAction] -> f (Maybe [CopyAction]))
-> (Maybe [CopyAction] -> f (Maybe [CopyAction]))
-> BackupRule
-> f BackupRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CopyAction] [CopyAction] [CopyAction] [CopyAction]
-> Iso
(Maybe [CopyAction])
(Maybe [CopyAction])
(Maybe [CopyAction])
(Maybe [CopyAction])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [CopyAction] [CopyAction] [CopyAction] [CopyAction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
backupRule_startWindowMinutes :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Integer)
backupRule_startWindowMinutes :: (Maybe Integer -> f (Maybe Integer)) -> BackupRule -> f BackupRule
backupRule_startWindowMinutes = (BackupRule -> Maybe Integer)
-> (BackupRule -> Maybe Integer -> BackupRule)
-> Lens BackupRule BackupRule (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Maybe Integer
startWindowMinutes :: Maybe Integer
$sel:startWindowMinutes:BackupRule' :: BackupRule -> Maybe Integer
startWindowMinutes} -> Maybe Integer
startWindowMinutes) (\s :: BackupRule
s@BackupRule' {} Maybe Integer
a -> BackupRule
s {$sel:startWindowMinutes:BackupRule' :: Maybe Integer
startWindowMinutes = Maybe Integer
a} :: BackupRule)
backupRule_ruleName :: Lens.Lens' BackupRule Prelude.Text
backupRule_ruleName :: (Text -> f Text) -> BackupRule -> f BackupRule
backupRule_ruleName = (BackupRule -> Text)
-> (BackupRule -> Text -> BackupRule)
-> Lens BackupRule BackupRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Text
ruleName :: Text
$sel:ruleName:BackupRule' :: BackupRule -> Text
ruleName} -> Text
ruleName) (\s :: BackupRule
s@BackupRule' {} Text
a -> BackupRule
s {$sel:ruleName:BackupRule' :: Text
ruleName = Text
a} :: BackupRule)
backupRule_targetBackupVaultName :: Lens.Lens' BackupRule Prelude.Text
backupRule_targetBackupVaultName :: (Text -> f Text) -> BackupRule -> f BackupRule
backupRule_targetBackupVaultName = (BackupRule -> Text)
-> (BackupRule -> Text -> BackupRule)
-> Lens BackupRule BackupRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupRule' {Text
targetBackupVaultName :: Text
$sel:targetBackupVaultName:BackupRule' :: BackupRule -> Text
targetBackupVaultName} -> Text
targetBackupVaultName) (\s :: BackupRule
s@BackupRule' {} Text
a -> BackupRule
s {$sel:targetBackupVaultName:BackupRule' :: Text
targetBackupVaultName = Text
a} :: BackupRule)
instance Core.FromJSON BackupRule where
parseJSON :: Value -> Parser BackupRule
parseJSON =
String
-> (Object -> Parser BackupRule) -> Value -> Parser BackupRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BackupRule"
( \Object
x ->
Maybe Text
-> Maybe Lifecycle
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule
BackupRule'
(Maybe Text
-> Maybe Lifecycle
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
-> Parser (Maybe Text)
-> Parser
(Maybe Lifecycle
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RuleId")
Parser
(Maybe Lifecycle
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
-> Parser (Maybe Lifecycle)
-> Parser
(Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Lifecycle)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Lifecycle")
Parser
(Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
-> Parser (Maybe (Sensitive (HashMap Text Text)))
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe (Sensitive (HashMap Text Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecoveryPointTags"
Parser (Maybe (Maybe (Sensitive (HashMap Text Text))))
-> Maybe (Sensitive (HashMap Text Text))
-> Parser (Maybe (Sensitive (HashMap Text Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (Sensitive (HashMap Text Text))
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScheduleExpression")
Parser
(Maybe Bool
-> Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
-> Parser (Maybe Bool)
-> Parser
(Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableContinuousBackup")
Parser
(Maybe Integer
-> Maybe [CopyAction]
-> Maybe Integer
-> Text
-> Text
-> BackupRule)
-> Parser (Maybe Integer)
-> Parser
(Maybe [CopyAction] -> Maybe Integer -> Text -> Text -> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletionWindowMinutes")
Parser
(Maybe [CopyAction] -> Maybe Integer -> Text -> Text -> BackupRule)
-> Parser (Maybe [CopyAction])
-> Parser (Maybe Integer -> Text -> Text -> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [CopyAction]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CopyActions" Parser (Maybe (Maybe [CopyAction]))
-> Maybe [CopyAction] -> Parser (Maybe [CopyAction])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CopyAction]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Integer -> Text -> Text -> BackupRule)
-> Parser (Maybe Integer) -> Parser (Text -> Text -> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartWindowMinutes")
Parser (Text -> Text -> BackupRule)
-> Parser Text -> Parser (Text -> BackupRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RuleName")
Parser (Text -> BackupRule) -> Parser Text -> Parser BackupRule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TargetBackupVaultName")
)
instance Prelude.Hashable BackupRule
instance Prelude.NFData BackupRule