{-# 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.DescribeRestoreJob
-- 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 restore job that is specified by a
-- job ID.
module Amazonka.Backup.DescribeRestoreJob
  ( -- * Creating a Request
    DescribeRestoreJob (..),
    newDescribeRestoreJob,

    -- * Request Lenses
    describeRestoreJob_restoreJobId,

    -- * Destructuring the Response
    DescribeRestoreJobResponse (..),
    newDescribeRestoreJobResponse,

    -- * Response Lenses
    describeRestoreJobResponse_status,
    describeRestoreJobResponse_iamRoleArn,
    describeRestoreJobResponse_expectedCompletionTimeMinutes,
    describeRestoreJobResponse_restoreJobId,
    describeRestoreJobResponse_resourceType,
    describeRestoreJobResponse_percentDone,
    describeRestoreJobResponse_accountId,
    describeRestoreJobResponse_createdResourceArn,
    describeRestoreJobResponse_statusMessage,
    describeRestoreJobResponse_recoveryPointArn,
    describeRestoreJobResponse_backupSizeInBytes,
    describeRestoreJobResponse_creationDate,
    describeRestoreJobResponse_completionDate,
    describeRestoreJobResponse_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:/ 'newDescribeRestoreJob' smart constructor.
data DescribeRestoreJob = DescribeRestoreJob'
  { -- | Uniquely identifies the job that restores a recovery point.
    DescribeRestoreJob -> Text
restoreJobId :: Prelude.Text
  }
  deriving (DescribeRestoreJob -> DescribeRestoreJob -> Bool
(DescribeRestoreJob -> DescribeRestoreJob -> Bool)
-> (DescribeRestoreJob -> DescribeRestoreJob -> Bool)
-> Eq DescribeRestoreJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRestoreJob -> DescribeRestoreJob -> Bool
$c/= :: DescribeRestoreJob -> DescribeRestoreJob -> Bool
== :: DescribeRestoreJob -> DescribeRestoreJob -> Bool
$c== :: DescribeRestoreJob -> DescribeRestoreJob -> Bool
Prelude.Eq, ReadPrec [DescribeRestoreJob]
ReadPrec DescribeRestoreJob
Int -> ReadS DescribeRestoreJob
ReadS [DescribeRestoreJob]
(Int -> ReadS DescribeRestoreJob)
-> ReadS [DescribeRestoreJob]
-> ReadPrec DescribeRestoreJob
-> ReadPrec [DescribeRestoreJob]
-> Read DescribeRestoreJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRestoreJob]
$creadListPrec :: ReadPrec [DescribeRestoreJob]
readPrec :: ReadPrec DescribeRestoreJob
$creadPrec :: ReadPrec DescribeRestoreJob
readList :: ReadS [DescribeRestoreJob]
$creadList :: ReadS [DescribeRestoreJob]
readsPrec :: Int -> ReadS DescribeRestoreJob
$creadsPrec :: Int -> ReadS DescribeRestoreJob
Prelude.Read, Int -> DescribeRestoreJob -> ShowS
[DescribeRestoreJob] -> ShowS
DescribeRestoreJob -> String
(Int -> DescribeRestoreJob -> ShowS)
-> (DescribeRestoreJob -> String)
-> ([DescribeRestoreJob] -> ShowS)
-> Show DescribeRestoreJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRestoreJob] -> ShowS
$cshowList :: [DescribeRestoreJob] -> ShowS
show :: DescribeRestoreJob -> String
$cshow :: DescribeRestoreJob -> String
showsPrec :: Int -> DescribeRestoreJob -> ShowS
$cshowsPrec :: Int -> DescribeRestoreJob -> ShowS
Prelude.Show, (forall x. DescribeRestoreJob -> Rep DescribeRestoreJob x)
-> (forall x. Rep DescribeRestoreJob x -> DescribeRestoreJob)
-> Generic DescribeRestoreJob
forall x. Rep DescribeRestoreJob x -> DescribeRestoreJob
forall x. DescribeRestoreJob -> Rep DescribeRestoreJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRestoreJob x -> DescribeRestoreJob
$cfrom :: forall x. DescribeRestoreJob -> Rep DescribeRestoreJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRestoreJob' 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:
--
-- 'restoreJobId', 'describeRestoreJob_restoreJobId' - Uniquely identifies the job that restores a recovery point.
newDescribeRestoreJob ::
  -- | 'restoreJobId'
  Prelude.Text ->
  DescribeRestoreJob
newDescribeRestoreJob :: Text -> DescribeRestoreJob
newDescribeRestoreJob Text
pRestoreJobId_ =
  DescribeRestoreJob' :: Text -> DescribeRestoreJob
DescribeRestoreJob' {$sel:restoreJobId:DescribeRestoreJob' :: Text
restoreJobId = Text
pRestoreJobId_}

-- | Uniquely identifies the job that restores a recovery point.
describeRestoreJob_restoreJobId :: Lens.Lens' DescribeRestoreJob Prelude.Text
describeRestoreJob_restoreJobId :: (Text -> f Text) -> DescribeRestoreJob -> f DescribeRestoreJob
describeRestoreJob_restoreJobId = (DescribeRestoreJob -> Text)
-> (DescribeRestoreJob -> Text -> DescribeRestoreJob)
-> Lens DescribeRestoreJob DescribeRestoreJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJob' {Text
restoreJobId :: Text
$sel:restoreJobId:DescribeRestoreJob' :: DescribeRestoreJob -> Text
restoreJobId} -> Text
restoreJobId) (\s :: DescribeRestoreJob
s@DescribeRestoreJob' {} Text
a -> DescribeRestoreJob
s {$sel:restoreJobId:DescribeRestoreJob' :: Text
restoreJobId = Text
a} :: DescribeRestoreJob)

instance Core.AWSRequest DescribeRestoreJob where
  type
    AWSResponse DescribeRestoreJob =
      DescribeRestoreJobResponse
  request :: DescribeRestoreJob -> Request DescribeRestoreJob
request = Service -> DescribeRestoreJob -> Request DescribeRestoreJob
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeRestoreJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRestoreJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeRestoreJob))
-> Logger
-> Service
-> Proxy DescribeRestoreJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRestoreJob)))
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 RestoreJobStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Int
-> DescribeRestoreJobResponse
DescribeRestoreJobResponse'
            (Maybe RestoreJobStatus
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Int
 -> DescribeRestoreJobResponse)
-> Either String (Maybe RestoreJobStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RestoreJobStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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 Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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
"ExpectedCompletionTimeMinutes")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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
"RestoreJobId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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
"PercentDone")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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
"AccountId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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
"CreatedResourceArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeRestoreJobResponse)
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 Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeRestoreJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe POSIX -> Maybe POSIX -> Int -> DescribeRestoreJobResponse)
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 Integer
   -> Maybe POSIX -> Maybe POSIX -> Int -> DescribeRestoreJobResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe POSIX -> Maybe POSIX -> Int -> DescribeRestoreJobResponse)
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 -> Int -> DescribeRestoreJobResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe POSIX -> Int -> DescribeRestoreJobResponse)
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 -> Int -> DescribeRestoreJobResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> DescribeRestoreJobResponse)
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 (Int -> DescribeRestoreJobResponse)
-> Either String Int -> Either String DescribeRestoreJobResponse
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 DescribeRestoreJob

instance Prelude.NFData DescribeRestoreJob

instance Core.ToHeaders DescribeRestoreJob where
  toHeaders :: DescribeRestoreJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRestoreJob -> 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 DescribeRestoreJob where
  toPath :: DescribeRestoreJob -> ByteString
toPath DescribeRestoreJob' {Text
restoreJobId :: Text
$sel:restoreJobId:DescribeRestoreJob' :: DescribeRestoreJob -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/restore-jobs/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
restoreJobId]

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

-- | /See:/ 'newDescribeRestoreJobResponse' smart constructor.
data DescribeRestoreJobResponse = DescribeRestoreJobResponse'
  { -- | Status code specifying the state of the job that is initiated by Backup
    -- to restore a recovery point.
    DescribeRestoreJobResponse -> Maybe RestoreJobStatus
status :: Prelude.Maybe RestoreJobStatus,
    -- | Specifies the IAM role ARN used to create the target recovery point; for
    -- example, @arn:aws:iam::123456789012:role\/S3Access@.
    DescribeRestoreJobResponse -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The amount of time in minutes that a job restoring a recovery point is
    -- expected to take.
    DescribeRestoreJobResponse -> Maybe Integer
expectedCompletionTimeMinutes :: Prelude.Maybe Prelude.Integer,
    -- | Uniquely identifies the job that restores a recovery point.
    DescribeRestoreJobResponse -> Maybe Text
restoreJobId :: Prelude.Maybe Prelude.Text,
    -- | Returns metadata associated with a restore job listed by resource type.
    DescribeRestoreJobResponse -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | Contains an estimated percentage that is complete of a job at the time
    -- the job status was queried.
    DescribeRestoreJobResponse -> Maybe Text
percentDone :: Prelude.Maybe Prelude.Text,
    -- | Returns the account ID that owns the restore job.
    DescribeRestoreJobResponse -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a resource whose
    -- recovery point is being restored. The format of the ARN depends on the
    -- resource type of the backed-up resource.
    DescribeRestoreJobResponse -> Maybe Text
createdResourceArn :: Prelude.Maybe Prelude.Text,
    -- | A message showing the status of a job to restore a recovery point.
    DescribeRestoreJobResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | An ARN that uniquely identifies a recovery point; for example,
    -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.
    DescribeRestoreJobResponse -> Maybe Text
recoveryPointArn :: Prelude.Maybe Prelude.Text,
    -- | The size, in bytes, of the restored resource.
    DescribeRestoreJobResponse -> Maybe Integer
backupSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The date and time that a restore job 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.
    DescribeRestoreJobResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that 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.
    DescribeRestoreJobResponse -> Maybe POSIX
completionDate :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribeRestoreJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRestoreJobResponse -> DescribeRestoreJobResponse -> Bool
(DescribeRestoreJobResponse -> DescribeRestoreJobResponse -> Bool)
-> (DescribeRestoreJobResponse
    -> DescribeRestoreJobResponse -> Bool)
-> Eq DescribeRestoreJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRestoreJobResponse -> DescribeRestoreJobResponse -> Bool
$c/= :: DescribeRestoreJobResponse -> DescribeRestoreJobResponse -> Bool
== :: DescribeRestoreJobResponse -> DescribeRestoreJobResponse -> Bool
$c== :: DescribeRestoreJobResponse -> DescribeRestoreJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRestoreJobResponse]
ReadPrec DescribeRestoreJobResponse
Int -> ReadS DescribeRestoreJobResponse
ReadS [DescribeRestoreJobResponse]
(Int -> ReadS DescribeRestoreJobResponse)
-> ReadS [DescribeRestoreJobResponse]
-> ReadPrec DescribeRestoreJobResponse
-> ReadPrec [DescribeRestoreJobResponse]
-> Read DescribeRestoreJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRestoreJobResponse]
$creadListPrec :: ReadPrec [DescribeRestoreJobResponse]
readPrec :: ReadPrec DescribeRestoreJobResponse
$creadPrec :: ReadPrec DescribeRestoreJobResponse
readList :: ReadS [DescribeRestoreJobResponse]
$creadList :: ReadS [DescribeRestoreJobResponse]
readsPrec :: Int -> ReadS DescribeRestoreJobResponse
$creadsPrec :: Int -> ReadS DescribeRestoreJobResponse
Prelude.Read, Int -> DescribeRestoreJobResponse -> ShowS
[DescribeRestoreJobResponse] -> ShowS
DescribeRestoreJobResponse -> String
(Int -> DescribeRestoreJobResponse -> ShowS)
-> (DescribeRestoreJobResponse -> String)
-> ([DescribeRestoreJobResponse] -> ShowS)
-> Show DescribeRestoreJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRestoreJobResponse] -> ShowS
$cshowList :: [DescribeRestoreJobResponse] -> ShowS
show :: DescribeRestoreJobResponse -> String
$cshow :: DescribeRestoreJobResponse -> String
showsPrec :: Int -> DescribeRestoreJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeRestoreJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRestoreJobResponse -> Rep DescribeRestoreJobResponse x)
-> (forall x.
    Rep DescribeRestoreJobResponse x -> DescribeRestoreJobResponse)
-> Generic DescribeRestoreJobResponse
forall x.
Rep DescribeRestoreJobResponse x -> DescribeRestoreJobResponse
forall x.
DescribeRestoreJobResponse -> Rep DescribeRestoreJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRestoreJobResponse x -> DescribeRestoreJobResponse
$cfrom :: forall x.
DescribeRestoreJobResponse -> Rep DescribeRestoreJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRestoreJobResponse' 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:
--
-- 'status', 'describeRestoreJobResponse_status' - Status code specifying the state of the job that is initiated by Backup
-- to restore a recovery point.
--
-- 'iamRoleArn', 'describeRestoreJobResponse_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for
-- example, @arn:aws:iam::123456789012:role\/S3Access@.
--
-- 'expectedCompletionTimeMinutes', 'describeRestoreJobResponse_expectedCompletionTimeMinutes' - The amount of time in minutes that a job restoring a recovery point is
-- expected to take.
--
-- 'restoreJobId', 'describeRestoreJobResponse_restoreJobId' - Uniquely identifies the job that restores a recovery point.
--
-- 'resourceType', 'describeRestoreJobResponse_resourceType' - Returns metadata associated with a restore job listed by resource type.
--
-- 'percentDone', 'describeRestoreJobResponse_percentDone' - Contains an estimated percentage that is complete of a job at the time
-- the job status was queried.
--
-- 'accountId', 'describeRestoreJobResponse_accountId' - Returns the account ID that owns the restore job.
--
-- 'createdResourceArn', 'describeRestoreJobResponse_createdResourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource whose
-- recovery point is being restored. The format of the ARN depends on the
-- resource type of the backed-up resource.
--
-- 'statusMessage', 'describeRestoreJobResponse_statusMessage' - A message showing the status of a job to restore a recovery point.
--
-- 'recoveryPointArn', 'describeRestoreJobResponse_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@.
--
-- 'backupSizeInBytes', 'describeRestoreJobResponse_backupSizeInBytes' - The size, in bytes, of the restored resource.
--
-- 'creationDate', 'describeRestoreJobResponse_creationDate' - The date and time that a restore job 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', 'describeRestoreJobResponse_completionDate' - The date and time that 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.
--
-- 'httpStatus', 'describeRestoreJobResponse_httpStatus' - The response's http status code.
newDescribeRestoreJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRestoreJobResponse
newDescribeRestoreJobResponse :: Int -> DescribeRestoreJobResponse
newDescribeRestoreJobResponse Int
pHttpStatus_ =
  DescribeRestoreJobResponse' :: Maybe RestoreJobStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Int
-> DescribeRestoreJobResponse
DescribeRestoreJobResponse'
    { $sel:status:DescribeRestoreJobResponse' :: Maybe RestoreJobStatus
status =
        Maybe RestoreJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:DescribeRestoreJobResponse' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedCompletionTimeMinutes:DescribeRestoreJobResponse' :: Maybe Integer
expectedCompletionTimeMinutes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:restoreJobId:DescribeRestoreJobResponse' :: Maybe Text
restoreJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:DescribeRestoreJobResponse' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:percentDone:DescribeRestoreJobResponse' :: Maybe Text
percentDone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:DescribeRestoreJobResponse' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdResourceArn:DescribeRestoreJobResponse' :: Maybe Text
createdResourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:DescribeRestoreJobResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryPointArn:DescribeRestoreJobResponse' :: Maybe Text
recoveryPointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupSizeInBytes:DescribeRestoreJobResponse' :: Maybe Integer
backupSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeRestoreJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:completionDate:DescribeRestoreJobResponse' :: Maybe POSIX
completionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRestoreJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Status code specifying the state of the job that is initiated by Backup
-- to restore a recovery point.
describeRestoreJobResponse_status :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe RestoreJobStatus)
describeRestoreJobResponse_status :: (Maybe RestoreJobStatus -> f (Maybe RestoreJobStatus))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_status = (DescribeRestoreJobResponse -> Maybe RestoreJobStatus)
-> (DescribeRestoreJobResponse
    -> Maybe RestoreJobStatus -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe RestoreJobStatus)
     (Maybe RestoreJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe RestoreJobStatus
status :: Maybe RestoreJobStatus
$sel:status:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe RestoreJobStatus
status} -> Maybe RestoreJobStatus
status) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe RestoreJobStatus
a -> DescribeRestoreJobResponse
s {$sel:status:DescribeRestoreJobResponse' :: Maybe RestoreJobStatus
status = Maybe RestoreJobStatus
a} :: DescribeRestoreJobResponse)

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

-- | The amount of time in minutes that a job restoring a recovery point is
-- expected to take.
describeRestoreJobResponse_expectedCompletionTimeMinutes :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Integer)
describeRestoreJobResponse_expectedCompletionTimeMinutes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_expectedCompletionTimeMinutes = (DescribeRestoreJobResponse -> Maybe Integer)
-> (DescribeRestoreJobResponse
    -> Maybe Integer -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Integer
expectedCompletionTimeMinutes :: Maybe Integer
$sel:expectedCompletionTimeMinutes:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Integer
expectedCompletionTimeMinutes} -> Maybe Integer
expectedCompletionTimeMinutes) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Integer
a -> DescribeRestoreJobResponse
s {$sel:expectedCompletionTimeMinutes:DescribeRestoreJobResponse' :: Maybe Integer
expectedCompletionTimeMinutes = Maybe Integer
a} :: DescribeRestoreJobResponse)

-- | Uniquely identifies the job that restores a recovery point.
describeRestoreJobResponse_restoreJobId :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)
describeRestoreJobResponse_restoreJobId :: (Maybe Text -> f (Maybe Text))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_restoreJobId = (DescribeRestoreJobResponse -> Maybe Text)
-> (DescribeRestoreJobResponse
    -> Maybe Text -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Text
restoreJobId :: Maybe Text
$sel:restoreJobId:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Text
restoreJobId} -> Maybe Text
restoreJobId) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Text
a -> DescribeRestoreJobResponse
s {$sel:restoreJobId:DescribeRestoreJobResponse' :: Maybe Text
restoreJobId = Maybe Text
a} :: DescribeRestoreJobResponse)

-- | Returns metadata associated with a restore job listed by resource type.
describeRestoreJobResponse_resourceType :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)
describeRestoreJobResponse_resourceType :: (Maybe Text -> f (Maybe Text))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_resourceType = (DescribeRestoreJobResponse -> Maybe Text)
-> (DescribeRestoreJobResponse
    -> Maybe Text -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Text
a -> DescribeRestoreJobResponse
s {$sel:resourceType:DescribeRestoreJobResponse' :: Maybe Text
resourceType = Maybe Text
a} :: DescribeRestoreJobResponse)

-- | Contains an estimated percentage that is complete of a job at the time
-- the job status was queried.
describeRestoreJobResponse_percentDone :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)
describeRestoreJobResponse_percentDone :: (Maybe Text -> f (Maybe Text))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_percentDone = (DescribeRestoreJobResponse -> Maybe Text)
-> (DescribeRestoreJobResponse
    -> Maybe Text -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Text
percentDone :: Maybe Text
$sel:percentDone:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Text
percentDone} -> Maybe Text
percentDone) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Text
a -> DescribeRestoreJobResponse
s {$sel:percentDone:DescribeRestoreJobResponse' :: Maybe Text
percentDone = Maybe Text
a} :: DescribeRestoreJobResponse)

-- | Returns the account ID that owns the restore job.
describeRestoreJobResponse_accountId :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)
describeRestoreJobResponse_accountId :: (Maybe Text -> f (Maybe Text))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_accountId = (DescribeRestoreJobResponse -> Maybe Text)
-> (DescribeRestoreJobResponse
    -> Maybe Text -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Text
accountId :: Maybe Text
$sel:accountId:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Text
a -> DescribeRestoreJobResponse
s {$sel:accountId:DescribeRestoreJobResponse' :: Maybe Text
accountId = Maybe Text
a} :: DescribeRestoreJobResponse)

-- | An Amazon Resource Name (ARN) that uniquely identifies a resource whose
-- recovery point is being restored. The format of the ARN depends on the
-- resource type of the backed-up resource.
describeRestoreJobResponse_createdResourceArn :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)
describeRestoreJobResponse_createdResourceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_createdResourceArn = (DescribeRestoreJobResponse -> Maybe Text)
-> (DescribeRestoreJobResponse
    -> Maybe Text -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Text
createdResourceArn :: Maybe Text
$sel:createdResourceArn:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Text
createdResourceArn} -> Maybe Text
createdResourceArn) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Text
a -> DescribeRestoreJobResponse
s {$sel:createdResourceArn:DescribeRestoreJobResponse' :: Maybe Text
createdResourceArn = Maybe Text
a} :: DescribeRestoreJobResponse)

-- | A message showing the status of a job to restore a recovery point.
describeRestoreJobResponse_statusMessage :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)
describeRestoreJobResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_statusMessage = (DescribeRestoreJobResponse -> Maybe Text)
-> (DescribeRestoreJobResponse
    -> Maybe Text -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe Text
a -> DescribeRestoreJobResponse
s {$sel:statusMessage:DescribeRestoreJobResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: DescribeRestoreJobResponse)

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

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

-- | The date and time that a restore job 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.
describeRestoreJobResponse_creationDate :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.UTCTime)
describeRestoreJobResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_creationDate = (DescribeRestoreJobResponse -> Maybe POSIX)
-> (DescribeRestoreJobResponse
    -> Maybe POSIX -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe POSIX
a -> DescribeRestoreJobResponse
s {$sel:creationDate:DescribeRestoreJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeRestoreJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRestoreJobResponse
-> f DescribeRestoreJobResponse
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 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.
describeRestoreJobResponse_completionDate :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.UTCTime)
describeRestoreJobResponse_completionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_completionDate = (DescribeRestoreJobResponse -> Maybe POSIX)
-> (DescribeRestoreJobResponse
    -> Maybe POSIX -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse
     DescribeRestoreJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Maybe POSIX
completionDate :: Maybe POSIX
$sel:completionDate:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Maybe POSIX
completionDate} -> Maybe POSIX
completionDate) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Maybe POSIX
a -> DescribeRestoreJobResponse
s {$sel:completionDate:DescribeRestoreJobResponse' :: Maybe POSIX
completionDate = Maybe POSIX
a} :: DescribeRestoreJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeRestoreJobResponse
-> f DescribeRestoreJobResponse
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 response's http status code.
describeRestoreJobResponse_httpStatus :: Lens.Lens' DescribeRestoreJobResponse Prelude.Int
describeRestoreJobResponse_httpStatus :: (Int -> f Int)
-> DescribeRestoreJobResponse -> f DescribeRestoreJobResponse
describeRestoreJobResponse_httpStatus = (DescribeRestoreJobResponse -> Int)
-> (DescribeRestoreJobResponse
    -> Int -> DescribeRestoreJobResponse)
-> Lens
     DescribeRestoreJobResponse DescribeRestoreJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRestoreJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeRestoreJobResponse' :: DescribeRestoreJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeRestoreJobResponse
s@DescribeRestoreJobResponse' {} Int
a -> DescribeRestoreJobResponse
s {$sel:httpStatus:DescribeRestoreJobResponse' :: Int
httpStatus = Int
a} :: DescribeRestoreJobResponse)

instance Prelude.NFData DescribeRestoreJobResponse