{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Backup.Types.RecoveryPointByBackupVault
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Backup.Types.RecoveryPointByBackupVault where

import Amazonka.Backup.Types.CalculatedLifecycle
import Amazonka.Backup.Types.Lifecycle
import Amazonka.Backup.Types.RecoveryPointCreator
import Amazonka.Backup.Types.RecoveryPointStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains detailed information about the recovery points stored in a
-- backup vault.
--
-- /See:/ 'newRecoveryPointByBackupVault' smart constructor.
data RecoveryPointByBackupVault = RecoveryPointByBackupVault'
  { -- | A Boolean value that is returned as @TRUE@ if the specified recovery
    -- point is encrypted, or @FALSE@ if the recovery point is not encrypted.
    RecoveryPointByBackupVault -> Maybe Bool
isEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | A status code specifying the state of the recovery point.
    RecoveryPointByBackupVault -> Maybe RecoveryPointStatus
status :: Prelude.Maybe RecoveryPointStatus,
    -- | Specifies the IAM role ARN used to create the target recovery point; for
    -- example, @arn:aws:iam::123456789012:role\/S3Access@.
    RecoveryPointByBackupVault -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Web Services resource saved as a recovery point; for
    -- example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon
    -- Relational Database Service (Amazon RDS) database. For Windows Volume
    -- Shadow Copy Service (VSS) backups, the only supported resource type is
    -- Amazon EC2.
    RecoveryPointByBackupVault -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | Contains identifying information about the creation of a recovery point,
    -- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and
    -- @BackupRuleId@ of the backup plan that is used to create it.
    RecoveryPointByBackupVault -> Maybe RecoveryPointCreator
createdBy :: Prelude.Maybe RecoveryPointCreator,
    -- | A @CalculatedLifecycle@ object containing @DeleteAt@ and
    -- @MoveToColdStorageAt@ timestamps.
    RecoveryPointByBackupVault -> Maybe CalculatedLifecycle
calculatedLifecycle :: Prelude.Maybe CalculatedLifecycle,
    -- | The lifecycle defines when a protected resource is transitioned to cold
    -- storage and when it expires. Backup transitions and expires backups
    -- automatically according to the lifecycle that you define.
    --
    -- Backups transitioned to cold storage must be stored in cold storage for
    -- a minimum of 90 days. Therefore, the “expire after days” setting must be
    -- 90 days greater than the “transition to cold after days” setting. The
    -- “transition to cold after days” setting cannot be changed after a backup
    -- has been transitioned to cold.
    --
    -- Only Amazon EFS file system backups can be transitioned to cold storage.
    RecoveryPointByBackupVault -> Maybe Lifecycle
lifecycle :: Prelude.Maybe Lifecycle,
    -- | An ARN that uniquely identifies a backup vault; for example,
    -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
    RecoveryPointByBackupVault -> Maybe Text
backupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | The backup vault where the recovery point was originally copied from. If
    -- the recovery point is restored to the same account this value will be
    -- @null@.
    RecoveryPointByBackupVault -> Maybe Text
sourceBackupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time a recovery point was last restored, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @LastRestoreTime@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    RecoveryPointByBackupVault -> Maybe POSIX
lastRestoreTime :: Prelude.Maybe Core.POSIX,
    -- | An ARN that uniquely identifies a resource. The format of the ARN
    -- depends on the resource type.
    RecoveryPointByBackupVault -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | A message explaining the reason of the recovery point deletion failure.
    RecoveryPointByBackupVault -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
    -- for example,
    -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.
    RecoveryPointByBackupVault -> Maybe Text
recoveryPointArn :: Prelude.Maybe Prelude.Text,
    -- | The server-side encryption key that is used to protect your backups; for
    -- example,
    -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
    RecoveryPointByBackupVault -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The size, in bytes, of a backup.
    RecoveryPointByBackupVault -> Maybe Integer
backupSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The date and time a recovery point is created, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @CreationDate@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    RecoveryPointByBackupVault -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time a job to restore a recovery point is completed, in
    -- Unix format and Coordinated Universal Time (UTC). The value of
    -- @CompletionDate@ is accurate to milliseconds. For example, the value
    -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
    RecoveryPointByBackupVault -> Maybe POSIX
completionDate :: Prelude.Maybe Core.POSIX,
    -- | The name of a logical container where backups are stored. Backup vaults
    -- are identified by names that are unique to the account used to create
    -- them and the Amazon Web Services Region where they are created. They
    -- consist of lowercase letters, numbers, and hyphens.
    RecoveryPointByBackupVault -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text
  }
  deriving (RecoveryPointByBackupVault -> RecoveryPointByBackupVault -> Bool
(RecoveryPointByBackupVault -> RecoveryPointByBackupVault -> Bool)
-> (RecoveryPointByBackupVault
    -> RecoveryPointByBackupVault -> Bool)
-> Eq RecoveryPointByBackupVault
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecoveryPointByBackupVault -> RecoveryPointByBackupVault -> Bool
$c/= :: RecoveryPointByBackupVault -> RecoveryPointByBackupVault -> Bool
== :: RecoveryPointByBackupVault -> RecoveryPointByBackupVault -> Bool
$c== :: RecoveryPointByBackupVault -> RecoveryPointByBackupVault -> Bool
Prelude.Eq, ReadPrec [RecoveryPointByBackupVault]
ReadPrec RecoveryPointByBackupVault
Int -> ReadS RecoveryPointByBackupVault
ReadS [RecoveryPointByBackupVault]
(Int -> ReadS RecoveryPointByBackupVault)
-> ReadS [RecoveryPointByBackupVault]
-> ReadPrec RecoveryPointByBackupVault
-> ReadPrec [RecoveryPointByBackupVault]
-> Read RecoveryPointByBackupVault
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecoveryPointByBackupVault]
$creadListPrec :: ReadPrec [RecoveryPointByBackupVault]
readPrec :: ReadPrec RecoveryPointByBackupVault
$creadPrec :: ReadPrec RecoveryPointByBackupVault
readList :: ReadS [RecoveryPointByBackupVault]
$creadList :: ReadS [RecoveryPointByBackupVault]
readsPrec :: Int -> ReadS RecoveryPointByBackupVault
$creadsPrec :: Int -> ReadS RecoveryPointByBackupVault
Prelude.Read, Int -> RecoveryPointByBackupVault -> ShowS
[RecoveryPointByBackupVault] -> ShowS
RecoveryPointByBackupVault -> String
(Int -> RecoveryPointByBackupVault -> ShowS)
-> (RecoveryPointByBackupVault -> String)
-> ([RecoveryPointByBackupVault] -> ShowS)
-> Show RecoveryPointByBackupVault
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecoveryPointByBackupVault] -> ShowS
$cshowList :: [RecoveryPointByBackupVault] -> ShowS
show :: RecoveryPointByBackupVault -> String
$cshow :: RecoveryPointByBackupVault -> String
showsPrec :: Int -> RecoveryPointByBackupVault -> ShowS
$cshowsPrec :: Int -> RecoveryPointByBackupVault -> ShowS
Prelude.Show, (forall x.
 RecoveryPointByBackupVault -> Rep RecoveryPointByBackupVault x)
-> (forall x.
    Rep RecoveryPointByBackupVault x -> RecoveryPointByBackupVault)
-> Generic RecoveryPointByBackupVault
forall x.
Rep RecoveryPointByBackupVault x -> RecoveryPointByBackupVault
forall x.
RecoveryPointByBackupVault -> Rep RecoveryPointByBackupVault x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RecoveryPointByBackupVault x -> RecoveryPointByBackupVault
$cfrom :: forall x.
RecoveryPointByBackupVault -> Rep RecoveryPointByBackupVault x
Prelude.Generic)

-- |
-- Create a value of 'RecoveryPointByBackupVault' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'isEncrypted', 'recoveryPointByBackupVault_isEncrypted' - A Boolean value that is returned as @TRUE@ if the specified recovery
-- point is encrypted, or @FALSE@ if the recovery point is not encrypted.
--
-- 'status', 'recoveryPointByBackupVault_status' - A status code specifying the state of the recovery point.
--
-- 'iamRoleArn', 'recoveryPointByBackupVault_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for
-- example, @arn:aws:iam::123456789012:role\/S3Access@.
--
-- 'resourceType', 'recoveryPointByBackupVault_resourceType' - The type of Amazon Web Services resource saved as a recovery point; for
-- example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon
-- Relational Database Service (Amazon RDS) database. For Windows Volume
-- Shadow Copy Service (VSS) backups, the only supported resource type is
-- Amazon EC2.
--
-- 'createdBy', 'recoveryPointByBackupVault_createdBy' - Contains identifying information about the creation of a recovery point,
-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and
-- @BackupRuleId@ of the backup plan that is used to create it.
--
-- 'calculatedLifecycle', 'recoveryPointByBackupVault_calculatedLifecycle' - A @CalculatedLifecycle@ object containing @DeleteAt@ and
-- @MoveToColdStorageAt@ timestamps.
--
-- 'lifecycle', 'recoveryPointByBackupVault_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold
-- storage and when it expires. Backup transitions and expires backups
-- automatically according to the lifecycle that you define.
--
-- Backups transitioned to cold storage must be stored in cold storage for
-- a minimum of 90 days. Therefore, the “expire after days” setting must be
-- 90 days greater than the “transition to cold after days” setting. The
-- “transition to cold after days” setting cannot be changed after a backup
-- has been transitioned to cold.
--
-- Only Amazon EFS file system backups can be transitioned to cold storage.
--
-- 'backupVaultArn', 'recoveryPointByBackupVault_backupVaultArn' - An ARN that uniquely identifies a backup vault; for example,
-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'sourceBackupVaultArn', 'recoveryPointByBackupVault_sourceBackupVaultArn' - The backup vault where the recovery point was originally copied from. If
-- the recovery point is restored to the same account this value will be
-- @null@.
--
-- 'lastRestoreTime', 'recoveryPointByBackupVault_lastRestoreTime' - The date and time a recovery point was last restored, in Unix format and
-- Coordinated Universal Time (UTC). The value of @LastRestoreTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'resourceArn', 'recoveryPointByBackupVault_resourceArn' - An ARN that uniquely identifies a resource. The format of the ARN
-- depends on the resource type.
--
-- 'statusMessage', 'recoveryPointByBackupVault_statusMessage' - A message explaining the reason of the recovery point deletion failure.
--
-- 'recoveryPointArn', 'recoveryPointByBackupVault_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
-- for example,
-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.
--
-- 'encryptionKeyArn', 'recoveryPointByBackupVault_encryptionKeyArn' - The server-side encryption key that is used to protect your backups; for
-- example,
-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
--
-- 'backupSizeInBytes', 'recoveryPointByBackupVault_backupSizeInBytes' - The size, in bytes, of a backup.
--
-- 'creationDate', 'recoveryPointByBackupVault_creationDate' - The date and time a recovery point is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'completionDate', 'recoveryPointByBackupVault_completionDate' - The date and time a job to restore a recovery point is completed, in
-- Unix format and Coordinated Universal Time (UTC). The value of
-- @CompletionDate@ is accurate to milliseconds. For example, the value
-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'backupVaultName', 'recoveryPointByBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
newRecoveryPointByBackupVault ::
  RecoveryPointByBackupVault
newRecoveryPointByBackupVault :: RecoveryPointByBackupVault
newRecoveryPointByBackupVault =
  RecoveryPointByBackupVault' :: Maybe Bool
-> Maybe RecoveryPointStatus
-> Maybe Text
-> Maybe Text
-> Maybe RecoveryPointCreator
-> Maybe CalculatedLifecycle
-> Maybe Lifecycle
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByBackupVault
RecoveryPointByBackupVault'
    { $sel:isEncrypted:RecoveryPointByBackupVault' :: Maybe Bool
isEncrypted =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:status:RecoveryPointByBackupVault' :: Maybe RecoveryPointStatus
status = Maybe RecoveryPointStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:RecoveryPointByBackupVault' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:RecoveryPointByBackupVault' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:RecoveryPointByBackupVault' :: Maybe RecoveryPointCreator
createdBy = Maybe RecoveryPointCreator
forall a. Maybe a
Prelude.Nothing,
      $sel:calculatedLifecycle:RecoveryPointByBackupVault' :: Maybe CalculatedLifecycle
calculatedLifecycle = Maybe CalculatedLifecycle
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycle:RecoveryPointByBackupVault' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultArn:RecoveryPointByBackupVault' :: Maybe Text
backupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceBackupVaultArn:RecoveryPointByBackupVault' :: Maybe Text
sourceBackupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRestoreTime:RecoveryPointByBackupVault' :: Maybe POSIX
lastRestoreTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:RecoveryPointByBackupVault' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:RecoveryPointByBackupVault' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryPointArn:RecoveryPointByBackupVault' :: Maybe Text
recoveryPointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKeyArn:RecoveryPointByBackupVault' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupSizeInBytes:RecoveryPointByBackupVault' :: Maybe Integer
backupSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:RecoveryPointByBackupVault' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:completionDate:RecoveryPointByBackupVault' :: Maybe POSIX
completionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:RecoveryPointByBackupVault' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A Boolean value that is returned as @TRUE@ if the specified recovery
-- point is encrypted, or @FALSE@ if the recovery point is not encrypted.
recoveryPointByBackupVault_isEncrypted :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Bool)
recoveryPointByBackupVault_isEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_isEncrypted = (RecoveryPointByBackupVault -> Maybe Bool)
-> (RecoveryPointByBackupVault
    -> Maybe Bool -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Bool
isEncrypted :: Maybe Bool
$sel:isEncrypted:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Bool
isEncrypted} -> Maybe Bool
isEncrypted) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Bool
a -> RecoveryPointByBackupVault
s {$sel:isEncrypted:RecoveryPointByBackupVault' :: Maybe Bool
isEncrypted = Maybe Bool
a} :: RecoveryPointByBackupVault)

-- | A status code specifying the state of the recovery point.
recoveryPointByBackupVault_status :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe RecoveryPointStatus)
recoveryPointByBackupVault_status :: (Maybe RecoveryPointStatus -> f (Maybe RecoveryPointStatus))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_status = (RecoveryPointByBackupVault -> Maybe RecoveryPointStatus)
-> (RecoveryPointByBackupVault
    -> Maybe RecoveryPointStatus -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe RecoveryPointStatus)
     (Maybe RecoveryPointStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe RecoveryPointStatus
status :: Maybe RecoveryPointStatus
$sel:status:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe RecoveryPointStatus
status} -> Maybe RecoveryPointStatus
status) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe RecoveryPointStatus
a -> RecoveryPointByBackupVault
s {$sel:status:RecoveryPointByBackupVault' :: Maybe RecoveryPointStatus
status = Maybe RecoveryPointStatus
a} :: RecoveryPointByBackupVault)

-- | Specifies the IAM role ARN used to create the target recovery point; for
-- example, @arn:aws:iam::123456789012:role\/S3Access@.
recoveryPointByBackupVault_iamRoleArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_iamRoleArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_iamRoleArn = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:iamRoleArn:RecoveryPointByBackupVault' :: Maybe Text
iamRoleArn = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | The type of Amazon Web Services resource saved as a recovery point; for
-- example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon
-- Relational Database Service (Amazon RDS) database. For Windows Volume
-- Shadow Copy Service (VSS) backups, the only supported resource type is
-- Amazon EC2.
recoveryPointByBackupVault_resourceType :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_resourceType :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_resourceType = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:resourceType:RecoveryPointByBackupVault' :: Maybe Text
resourceType = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | Contains identifying information about the creation of a recovery point,
-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and
-- @BackupRuleId@ of the backup plan that is used to create it.
recoveryPointByBackupVault_createdBy :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe RecoveryPointCreator)
recoveryPointByBackupVault_createdBy :: (Maybe RecoveryPointCreator -> f (Maybe RecoveryPointCreator))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_createdBy = (RecoveryPointByBackupVault -> Maybe RecoveryPointCreator)
-> (RecoveryPointByBackupVault
    -> Maybe RecoveryPointCreator -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe RecoveryPointCreator)
     (Maybe RecoveryPointCreator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe RecoveryPointCreator
createdBy :: Maybe RecoveryPointCreator
$sel:createdBy:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe RecoveryPointCreator
createdBy} -> Maybe RecoveryPointCreator
createdBy) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe RecoveryPointCreator
a -> RecoveryPointByBackupVault
s {$sel:createdBy:RecoveryPointByBackupVault' :: Maybe RecoveryPointCreator
createdBy = Maybe RecoveryPointCreator
a} :: RecoveryPointByBackupVault)

-- | A @CalculatedLifecycle@ object containing @DeleteAt@ and
-- @MoveToColdStorageAt@ timestamps.
recoveryPointByBackupVault_calculatedLifecycle :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe CalculatedLifecycle)
recoveryPointByBackupVault_calculatedLifecycle :: (Maybe CalculatedLifecycle -> f (Maybe CalculatedLifecycle))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_calculatedLifecycle = (RecoveryPointByBackupVault -> Maybe CalculatedLifecycle)
-> (RecoveryPointByBackupVault
    -> Maybe CalculatedLifecycle -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe CalculatedLifecycle)
     (Maybe CalculatedLifecycle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe CalculatedLifecycle
calculatedLifecycle :: Maybe CalculatedLifecycle
$sel:calculatedLifecycle:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe CalculatedLifecycle
calculatedLifecycle} -> Maybe CalculatedLifecycle
calculatedLifecycle) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe CalculatedLifecycle
a -> RecoveryPointByBackupVault
s {$sel:calculatedLifecycle:RecoveryPointByBackupVault' :: Maybe CalculatedLifecycle
calculatedLifecycle = Maybe CalculatedLifecycle
a} :: RecoveryPointByBackupVault)

-- | The lifecycle defines when a protected resource is transitioned to cold
-- storage and when it expires. Backup transitions and expires backups
-- automatically according to the lifecycle that you define.
--
-- Backups transitioned to cold storage must be stored in cold storage for
-- a minimum of 90 days. Therefore, the “expire after days” setting must be
-- 90 days greater than the “transition to cold after days” setting. The
-- “transition to cold after days” setting cannot be changed after a backup
-- has been transitioned to cold.
--
-- Only Amazon EFS file system backups can be transitioned to cold storage.
recoveryPointByBackupVault_lifecycle :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Lifecycle)
recoveryPointByBackupVault_lifecycle :: (Maybe Lifecycle -> f (Maybe Lifecycle))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_lifecycle = (RecoveryPointByBackupVault -> Maybe Lifecycle)
-> (RecoveryPointByBackupVault
    -> Maybe Lifecycle -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Lifecycle)
     (Maybe Lifecycle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Lifecycle
lifecycle :: Maybe Lifecycle
$sel:lifecycle:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Lifecycle
lifecycle} -> Maybe Lifecycle
lifecycle) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Lifecycle
a -> RecoveryPointByBackupVault
s {$sel:lifecycle:RecoveryPointByBackupVault' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
a} :: RecoveryPointByBackupVault)

-- | An ARN that uniquely identifies a backup vault; for example,
-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
recoveryPointByBackupVault_backupVaultArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_backupVaultArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_backupVaultArn = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
backupVaultArn :: Maybe Text
$sel:backupVaultArn:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
backupVaultArn} -> Maybe Text
backupVaultArn) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:backupVaultArn:RecoveryPointByBackupVault' :: Maybe Text
backupVaultArn = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | The backup vault where the recovery point was originally copied from. If
-- the recovery point is restored to the same account this value will be
-- @null@.
recoveryPointByBackupVault_sourceBackupVaultArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_sourceBackupVaultArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_sourceBackupVaultArn = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
sourceBackupVaultArn :: Maybe Text
$sel:sourceBackupVaultArn:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
sourceBackupVaultArn} -> Maybe Text
sourceBackupVaultArn) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:sourceBackupVaultArn:RecoveryPointByBackupVault' :: Maybe Text
sourceBackupVaultArn = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | The date and time a recovery point was last restored, in Unix format and
-- Coordinated Universal Time (UTC). The value of @LastRestoreTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
recoveryPointByBackupVault_lastRestoreTime :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.UTCTime)
recoveryPointByBackupVault_lastRestoreTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_lastRestoreTime = (RecoveryPointByBackupVault -> Maybe POSIX)
-> (RecoveryPointByBackupVault
    -> Maybe POSIX -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe POSIX
lastRestoreTime :: Maybe POSIX
$sel:lastRestoreTime:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe POSIX
lastRestoreTime} -> Maybe POSIX
lastRestoreTime) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe POSIX
a -> RecoveryPointByBackupVault
s {$sel:lastRestoreTime:RecoveryPointByBackupVault' :: Maybe POSIX
lastRestoreTime = Maybe POSIX
a} :: RecoveryPointByBackupVault) ((Maybe POSIX -> f (Maybe POSIX))
 -> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByBackupVault
-> f RecoveryPointByBackupVault
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An ARN that uniquely identifies a resource. The format of the ARN
-- depends on the resource type.
recoveryPointByBackupVault_resourceArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_resourceArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_resourceArn = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:resourceArn:RecoveryPointByBackupVault' :: Maybe Text
resourceArn = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | A message explaining the reason of the recovery point deletion failure.
recoveryPointByBackupVault_statusMessage :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_statusMessage :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_statusMessage = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:statusMessage:RecoveryPointByBackupVault' :: Maybe Text
statusMessage = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
-- for example,
-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.
recoveryPointByBackupVault_recoveryPointArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_recoveryPointArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_recoveryPointArn = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
recoveryPointArn :: Maybe Text
$sel:recoveryPointArn:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
recoveryPointArn} -> Maybe Text
recoveryPointArn) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:recoveryPointArn:RecoveryPointByBackupVault' :: Maybe Text
recoveryPointArn = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | The server-side encryption key that is used to protect your backups; for
-- example,
-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
recoveryPointByBackupVault_encryptionKeyArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_encryptionKeyArn :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_encryptionKeyArn = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
encryptionKeyArn :: Maybe Text
$sel:encryptionKeyArn:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
encryptionKeyArn} -> Maybe Text
encryptionKeyArn) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:encryptionKeyArn:RecoveryPointByBackupVault' :: Maybe Text
encryptionKeyArn = Maybe Text
a} :: RecoveryPointByBackupVault)

-- | The size, in bytes, of a backup.
recoveryPointByBackupVault_backupSizeInBytes :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Integer)
recoveryPointByBackupVault_backupSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_backupSizeInBytes = (RecoveryPointByBackupVault -> Maybe Integer)
-> (RecoveryPointByBackupVault
    -> Maybe Integer -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Integer
backupSizeInBytes :: Maybe Integer
$sel:backupSizeInBytes:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Integer
backupSizeInBytes} -> Maybe Integer
backupSizeInBytes) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Integer
a -> RecoveryPointByBackupVault
s {$sel:backupSizeInBytes:RecoveryPointByBackupVault' :: Maybe Integer
backupSizeInBytes = Maybe Integer
a} :: RecoveryPointByBackupVault)

-- | The date and time a recovery point is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
recoveryPointByBackupVault_creationDate :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.UTCTime)
recoveryPointByBackupVault_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_creationDate = (RecoveryPointByBackupVault -> Maybe POSIX)
-> (RecoveryPointByBackupVault
    -> Maybe POSIX -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe POSIX
a -> RecoveryPointByBackupVault
s {$sel:creationDate:RecoveryPointByBackupVault' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: RecoveryPointByBackupVault) ((Maybe POSIX -> f (Maybe POSIX))
 -> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByBackupVault
-> f RecoveryPointByBackupVault
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The date and time a job to restore a recovery point is completed, in
-- Unix format and Coordinated Universal Time (UTC). The value of
-- @CompletionDate@ is accurate to milliseconds. For example, the value
-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
recoveryPointByBackupVault_completionDate :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.UTCTime)
recoveryPointByBackupVault_completionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_completionDate = (RecoveryPointByBackupVault -> Maybe POSIX)
-> (RecoveryPointByBackupVault
    -> Maybe POSIX -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe POSIX
completionDate :: Maybe POSIX
$sel:completionDate:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe POSIX
completionDate} -> Maybe POSIX
completionDate) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe POSIX
a -> RecoveryPointByBackupVault
s {$sel:completionDate:RecoveryPointByBackupVault' :: Maybe POSIX
completionDate = Maybe POSIX
a} :: RecoveryPointByBackupVault) ((Maybe POSIX -> f (Maybe POSIX))
 -> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RecoveryPointByBackupVault
-> f RecoveryPointByBackupVault
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of a logical container where backups are stored. Backup vaults
-- are identified by names that are unique to the account used to create
-- them and the Amazon Web Services Region where they are created. They
-- consist of lowercase letters, numbers, and hyphens.
recoveryPointByBackupVault_backupVaultName :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)
recoveryPointByBackupVault_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> RecoveryPointByBackupVault -> f RecoveryPointByBackupVault
recoveryPointByBackupVault_backupVaultName = (RecoveryPointByBackupVault -> Maybe Text)
-> (RecoveryPointByBackupVault
    -> Maybe Text -> RecoveryPointByBackupVault)
-> Lens
     RecoveryPointByBackupVault
     RecoveryPointByBackupVault
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryPointByBackupVault' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:RecoveryPointByBackupVault' :: RecoveryPointByBackupVault -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: RecoveryPointByBackupVault
s@RecoveryPointByBackupVault' {} Maybe Text
a -> RecoveryPointByBackupVault
s {$sel:backupVaultName:RecoveryPointByBackupVault' :: Maybe Text
backupVaultName = Maybe Text
a} :: RecoveryPointByBackupVault)

instance Core.FromJSON RecoveryPointByBackupVault where
  parseJSON :: Value -> Parser RecoveryPointByBackupVault
parseJSON =
    String
-> (Object -> Parser RecoveryPointByBackupVault)
-> Value
-> Parser RecoveryPointByBackupVault
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RecoveryPointByBackupVault"
      ( \Object
x ->
          Maybe Bool
-> Maybe RecoveryPointStatus
-> Maybe Text
-> Maybe Text
-> Maybe RecoveryPointCreator
-> Maybe CalculatedLifecycle
-> Maybe Lifecycle
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> RecoveryPointByBackupVault
RecoveryPointByBackupVault'
            (Maybe Bool
 -> Maybe RecoveryPointStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe RecoveryPointCreator
 -> Maybe CalculatedLifecycle
 -> Maybe Lifecycle
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> RecoveryPointByBackupVault)
-> Parser (Maybe Bool)
-> Parser
     (Maybe RecoveryPointStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Functor 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
"IsEncrypted")
            Parser
  (Maybe RecoveryPointStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe RecoveryPointStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RecoveryPointStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"IamRoleArn")
            Parser
  (Maybe Text
   -> Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"ResourceType")
            Parser
  (Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe RecoveryPointCreator)
-> Parser
     (Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RecoveryPointCreator)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
            Parser
  (Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe CalculatedLifecycle)
-> Parser
     (Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CalculatedLifecycle)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CalculatedLifecycle")
            Parser
  (Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Lifecycle)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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 Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"BackupVaultArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"SourceBackupVaultArn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastRestoreTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"ResourceArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"StatusMessage")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"RecoveryPointArn")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> RecoveryPointByBackupVault)
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
"EncryptionKeyArn")
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> RecoveryPointByBackupVault)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX -> Maybe Text -> RecoveryPointByBackupVault)
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
"BackupSizeInBytes")
            Parser
  (Maybe POSIX
   -> Maybe POSIX -> Maybe Text -> RecoveryPointByBackupVault)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe Text -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
            Parser (Maybe POSIX -> Maybe Text -> RecoveryPointByBackupVault)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> RecoveryPointByBackupVault)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletionDate")
            Parser (Maybe Text -> RecoveryPointByBackupVault)
-> Parser (Maybe Text) -> Parser RecoveryPointByBackupVault
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
"BackupVaultName")
      )

instance Prelude.Hashable RecoveryPointByBackupVault

instance Prelude.NFData RecoveryPointByBackupVault