{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeRecoveryPoint
-- 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)
--
-- Returns metadata associated with a recovery point, including ID, status,
-- encryption, and lifecycle.
module Amazonka.Backup.DescribeRecoveryPoint
  ( -- * Creating a Request
    DescribeRecoveryPoint (..),
    newDescribeRecoveryPoint,

    -- * Request Lenses
    describeRecoveryPoint_backupVaultName,
    describeRecoveryPoint_recoveryPointArn,

    -- * Destructuring the Response
    DescribeRecoveryPointResponse (..),
    newDescribeRecoveryPointResponse,

    -- * Response Lenses
    describeRecoveryPointResponse_isEncrypted,
    describeRecoveryPointResponse_status,
    describeRecoveryPointResponse_iamRoleArn,
    describeRecoveryPointResponse_resourceType,
    describeRecoveryPointResponse_createdBy,
    describeRecoveryPointResponse_calculatedLifecycle,
    describeRecoveryPointResponse_lifecycle,
    describeRecoveryPointResponse_backupVaultArn,
    describeRecoveryPointResponse_sourceBackupVaultArn,
    describeRecoveryPointResponse_lastRestoreTime,
    describeRecoveryPointResponse_resourceArn,
    describeRecoveryPointResponse_statusMessage,
    describeRecoveryPointResponse_storageClass,
    describeRecoveryPointResponse_recoveryPointArn,
    describeRecoveryPointResponse_encryptionKeyArn,
    describeRecoveryPointResponse_backupSizeInBytes,
    describeRecoveryPointResponse_creationDate,
    describeRecoveryPointResponse_completionDate,
    describeRecoveryPointResponse_backupVaultName,
    describeRecoveryPointResponse_httpStatus,
  )
where

import Amazonka.Backup.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeRecoveryPoint' smart constructor.
data DescribeRecoveryPoint = DescribeRecoveryPoint'
  { -- | 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.
    DescribeRecoveryPoint -> Text
backupVaultName :: 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@.
    DescribeRecoveryPoint -> Text
recoveryPointArn :: Prelude.Text
  }
  deriving (DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool
(DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool)
-> (DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool)
-> Eq DescribeRecoveryPoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool
$c/= :: DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool
== :: DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool
$c== :: DescribeRecoveryPoint -> DescribeRecoveryPoint -> Bool
Prelude.Eq, ReadPrec [DescribeRecoveryPoint]
ReadPrec DescribeRecoveryPoint
Int -> ReadS DescribeRecoveryPoint
ReadS [DescribeRecoveryPoint]
(Int -> ReadS DescribeRecoveryPoint)
-> ReadS [DescribeRecoveryPoint]
-> ReadPrec DescribeRecoveryPoint
-> ReadPrec [DescribeRecoveryPoint]
-> Read DescribeRecoveryPoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRecoveryPoint]
$creadListPrec :: ReadPrec [DescribeRecoveryPoint]
readPrec :: ReadPrec DescribeRecoveryPoint
$creadPrec :: ReadPrec DescribeRecoveryPoint
readList :: ReadS [DescribeRecoveryPoint]
$creadList :: ReadS [DescribeRecoveryPoint]
readsPrec :: Int -> ReadS DescribeRecoveryPoint
$creadsPrec :: Int -> ReadS DescribeRecoveryPoint
Prelude.Read, Int -> DescribeRecoveryPoint -> ShowS
[DescribeRecoveryPoint] -> ShowS
DescribeRecoveryPoint -> String
(Int -> DescribeRecoveryPoint -> ShowS)
-> (DescribeRecoveryPoint -> String)
-> ([DescribeRecoveryPoint] -> ShowS)
-> Show DescribeRecoveryPoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRecoveryPoint] -> ShowS
$cshowList :: [DescribeRecoveryPoint] -> ShowS
show :: DescribeRecoveryPoint -> String
$cshow :: DescribeRecoveryPoint -> String
showsPrec :: Int -> DescribeRecoveryPoint -> ShowS
$cshowsPrec :: Int -> DescribeRecoveryPoint -> ShowS
Prelude.Show, (forall x. DescribeRecoveryPoint -> Rep DescribeRecoveryPoint x)
-> (forall x. Rep DescribeRecoveryPoint x -> DescribeRecoveryPoint)
-> Generic DescribeRecoveryPoint
forall x. Rep DescribeRecoveryPoint x -> DescribeRecoveryPoint
forall x. DescribeRecoveryPoint -> Rep DescribeRecoveryPoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRecoveryPoint x -> DescribeRecoveryPoint
$cfrom :: forall x. DescribeRecoveryPoint -> Rep DescribeRecoveryPoint x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRecoveryPoint' 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:
--
-- 'backupVaultName', 'describeRecoveryPoint_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.
--
-- 'recoveryPointArn', 'describeRecoveryPoint_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@.
newDescribeRecoveryPoint ::
  -- | 'backupVaultName'
  Prelude.Text ->
  -- | 'recoveryPointArn'
  Prelude.Text ->
  DescribeRecoveryPoint
newDescribeRecoveryPoint :: Text -> Text -> DescribeRecoveryPoint
newDescribeRecoveryPoint
  Text
pBackupVaultName_
  Text
pRecoveryPointArn_ =
    DescribeRecoveryPoint' :: Text -> Text -> DescribeRecoveryPoint
DescribeRecoveryPoint'
      { $sel:backupVaultName:DescribeRecoveryPoint' :: Text
backupVaultName =
          Text
pBackupVaultName_,
        $sel:recoveryPointArn:DescribeRecoveryPoint' :: Text
recoveryPointArn = Text
pRecoveryPointArn_
      }

-- | 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.
describeRecoveryPoint_backupVaultName :: Lens.Lens' DescribeRecoveryPoint Prelude.Text
describeRecoveryPoint_backupVaultName :: (Text -> f Text)
-> DescribeRecoveryPoint -> f DescribeRecoveryPoint
describeRecoveryPoint_backupVaultName = (DescribeRecoveryPoint -> Text)
-> (DescribeRecoveryPoint -> Text -> DescribeRecoveryPoint)
-> Lens DescribeRecoveryPoint DescribeRecoveryPoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPoint' {Text
backupVaultName :: Text
$sel:backupVaultName:DescribeRecoveryPoint' :: DescribeRecoveryPoint -> Text
backupVaultName} -> Text
backupVaultName) (\s :: DescribeRecoveryPoint
s@DescribeRecoveryPoint' {} Text
a -> DescribeRecoveryPoint
s {$sel:backupVaultName:DescribeRecoveryPoint' :: Text
backupVaultName = Text
a} :: DescribeRecoveryPoint)

-- | 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@.
describeRecoveryPoint_recoveryPointArn :: Lens.Lens' DescribeRecoveryPoint Prelude.Text
describeRecoveryPoint_recoveryPointArn :: (Text -> f Text)
-> DescribeRecoveryPoint -> f DescribeRecoveryPoint
describeRecoveryPoint_recoveryPointArn = (DescribeRecoveryPoint -> Text)
-> (DescribeRecoveryPoint -> Text -> DescribeRecoveryPoint)
-> Lens DescribeRecoveryPoint DescribeRecoveryPoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPoint' {Text
recoveryPointArn :: Text
$sel:recoveryPointArn:DescribeRecoveryPoint' :: DescribeRecoveryPoint -> Text
recoveryPointArn} -> Text
recoveryPointArn) (\s :: DescribeRecoveryPoint
s@DescribeRecoveryPoint' {} Text
a -> DescribeRecoveryPoint
s {$sel:recoveryPointArn:DescribeRecoveryPoint' :: Text
recoveryPointArn = Text
a} :: DescribeRecoveryPoint)

instance Core.AWSRequest DescribeRecoveryPoint where
  type
    AWSResponse DescribeRecoveryPoint =
      DescribeRecoveryPointResponse
  request :: DescribeRecoveryPoint -> Request DescribeRecoveryPoint
request = Service -> DescribeRecoveryPoint -> Request DescribeRecoveryPoint
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeRecoveryPoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRecoveryPoint)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeRecoveryPoint))
-> Logger
-> Service
-> Proxy DescribeRecoveryPoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRecoveryPoint)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h 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 StorageClass
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeRecoveryPointResponse
DescribeRecoveryPointResponse'
            (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 StorageClass
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> DescribeRecoveryPointResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe RecoveryPointStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IsEncrypted")
            Either
  String
  (Maybe RecoveryPointStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe RecoveryPointStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RecoveryPointStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IamRoleArn")
            Either
  String
  (Maybe Text
   -> Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RecoveryPointCreator
      -> Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceType")
            Either
  String
  (Maybe RecoveryPointCreator
   -> Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe RecoveryPointCreator)
-> Either
     String
     (Maybe CalculatedLifecycle
      -> Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RecoveryPointCreator)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedBy")
            Either
  String
  (Maybe CalculatedLifecycle
   -> Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe CalculatedLifecycle)
-> Either
     String
     (Maybe Lifecycle
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe CalculatedLifecycle)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CalculatedLifecycle")
            Either
  String
  (Maybe Lifecycle
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Lifecycle)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Lifecycle)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Lifecycle")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupVaultArn")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceBackupVaultArn")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastRestoreTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceArn")
            Either
  String
  (Maybe Text
   -> Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe StorageClass
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StatusMessage")
            Either
  String
  (Maybe StorageClass
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe StorageClass)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe StorageClass)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StorageClass")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RecoveryPointArn")
            Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EncryptionKeyArn")
            Either
  String
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupSizeInBytes")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeRecoveryPointResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX -> Maybe Text -> Int -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationDate")
            Either
  String
  (Maybe POSIX -> Maybe Text -> Int -> DescribeRecoveryPointResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe Text -> Int -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CompletionDate")
            Either String (Maybe Text -> Int -> DescribeRecoveryPointResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeRecoveryPointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupVaultName")
            Either String (Int -> DescribeRecoveryPointResponse)
-> Either String Int -> Either String DescribeRecoveryPointResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeRecoveryPoint

instance Prelude.NFData DescribeRecoveryPoint

instance Core.ToHeaders DescribeRecoveryPoint where
  toHeaders :: DescribeRecoveryPoint -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRecoveryPoint -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DescribeRecoveryPoint where
  toPath :: DescribeRecoveryPoint -> ByteString
toPath DescribeRecoveryPoint' {Text
recoveryPointArn :: Text
backupVaultName :: Text
$sel:recoveryPointArn:DescribeRecoveryPoint' :: DescribeRecoveryPoint -> Text
$sel:backupVaultName:DescribeRecoveryPoint' :: DescribeRecoveryPoint -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/backup-vaults/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
backupVaultName,
        ByteString
"/recovery-points/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
recoveryPointArn
      ]

instance Core.ToQuery DescribeRecoveryPoint where
  toQuery :: DescribeRecoveryPoint -> QueryString
toQuery = QueryString -> DescribeRecoveryPoint -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeRecoveryPointResponse' smart constructor.
data DescribeRecoveryPointResponse = DescribeRecoveryPointResponse'
  { -- | A Boolean value that is returned as @TRUE@ if the specified recovery
    -- point is encrypted, or @FALSE@ if the recovery point is not encrypted.
    DescribeRecoveryPointResponse -> Maybe Bool
isEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | A status code specifying the state of the recovery point.
    --
    -- @PARTIAL@ status indicates Backup could not create the recovery point
    -- before the backup window closed. To increase your backup plan window
    -- using the API, see
    -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html UpdateBackupPlan>.
    -- You can also increase your backup plan window using the Console by
    -- choosing and editing your backup plan.
    --
    -- @EXPIRED@ status indicates that the recovery point has exceeded its
    -- retention period, but Backup lacks permission or is otherwise unable to
    -- delete it. To manually delete these recovery points, see
    -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups Step 3: Delete the recovery points>
    -- in the /Clean up resources/ section of /Getting started/.
    DescribeRecoveryPointResponse -> 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@.
    DescribeRecoveryPointResponse -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Web Services resource to save as a recovery point;
    -- for example, an Amazon Elastic Block Store (Amazon EBS) volume or an
    -- Amazon Relational Database Service (Amazon RDS) database.
    DescribeRecoveryPointResponse -> 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 used to create it.
    DescribeRecoveryPointResponse -> Maybe RecoveryPointCreator
createdBy :: Prelude.Maybe RecoveryPointCreator,
    -- | A @CalculatedLifecycle@ object containing @DeleteAt@ and
    -- @MoveToColdStorageAt@ timestamps.
    DescribeRecoveryPointResponse -> 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 that are 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.
    DescribeRecoveryPointResponse -> 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@.
    DescribeRecoveryPointResponse -> Maybe Text
backupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies the source vault
    -- where the resource was originally backed up in; for example,
    -- @arn:aws:backup:us-east-1:123456789012:vault:BackupVault@. If the
    -- recovery is restored to the same Amazon Web Services account or Region,
    -- this value will be @null@.
    DescribeRecoveryPointResponse -> Maybe Text
sourceBackupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that 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.
    DescribeRecoveryPointResponse -> Maybe POSIX
lastRestoreTime :: Prelude.Maybe Core.POSIX,
    -- | An ARN that uniquely identifies a saved resource. The format of the ARN
    -- depends on the resource type.
    DescribeRecoveryPointResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | A status message explaining the reason for the recovery point deletion
    -- failure.
    DescribeRecoveryPointResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | Specifies the storage class of the recovery point. Valid values are
    -- @WARM@ or @COLD@.
    DescribeRecoveryPointResponse -> Maybe StorageClass
storageClass :: Prelude.Maybe StorageClass,
    -- | An ARN that uniquely identifies a recovery point; for example,
    -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.
    DescribeRecoveryPointResponse -> Maybe Text
recoveryPointArn :: Prelude.Maybe Prelude.Text,
    -- | The server-side encryption key used to protect your backups; for
    -- example,
    -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
    DescribeRecoveryPointResponse -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The size, in bytes, of a backup.
    DescribeRecoveryPointResponse -> Maybe Integer
backupSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The date and time that 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.
    DescribeRecoveryPointResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that a job to create 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.
    DescribeRecoveryPointResponse -> 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 Region where they are created. They consist of lowercase
    -- letters, numbers, and hyphens.
    DescribeRecoveryPointResponse -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeRecoveryPointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRecoveryPointResponse
-> DescribeRecoveryPointResponse -> Bool
(DescribeRecoveryPointResponse
 -> DescribeRecoveryPointResponse -> Bool)
-> (DescribeRecoveryPointResponse
    -> DescribeRecoveryPointResponse -> Bool)
-> Eq DescribeRecoveryPointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRecoveryPointResponse
-> DescribeRecoveryPointResponse -> Bool
$c/= :: DescribeRecoveryPointResponse
-> DescribeRecoveryPointResponse -> Bool
== :: DescribeRecoveryPointResponse
-> DescribeRecoveryPointResponse -> Bool
$c== :: DescribeRecoveryPointResponse
-> DescribeRecoveryPointResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRecoveryPointResponse]
ReadPrec DescribeRecoveryPointResponse
Int -> ReadS DescribeRecoveryPointResponse
ReadS [DescribeRecoveryPointResponse]
(Int -> ReadS DescribeRecoveryPointResponse)
-> ReadS [DescribeRecoveryPointResponse]
-> ReadPrec DescribeRecoveryPointResponse
-> ReadPrec [DescribeRecoveryPointResponse]
-> Read DescribeRecoveryPointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRecoveryPointResponse]
$creadListPrec :: ReadPrec [DescribeRecoveryPointResponse]
readPrec :: ReadPrec DescribeRecoveryPointResponse
$creadPrec :: ReadPrec DescribeRecoveryPointResponse
readList :: ReadS [DescribeRecoveryPointResponse]
$creadList :: ReadS [DescribeRecoveryPointResponse]
readsPrec :: Int -> ReadS DescribeRecoveryPointResponse
$creadsPrec :: Int -> ReadS DescribeRecoveryPointResponse
Prelude.Read, Int -> DescribeRecoveryPointResponse -> ShowS
[DescribeRecoveryPointResponse] -> ShowS
DescribeRecoveryPointResponse -> String
(Int -> DescribeRecoveryPointResponse -> ShowS)
-> (DescribeRecoveryPointResponse -> String)
-> ([DescribeRecoveryPointResponse] -> ShowS)
-> Show DescribeRecoveryPointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRecoveryPointResponse] -> ShowS
$cshowList :: [DescribeRecoveryPointResponse] -> ShowS
show :: DescribeRecoveryPointResponse -> String
$cshow :: DescribeRecoveryPointResponse -> String
showsPrec :: Int -> DescribeRecoveryPointResponse -> ShowS
$cshowsPrec :: Int -> DescribeRecoveryPointResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRecoveryPointResponse
 -> Rep DescribeRecoveryPointResponse x)
-> (forall x.
    Rep DescribeRecoveryPointResponse x
    -> DescribeRecoveryPointResponse)
-> Generic DescribeRecoveryPointResponse
forall x.
Rep DescribeRecoveryPointResponse x
-> DescribeRecoveryPointResponse
forall x.
DescribeRecoveryPointResponse
-> Rep DescribeRecoveryPointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRecoveryPointResponse x
-> DescribeRecoveryPointResponse
$cfrom :: forall x.
DescribeRecoveryPointResponse
-> Rep DescribeRecoveryPointResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRecoveryPointResponse' 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', 'describeRecoveryPointResponse_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', 'describeRecoveryPointResponse_status' - A status code specifying the state of the recovery point.
--
-- @PARTIAL@ status indicates Backup could not create the recovery point
-- before the backup window closed. To increase your backup plan window
-- using the API, see
-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html UpdateBackupPlan>.
-- You can also increase your backup plan window using the Console by
-- choosing and editing your backup plan.
--
-- @EXPIRED@ status indicates that the recovery point has exceeded its
-- retention period, but Backup lacks permission or is otherwise unable to
-- delete it. To manually delete these recovery points, see
-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups Step 3: Delete the recovery points>
-- in the /Clean up resources/ section of /Getting started/.
--
-- 'iamRoleArn', 'describeRecoveryPointResponse_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for
-- example, @arn:aws:iam::123456789012:role\/S3Access@.
--
-- 'resourceType', 'describeRecoveryPointResponse_resourceType' - The type of Amazon Web Services resource to save as a recovery point;
-- for example, an Amazon Elastic Block Store (Amazon EBS) volume or an
-- Amazon Relational Database Service (Amazon RDS) database.
--
-- 'createdBy', 'describeRecoveryPointResponse_createdBy' - Contains identifying information about the creation of a recovery point,
-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and
-- @BackupRuleId@ of the backup plan used to create it.
--
-- 'calculatedLifecycle', 'describeRecoveryPointResponse_calculatedLifecycle' - A @CalculatedLifecycle@ object containing @DeleteAt@ and
-- @MoveToColdStorageAt@ timestamps.
--
-- 'lifecycle', 'describeRecoveryPointResponse_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 that are 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', 'describeRecoveryPointResponse_backupVaultArn' - An ARN that uniquely identifies a backup vault; for example,
-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'sourceBackupVaultArn', 'describeRecoveryPointResponse_sourceBackupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies the source vault
-- where the resource was originally backed up in; for example,
-- @arn:aws:backup:us-east-1:123456789012:vault:BackupVault@. If the
-- recovery is restored to the same Amazon Web Services account or Region,
-- this value will be @null@.
--
-- 'lastRestoreTime', 'describeRecoveryPointResponse_lastRestoreTime' - The date and time that 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', 'describeRecoveryPointResponse_resourceArn' - An ARN that uniquely identifies a saved resource. The format of the ARN
-- depends on the resource type.
--
-- 'statusMessage', 'describeRecoveryPointResponse_statusMessage' - A status message explaining the reason for the recovery point deletion
-- failure.
--
-- 'storageClass', 'describeRecoveryPointResponse_storageClass' - Specifies the storage class of the recovery point. Valid values are
-- @WARM@ or @COLD@.
--
-- 'recoveryPointArn', 'describeRecoveryPointResponse_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,
-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.
--
-- 'encryptionKeyArn', 'describeRecoveryPointResponse_encryptionKeyArn' - The server-side encryption key used to protect your backups; for
-- example,
-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.
--
-- 'backupSizeInBytes', 'describeRecoveryPointResponse_backupSizeInBytes' - The size, in bytes, of a backup.
--
-- 'creationDate', 'describeRecoveryPointResponse_creationDate' - The date and time that 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', 'describeRecoveryPointResponse_completionDate' - The date and time that a job to create 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', 'describeRecoveryPointResponse_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 Region where they are created. They consist of lowercase
-- letters, numbers, and hyphens.
--
-- 'httpStatus', 'describeRecoveryPointResponse_httpStatus' - The response's http status code.
newDescribeRecoveryPointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRecoveryPointResponse
newDescribeRecoveryPointResponse :: Int -> DescribeRecoveryPointResponse
newDescribeRecoveryPointResponse Int
pHttpStatus_ =
  DescribeRecoveryPointResponse' :: 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 StorageClass
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeRecoveryPointResponse
DescribeRecoveryPointResponse'
    { $sel:isEncrypted:DescribeRecoveryPointResponse' :: Maybe Bool
isEncrypted =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeRecoveryPointResponse' :: Maybe RecoveryPointStatus
status = Maybe RecoveryPointStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:DescribeRecoveryPointResponse' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:DescribeRecoveryPointResponse' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeRecoveryPointResponse' :: Maybe RecoveryPointCreator
createdBy = Maybe RecoveryPointCreator
forall a. Maybe a
Prelude.Nothing,
      $sel:calculatedLifecycle:DescribeRecoveryPointResponse' :: Maybe CalculatedLifecycle
calculatedLifecycle = Maybe CalculatedLifecycle
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycle:DescribeRecoveryPointResponse' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultArn:DescribeRecoveryPointResponse' :: Maybe Text
backupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceBackupVaultArn:DescribeRecoveryPointResponse' :: Maybe Text
sourceBackupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRestoreTime:DescribeRecoveryPointResponse' :: Maybe POSIX
lastRestoreTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:DescribeRecoveryPointResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:DescribeRecoveryPointResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageClass:DescribeRecoveryPointResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryPointArn:DescribeRecoveryPointResponse' :: Maybe Text
recoveryPointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKeyArn:DescribeRecoveryPointResponse' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupSizeInBytes:DescribeRecoveryPointResponse' :: Maybe Integer
backupSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeRecoveryPointResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:completionDate:DescribeRecoveryPointResponse' :: Maybe POSIX
completionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:DescribeRecoveryPointResponse' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRecoveryPointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A status code specifying the state of the recovery point.
--
-- @PARTIAL@ status indicates Backup could not create the recovery point
-- before the backup window closed. To increase your backup plan window
-- using the API, see
-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html UpdateBackupPlan>.
-- You can also increase your backup plan window using the Console by
-- choosing and editing your backup plan.
--
-- @EXPIRED@ status indicates that the recovery point has exceeded its
-- retention period, but Backup lacks permission or is otherwise unable to
-- delete it. To manually delete these recovery points, see
-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups Step 3: Delete the recovery points>
-- in the /Clean up resources/ section of /Getting started/.
describeRecoveryPointResponse_status :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe RecoveryPointStatus)
describeRecoveryPointResponse_status :: (Maybe RecoveryPointStatus -> f (Maybe RecoveryPointStatus))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_status = (DescribeRecoveryPointResponse -> Maybe RecoveryPointStatus)
-> (DescribeRecoveryPointResponse
    -> Maybe RecoveryPointStatus -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe RecoveryPointStatus)
     (Maybe RecoveryPointStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe RecoveryPointStatus
status :: Maybe RecoveryPointStatus
$sel:status:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe RecoveryPointStatus
status} -> Maybe RecoveryPointStatus
status) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe RecoveryPointStatus
a -> DescribeRecoveryPointResponse
s {$sel:status:DescribeRecoveryPointResponse' :: Maybe RecoveryPointStatus
status = Maybe RecoveryPointStatus
a} :: DescribeRecoveryPointResponse)

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

-- | The type of Amazon Web Services resource to save as a recovery point;
-- for example, an Amazon Elastic Block Store (Amazon EBS) volume or an
-- Amazon Relational Database Service (Amazon RDS) database.
describeRecoveryPointResponse_resourceType :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)
describeRecoveryPointResponse_resourceType :: (Maybe Text -> f (Maybe Text))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_resourceType = (DescribeRecoveryPointResponse -> Maybe Text)
-> (DescribeRecoveryPointResponse
    -> Maybe Text -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe Text
a -> DescribeRecoveryPointResponse
s {$sel:resourceType:DescribeRecoveryPointResponse' :: Maybe Text
resourceType = Maybe Text
a} :: DescribeRecoveryPointResponse)

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

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

-- | 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 that are 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.
describeRecoveryPointResponse_lifecycle :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Lifecycle)
describeRecoveryPointResponse_lifecycle :: (Maybe Lifecycle -> f (Maybe Lifecycle))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_lifecycle = (DescribeRecoveryPointResponse -> Maybe Lifecycle)
-> (DescribeRecoveryPointResponse
    -> Maybe Lifecycle -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe Lifecycle)
     (Maybe Lifecycle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe Lifecycle
lifecycle :: Maybe Lifecycle
$sel:lifecycle:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe Lifecycle
lifecycle} -> Maybe Lifecycle
lifecycle) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe Lifecycle
a -> DescribeRecoveryPointResponse
s {$sel:lifecycle:DescribeRecoveryPointResponse' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
a} :: DescribeRecoveryPointResponse)

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

-- | An Amazon Resource Name (ARN) that uniquely identifies the source vault
-- where the resource was originally backed up in; for example,
-- @arn:aws:backup:us-east-1:123456789012:vault:BackupVault@. If the
-- recovery is restored to the same Amazon Web Services account or Region,
-- this value will be @null@.
describeRecoveryPointResponse_sourceBackupVaultArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)
describeRecoveryPointResponse_sourceBackupVaultArn :: (Maybe Text -> f (Maybe Text))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_sourceBackupVaultArn = (DescribeRecoveryPointResponse -> Maybe Text)
-> (DescribeRecoveryPointResponse
    -> Maybe Text -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe Text
sourceBackupVaultArn :: Maybe Text
$sel:sourceBackupVaultArn:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe Text
sourceBackupVaultArn} -> Maybe Text
sourceBackupVaultArn) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe Text
a -> DescribeRecoveryPointResponse
s {$sel:sourceBackupVaultArn:DescribeRecoveryPointResponse' :: Maybe Text
sourceBackupVaultArn = Maybe Text
a} :: DescribeRecoveryPointResponse)

-- | The date and time that 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.
describeRecoveryPointResponse_lastRestoreTime :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.UTCTime)
describeRecoveryPointResponse_lastRestoreTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_lastRestoreTime = (DescribeRecoveryPointResponse -> Maybe POSIX)
-> (DescribeRecoveryPointResponse
    -> Maybe POSIX -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe POSIX
lastRestoreTime :: Maybe POSIX
$sel:lastRestoreTime:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe POSIX
lastRestoreTime} -> Maybe POSIX
lastRestoreTime) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe POSIX
a -> DescribeRecoveryPointResponse
s {$sel:lastRestoreTime:DescribeRecoveryPointResponse' :: Maybe POSIX
lastRestoreTime = Maybe POSIX
a} :: DescribeRecoveryPointResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRecoveryPointResponse
 -> f DescribeRecoveryPointResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRecoveryPointResponse
-> f DescribeRecoveryPointResponse
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 saved resource. The format of the ARN
-- depends on the resource type.
describeRecoveryPointResponse_resourceArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)
describeRecoveryPointResponse_resourceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_resourceArn = (DescribeRecoveryPointResponse -> Maybe Text)
-> (DescribeRecoveryPointResponse
    -> Maybe Text -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe Text
a -> DescribeRecoveryPointResponse
s {$sel:resourceArn:DescribeRecoveryPointResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: DescribeRecoveryPointResponse)

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

-- | Specifies the storage class of the recovery point. Valid values are
-- @WARM@ or @COLD@.
describeRecoveryPointResponse_storageClass :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe StorageClass)
describeRecoveryPointResponse_storageClass :: (Maybe StorageClass -> f (Maybe StorageClass))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_storageClass = (DescribeRecoveryPointResponse -> Maybe StorageClass)
-> (DescribeRecoveryPointResponse
    -> Maybe StorageClass -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe StorageClass)
     (Maybe StorageClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe StorageClass
storageClass :: Maybe StorageClass
$sel:storageClass:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe StorageClass
storageClass} -> Maybe StorageClass
storageClass) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe StorageClass
a -> DescribeRecoveryPointResponse
s {$sel:storageClass:DescribeRecoveryPointResponse' :: Maybe StorageClass
storageClass = Maybe StorageClass
a} :: DescribeRecoveryPointResponse)

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

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

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

-- | The date and time that 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.
describeRecoveryPointResponse_creationDate :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.UTCTime)
describeRecoveryPointResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_creationDate = (DescribeRecoveryPointResponse -> Maybe POSIX)
-> (DescribeRecoveryPointResponse
    -> Maybe POSIX -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe POSIX
a -> DescribeRecoveryPointResponse
s {$sel:creationDate:DescribeRecoveryPointResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeRecoveryPointResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRecoveryPointResponse
 -> f DescribeRecoveryPointResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRecoveryPointResponse
-> f DescribeRecoveryPointResponse
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 that a job to create 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.
describeRecoveryPointResponse_completionDate :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.UTCTime)
describeRecoveryPointResponse_completionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_completionDate = (DescribeRecoveryPointResponse -> Maybe POSIX)
-> (DescribeRecoveryPointResponse
    -> Maybe POSIX -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe POSIX
completionDate :: Maybe POSIX
$sel:completionDate:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe POSIX
completionDate} -> Maybe POSIX
completionDate) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe POSIX
a -> DescribeRecoveryPointResponse
s {$sel:completionDate:DescribeRecoveryPointResponse' :: Maybe POSIX
completionDate = Maybe POSIX
a} :: DescribeRecoveryPointResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRecoveryPointResponse
 -> f DescribeRecoveryPointResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRecoveryPointResponse
-> f DescribeRecoveryPointResponse
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 Region where they are created. They consist of lowercase
-- letters, numbers, and hyphens.
describeRecoveryPointResponse_backupVaultName :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)
describeRecoveryPointResponse_backupVaultName :: (Maybe Text -> f (Maybe Text))
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_backupVaultName = (DescribeRecoveryPointResponse -> Maybe Text)
-> (DescribeRecoveryPointResponse
    -> Maybe Text -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse
     DescribeRecoveryPointResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Maybe Text
backupVaultName :: Maybe Text
$sel:backupVaultName:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Maybe Text
backupVaultName} -> Maybe Text
backupVaultName) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Maybe Text
a -> DescribeRecoveryPointResponse
s {$sel:backupVaultName:DescribeRecoveryPointResponse' :: Maybe Text
backupVaultName = Maybe Text
a} :: DescribeRecoveryPointResponse)

-- | The response's http status code.
describeRecoveryPointResponse_httpStatus :: Lens.Lens' DescribeRecoveryPointResponse Prelude.Int
describeRecoveryPointResponse_httpStatus :: (Int -> f Int)
-> DescribeRecoveryPointResponse -> f DescribeRecoveryPointResponse
describeRecoveryPointResponse_httpStatus = (DescribeRecoveryPointResponse -> Int)
-> (DescribeRecoveryPointResponse
    -> Int -> DescribeRecoveryPointResponse)
-> Lens
     DescribeRecoveryPointResponse DescribeRecoveryPointResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecoveryPointResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeRecoveryPointResponse' :: DescribeRecoveryPointResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeRecoveryPointResponse
s@DescribeRecoveryPointResponse' {} Int
a -> DescribeRecoveryPointResponse
s {$sel:httpStatus:DescribeRecoveryPointResponse' :: Int
httpStatus = Int
a} :: DescribeRecoveryPointResponse)

instance Prelude.NFData DescribeRecoveryPointResponse