{-# 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.DescribeBackupJob
-- 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 backup job details for the specified @BackupJobId@.
module Amazonka.Backup.DescribeBackupJob
  ( -- * Creating a Request
    DescribeBackupJob (..),
    newDescribeBackupJob,

    -- * Request Lenses
    describeBackupJob_backupJobId,

    -- * Destructuring the Response
    DescribeBackupJobResponse (..),
    newDescribeBackupJobResponse,

    -- * Response Lenses
    describeBackupJobResponse_iamRoleArn,
    describeBackupJobResponse_state,
    describeBackupJobResponse_resourceType,
    describeBackupJobResponse_percentDone,
    describeBackupJobResponse_startBy,
    describeBackupJobResponse_createdBy,
    describeBackupJobResponse_expectedCompletionDate,
    describeBackupJobResponse_bytesTransferred,
    describeBackupJobResponse_backupVaultArn,
    describeBackupJobResponse_accountId,
    describeBackupJobResponse_backupJobId,
    describeBackupJobResponse_resourceArn,
    describeBackupJobResponse_statusMessage,
    describeBackupJobResponse_recoveryPointArn,
    describeBackupJobResponse_backupSizeInBytes,
    describeBackupJobResponse_creationDate,
    describeBackupJobResponse_completionDate,
    describeBackupJobResponse_backupVaultName,
    describeBackupJobResponse_backupType,
    describeBackupJobResponse_backupOptions,
    describeBackupJobResponse_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:/ 'newDescribeBackupJob' smart constructor.
data DescribeBackupJob = DescribeBackupJob'
  { -- | Uniquely identifies a request to Backup to back up a resource.
    DescribeBackupJob -> Text
backupJobId :: Prelude.Text
  }
  deriving (DescribeBackupJob -> DescribeBackupJob -> Bool
(DescribeBackupJob -> DescribeBackupJob -> Bool)
-> (DescribeBackupJob -> DescribeBackupJob -> Bool)
-> Eq DescribeBackupJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBackupJob -> DescribeBackupJob -> Bool
$c/= :: DescribeBackupJob -> DescribeBackupJob -> Bool
== :: DescribeBackupJob -> DescribeBackupJob -> Bool
$c== :: DescribeBackupJob -> DescribeBackupJob -> Bool
Prelude.Eq, ReadPrec [DescribeBackupJob]
ReadPrec DescribeBackupJob
Int -> ReadS DescribeBackupJob
ReadS [DescribeBackupJob]
(Int -> ReadS DescribeBackupJob)
-> ReadS [DescribeBackupJob]
-> ReadPrec DescribeBackupJob
-> ReadPrec [DescribeBackupJob]
-> Read DescribeBackupJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBackupJob]
$creadListPrec :: ReadPrec [DescribeBackupJob]
readPrec :: ReadPrec DescribeBackupJob
$creadPrec :: ReadPrec DescribeBackupJob
readList :: ReadS [DescribeBackupJob]
$creadList :: ReadS [DescribeBackupJob]
readsPrec :: Int -> ReadS DescribeBackupJob
$creadsPrec :: Int -> ReadS DescribeBackupJob
Prelude.Read, Int -> DescribeBackupJob -> ShowS
[DescribeBackupJob] -> ShowS
DescribeBackupJob -> String
(Int -> DescribeBackupJob -> ShowS)
-> (DescribeBackupJob -> String)
-> ([DescribeBackupJob] -> ShowS)
-> Show DescribeBackupJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBackupJob] -> ShowS
$cshowList :: [DescribeBackupJob] -> ShowS
show :: DescribeBackupJob -> String
$cshow :: DescribeBackupJob -> String
showsPrec :: Int -> DescribeBackupJob -> ShowS
$cshowsPrec :: Int -> DescribeBackupJob -> ShowS
Prelude.Show, (forall x. DescribeBackupJob -> Rep DescribeBackupJob x)
-> (forall x. Rep DescribeBackupJob x -> DescribeBackupJob)
-> Generic DescribeBackupJob
forall x. Rep DescribeBackupJob x -> DescribeBackupJob
forall x. DescribeBackupJob -> Rep DescribeBackupJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeBackupJob x -> DescribeBackupJob
$cfrom :: forall x. DescribeBackupJob -> Rep DescribeBackupJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBackupJob' 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:
--
-- 'backupJobId', 'describeBackupJob_backupJobId' - Uniquely identifies a request to Backup to back up a resource.
newDescribeBackupJob ::
  -- | 'backupJobId'
  Prelude.Text ->
  DescribeBackupJob
newDescribeBackupJob :: Text -> DescribeBackupJob
newDescribeBackupJob Text
pBackupJobId_ =
  DescribeBackupJob' :: Text -> DescribeBackupJob
DescribeBackupJob' {$sel:backupJobId:DescribeBackupJob' :: Text
backupJobId = Text
pBackupJobId_}

-- | Uniquely identifies a request to Backup to back up a resource.
describeBackupJob_backupJobId :: Lens.Lens' DescribeBackupJob Prelude.Text
describeBackupJob_backupJobId :: (Text -> f Text) -> DescribeBackupJob -> f DescribeBackupJob
describeBackupJob_backupJobId = (DescribeBackupJob -> Text)
-> (DescribeBackupJob -> Text -> DescribeBackupJob)
-> Lens DescribeBackupJob DescribeBackupJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJob' {Text
backupJobId :: Text
$sel:backupJobId:DescribeBackupJob' :: DescribeBackupJob -> Text
backupJobId} -> Text
backupJobId) (\s :: DescribeBackupJob
s@DescribeBackupJob' {} Text
a -> DescribeBackupJob
s {$sel:backupJobId:DescribeBackupJob' :: Text
backupJobId = Text
a} :: DescribeBackupJob)

instance Core.AWSRequest DescribeBackupJob where
  type
    AWSResponse DescribeBackupJob =
      DescribeBackupJobResponse
  request :: DescribeBackupJob -> Request DescribeBackupJob
request = Service -> DescribeBackupJob -> Request DescribeBackupJob
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeBackupJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeBackupJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeBackupJob))
-> Logger
-> Service
-> Proxy DescribeBackupJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeBackupJob)))
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 Text
-> Maybe BackupJobState
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe RecoveryPointCreator
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeBackupJobResponse
DescribeBackupJobResponse'
            (Maybe Text
 -> Maybe BackupJobState
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe RecoveryPointCreator
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe BackupJobState
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe RecoveryPointCreator
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
forall (f :: * -> *) a b. Functor 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 BackupJobState
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe RecoveryPointCreator
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe BackupJobState)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe RecoveryPointCreator
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe BackupJobState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"State")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe RecoveryPointCreator
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe RecoveryPointCreator
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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 POSIX
   -> Maybe RecoveryPointCreator
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe RecoveryPointCreator
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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 POSIX
   -> Maybe RecoveryPointCreator
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe RecoveryPointCreator
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
"StartBy")
            Either
  String
  (Maybe RecoveryPointCreator
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe RecoveryPointCreator)
-> Either
     String
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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 POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
"ExpectedCompletionDate")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
"BytesTransferred")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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 Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
"BackupJobId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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 Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeBackupJobResponse)
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
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> DescribeBackupJobResponse)
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
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> DescribeBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DescribeBackupJobResponse)
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
"BackupType")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> DescribeBackupJobResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeBackupJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupOptions" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeBackupJobResponse)
-> Either String Int -> Either String DescribeBackupJobResponse
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 DescribeBackupJob

instance Prelude.NFData DescribeBackupJob

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

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

-- | /See:/ 'newDescribeBackupJobResponse' smart constructor.
data DescribeBackupJobResponse = DescribeBackupJobResponse'
  { -- | Specifies the IAM role ARN used to create the target recovery point; for
    -- example, @arn:aws:iam::123456789012:role\/S3Access@.
    DescribeBackupJobResponse -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The current state of a resource recovery point.
    DescribeBackupJobResponse -> Maybe BackupJobState
state :: Prelude.Maybe BackupJobState,
    -- | The type of Amazon Web Services resource to be backed up; for example,
    -- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon
    -- Relational Database Service (Amazon RDS) database.
    DescribeBackupJobResponse -> 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.
    DescribeBackupJobResponse -> Maybe Text
percentDone :: Prelude.Maybe Prelude.Text,
    -- | Specifies the time in Unix format and Coordinated Universal Time (UTC)
    -- when a backup job must be started before it is canceled. The value is
    -- calculated by adding the start window to the scheduled time. So if the
    -- scheduled time were 6:00 PM and the start window is 2 hours, the
    -- @StartBy@ time would be 8:00 PM on the date specified. The value of
    -- @StartBy@ is accurate to milliseconds. For example, the value
    -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
    DescribeBackupJobResponse -> Maybe POSIX
startBy :: Prelude.Maybe Core.POSIX,
    -- | Contains identifying information about the creation of a backup job,
    -- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and
    -- @BackupRuleId@ of the backup plan that is used to create it.
    DescribeBackupJobResponse -> Maybe RecoveryPointCreator
createdBy :: Prelude.Maybe RecoveryPointCreator,
    -- | The date and time that a job to back up resources is expected to be
    -- completed, in Unix format and Coordinated Universal Time (UTC). The
    -- value of @ExpectedCompletionDate@ is accurate to milliseconds. For
    -- example, the value 1516925490.087 represents Friday, January 26, 2018
    -- 12:11:30.087 AM.
    DescribeBackupJobResponse -> Maybe POSIX
expectedCompletionDate :: Prelude.Maybe Core.POSIX,
    -- | The size in bytes transferred to a backup vault at the time that the job
    -- status was queried.
    DescribeBackupJobResponse -> Maybe Integer
bytesTransferred :: Prelude.Maybe Prelude.Integer,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
    -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
    DescribeBackupJobResponse -> Maybe Text
backupVaultArn :: Prelude.Maybe Prelude.Text,
    -- | Returns the account ID that owns the backup job.
    DescribeBackupJobResponse -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | Uniquely identifies a request to Backup to back up a resource.
    DescribeBackupJobResponse -> Maybe Text
backupJobId :: Prelude.Maybe Prelude.Text,
    -- | An ARN that uniquely identifies a saved resource. The format of the ARN
    -- depends on the resource type.
    DescribeBackupJobResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | A detailed message explaining the status of the job to back up a
    -- resource.
    DescribeBackupJobResponse -> 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@.
    DescribeBackupJobResponse -> Maybe Text
recoveryPointArn :: Prelude.Maybe Prelude.Text,
    -- | The size, in bytes, of a backup.
    DescribeBackupJobResponse -> Maybe Integer
backupSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The date and time that a backup 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.
    DescribeBackupJobResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that a job to create a backup job 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.
    DescribeBackupJobResponse -> Maybe POSIX
completionDate :: Prelude.Maybe Core.POSIX,
    -- | The name of a logical container where backups are stored. Backup vaults
    -- are identified by names that are unique to the account used to create
    -- them and the Amazon Web Services Region where they are created. They
    -- consist of lowercase letters, numbers, and hyphens.
    DescribeBackupJobResponse -> Maybe Text
backupVaultName :: Prelude.Maybe Prelude.Text,
    -- | Represents the actual backup type selected for a backup job. For
    -- example, if a successful Windows Volume Shadow Copy Service (VSS) backup
    -- was taken, @BackupType@ returns @\"WindowsVSS\"@. If @BackupType@ is
    -- empty, then the backup type was a regular backup.
    DescribeBackupJobResponse -> Maybe Text
backupType :: Prelude.Maybe Prelude.Text,
    -- | Represents the options specified as part of backup plan or on-demand
    -- backup job.
    DescribeBackupJobResponse -> Maybe (HashMap Text Text)
backupOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeBackupJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool
(DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool)
-> (DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool)
-> Eq DescribeBackupJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool
$c/= :: DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool
== :: DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool
$c== :: DescribeBackupJobResponse -> DescribeBackupJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeBackupJobResponse]
ReadPrec DescribeBackupJobResponse
Int -> ReadS DescribeBackupJobResponse
ReadS [DescribeBackupJobResponse]
(Int -> ReadS DescribeBackupJobResponse)
-> ReadS [DescribeBackupJobResponse]
-> ReadPrec DescribeBackupJobResponse
-> ReadPrec [DescribeBackupJobResponse]
-> Read DescribeBackupJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBackupJobResponse]
$creadListPrec :: ReadPrec [DescribeBackupJobResponse]
readPrec :: ReadPrec DescribeBackupJobResponse
$creadPrec :: ReadPrec DescribeBackupJobResponse
readList :: ReadS [DescribeBackupJobResponse]
$creadList :: ReadS [DescribeBackupJobResponse]
readsPrec :: Int -> ReadS DescribeBackupJobResponse
$creadsPrec :: Int -> ReadS DescribeBackupJobResponse
Prelude.Read, Int -> DescribeBackupJobResponse -> ShowS
[DescribeBackupJobResponse] -> ShowS
DescribeBackupJobResponse -> String
(Int -> DescribeBackupJobResponse -> ShowS)
-> (DescribeBackupJobResponse -> String)
-> ([DescribeBackupJobResponse] -> ShowS)
-> Show DescribeBackupJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBackupJobResponse] -> ShowS
$cshowList :: [DescribeBackupJobResponse] -> ShowS
show :: DescribeBackupJobResponse -> String
$cshow :: DescribeBackupJobResponse -> String
showsPrec :: Int -> DescribeBackupJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeBackupJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribeBackupJobResponse -> Rep DescribeBackupJobResponse x)
-> (forall x.
    Rep DescribeBackupJobResponse x -> DescribeBackupJobResponse)
-> Generic DescribeBackupJobResponse
forall x.
Rep DescribeBackupJobResponse x -> DescribeBackupJobResponse
forall x.
DescribeBackupJobResponse -> Rep DescribeBackupJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBackupJobResponse x -> DescribeBackupJobResponse
$cfrom :: forall x.
DescribeBackupJobResponse -> Rep DescribeBackupJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBackupJobResponse' 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:
--
-- 'iamRoleArn', 'describeBackupJobResponse_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for
-- example, @arn:aws:iam::123456789012:role\/S3Access@.
--
-- 'state', 'describeBackupJobResponse_state' - The current state of a resource recovery point.
--
-- 'resourceType', 'describeBackupJobResponse_resourceType' - The type of Amazon Web Services resource to be backed up; for example,
-- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon
-- Relational Database Service (Amazon RDS) database.
--
-- 'percentDone', 'describeBackupJobResponse_percentDone' - Contains an estimated percentage that is complete of a job at the time
-- the job status was queried.
--
-- 'startBy', 'describeBackupJobResponse_startBy' - Specifies the time in Unix format and Coordinated Universal Time (UTC)
-- when a backup job must be started before it is canceled. The value is
-- calculated by adding the start window to the scheduled time. So if the
-- scheduled time were 6:00 PM and the start window is 2 hours, the
-- @StartBy@ time would be 8:00 PM on the date specified. The value of
-- @StartBy@ is accurate to milliseconds. For example, the value
-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'createdBy', 'describeBackupJobResponse_createdBy' - Contains identifying information about the creation of a backup job,
-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and
-- @BackupRuleId@ of the backup plan that is used to create it.
--
-- 'expectedCompletionDate', 'describeBackupJobResponse_expectedCompletionDate' - The date and time that a job to back up resources is expected to be
-- completed, in Unix format and Coordinated Universal Time (UTC). The
-- value of @ExpectedCompletionDate@ is accurate to milliseconds. For
-- example, the value 1516925490.087 represents Friday, January 26, 2018
-- 12:11:30.087 AM.
--
-- 'bytesTransferred', 'describeBackupJobResponse_bytesTransferred' - The size in bytes transferred to a backup vault at the time that the job
-- status was queried.
--
-- 'backupVaultArn', 'describeBackupJobResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;
-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.
--
-- 'accountId', 'describeBackupJobResponse_accountId' - Returns the account ID that owns the backup job.
--
-- 'backupJobId', 'describeBackupJobResponse_backupJobId' - Uniquely identifies a request to Backup to back up a resource.
--
-- 'resourceArn', 'describeBackupJobResponse_resourceArn' - An ARN that uniquely identifies a saved resource. The format of the ARN
-- depends on the resource type.
--
-- 'statusMessage', 'describeBackupJobResponse_statusMessage' - A detailed message explaining the status of the job to back up a
-- resource.
--
-- 'recoveryPointArn', 'describeBackupJobResponse_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', 'describeBackupJobResponse_backupSizeInBytes' - The size, in bytes, of a backup.
--
-- 'creationDate', 'describeBackupJobResponse_creationDate' - The date and time that a backup 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', 'describeBackupJobResponse_completionDate' - The date and time that a job to create a backup job 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', 'describeBackupJobResponse_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.
--
-- 'backupType', 'describeBackupJobResponse_backupType' - Represents the actual backup type selected for a backup job. For
-- example, if a successful Windows Volume Shadow Copy Service (VSS) backup
-- was taken, @BackupType@ returns @\"WindowsVSS\"@. If @BackupType@ is
-- empty, then the backup type was a regular backup.
--
-- 'backupOptions', 'describeBackupJobResponse_backupOptions' - Represents the options specified as part of backup plan or on-demand
-- backup job.
--
-- 'httpStatus', 'describeBackupJobResponse_httpStatus' - The response's http status code.
newDescribeBackupJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeBackupJobResponse
newDescribeBackupJobResponse :: Int -> DescribeBackupJobResponse
newDescribeBackupJobResponse Int
pHttpStatus_ =
  DescribeBackupJobResponse' :: Maybe Text
-> Maybe BackupJobState
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe RecoveryPointCreator
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeBackupJobResponse
DescribeBackupJobResponse'
    { $sel:iamRoleArn:DescribeBackupJobResponse' :: Maybe Text
iamRoleArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:DescribeBackupJobResponse' :: Maybe BackupJobState
state = Maybe BackupJobState
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:DescribeBackupJobResponse' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:percentDone:DescribeBackupJobResponse' :: Maybe Text
percentDone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startBy:DescribeBackupJobResponse' :: Maybe POSIX
startBy = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeBackupJobResponse' :: Maybe RecoveryPointCreator
createdBy = Maybe RecoveryPointCreator
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedCompletionDate:DescribeBackupJobResponse' :: Maybe POSIX
expectedCompletionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:bytesTransferred:DescribeBackupJobResponse' :: Maybe Integer
bytesTransferred = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultArn:DescribeBackupJobResponse' :: Maybe Text
backupVaultArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:DescribeBackupJobResponse' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupJobId:DescribeBackupJobResponse' :: Maybe Text
backupJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:DescribeBackupJobResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:DescribeBackupJobResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryPointArn:DescribeBackupJobResponse' :: Maybe Text
recoveryPointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupSizeInBytes:DescribeBackupJobResponse' :: Maybe Integer
backupSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeBackupJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:completionDate:DescribeBackupJobResponse' :: Maybe POSIX
completionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:backupVaultName:DescribeBackupJobResponse' :: Maybe Text
backupVaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupType:DescribeBackupJobResponse' :: Maybe Text
backupType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupOptions:DescribeBackupJobResponse' :: Maybe (HashMap Text Text)
backupOptions = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeBackupJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The current state of a resource recovery point.
describeBackupJobResponse_state :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe BackupJobState)
describeBackupJobResponse_state :: (Maybe BackupJobState -> f (Maybe BackupJobState))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_state = (DescribeBackupJobResponse -> Maybe BackupJobState)
-> (DescribeBackupJobResponse
    -> Maybe BackupJobState -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe BackupJobState)
     (Maybe BackupJobState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe BackupJobState
state :: Maybe BackupJobState
$sel:state:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe BackupJobState
state} -> Maybe BackupJobState
state) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe BackupJobState
a -> DescribeBackupJobResponse
s {$sel:state:DescribeBackupJobResponse' :: Maybe BackupJobState
state = Maybe BackupJobState
a} :: DescribeBackupJobResponse)

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

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

-- | Specifies the time in Unix format and Coordinated Universal Time (UTC)
-- when a backup job must be started before it is canceled. The value is
-- calculated by adding the start window to the scheduled time. So if the
-- scheduled time were 6:00 PM and the start window is 2 hours, the
-- @StartBy@ time would be 8:00 PM on the date specified. The value of
-- @StartBy@ is accurate to milliseconds. For example, the value
-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
describeBackupJobResponse_startBy :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)
describeBackupJobResponse_startBy :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_startBy = (DescribeBackupJobResponse -> Maybe POSIX)
-> (DescribeBackupJobResponse
    -> Maybe POSIX -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe POSIX
startBy :: Maybe POSIX
$sel:startBy:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe POSIX
startBy} -> Maybe POSIX
startBy) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe POSIX
a -> DescribeBackupJobResponse
s {$sel:startBy:DescribeBackupJobResponse' :: Maybe POSIX
startBy = Maybe POSIX
a} :: DescribeBackupJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeBackupJobResponse -> f DescribeBackupJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse
-> f DescribeBackupJobResponse
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

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

-- | The date and time that a job to back up resources is expected to be
-- completed, in Unix format and Coordinated Universal Time (UTC). The
-- value of @ExpectedCompletionDate@ is accurate to milliseconds. For
-- example, the value 1516925490.087 represents Friday, January 26, 2018
-- 12:11:30.087 AM.
describeBackupJobResponse_expectedCompletionDate :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)
describeBackupJobResponse_expectedCompletionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_expectedCompletionDate = (DescribeBackupJobResponse -> Maybe POSIX)
-> (DescribeBackupJobResponse
    -> Maybe POSIX -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe POSIX
expectedCompletionDate :: Maybe POSIX
$sel:expectedCompletionDate:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe POSIX
expectedCompletionDate} -> Maybe POSIX
expectedCompletionDate) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe POSIX
a -> DescribeBackupJobResponse
s {$sel:expectedCompletionDate:DescribeBackupJobResponse' :: Maybe POSIX
expectedCompletionDate = Maybe POSIX
a} :: DescribeBackupJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeBackupJobResponse -> f DescribeBackupJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse
-> f DescribeBackupJobResponse
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 size in bytes transferred to a backup vault at the time that the job
-- status was queried.
describeBackupJobResponse_bytesTransferred :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Integer)
describeBackupJobResponse_bytesTransferred :: (Maybe Integer -> f (Maybe Integer))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_bytesTransferred = (DescribeBackupJobResponse -> Maybe Integer)
-> (DescribeBackupJobResponse
    -> Maybe Integer -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe Integer
bytesTransferred :: Maybe Integer
$sel:bytesTransferred:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe Integer
bytesTransferred} -> Maybe Integer
bytesTransferred) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe Integer
a -> DescribeBackupJobResponse
s {$sel:bytesTransferred:DescribeBackupJobResponse' :: Maybe Integer
bytesTransferred = Maybe Integer
a} :: DescribeBackupJobResponse)

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

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

-- | Uniquely identifies a request to Backup to back up a resource.
describeBackupJobResponse_backupJobId :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)
describeBackupJobResponse_backupJobId :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_backupJobId = (DescribeBackupJobResponse -> Maybe Text)
-> (DescribeBackupJobResponse
    -> Maybe Text -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe Text
backupJobId :: Maybe Text
$sel:backupJobId:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe Text
backupJobId} -> Maybe Text
backupJobId) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe Text
a -> DescribeBackupJobResponse
s {$sel:backupJobId:DescribeBackupJobResponse' :: Maybe Text
backupJobId = Maybe Text
a} :: DescribeBackupJobResponse)

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

-- | A detailed message explaining the status of the job to back up a
-- resource.
describeBackupJobResponse_statusMessage :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)
describeBackupJobResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_statusMessage = (DescribeBackupJobResponse -> Maybe Text)
-> (DescribeBackupJobResponse
    -> Maybe Text -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe Text
a -> DescribeBackupJobResponse
s {$sel:statusMessage:DescribeBackupJobResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: DescribeBackupJobResponse)

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

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

-- | The date and time that a backup 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.
describeBackupJobResponse_creationDate :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)
describeBackupJobResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_creationDate = (DescribeBackupJobResponse -> Maybe POSIX)
-> (DescribeBackupJobResponse
    -> Maybe POSIX -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe POSIX
a -> DescribeBackupJobResponse
s {$sel:creationDate:DescribeBackupJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeBackupJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeBackupJobResponse -> f DescribeBackupJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse
-> f DescribeBackupJobResponse
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 backup job 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.
describeBackupJobResponse_completionDate :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)
describeBackupJobResponse_completionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_completionDate = (DescribeBackupJobResponse -> Maybe POSIX)
-> (DescribeBackupJobResponse
    -> Maybe POSIX -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe POSIX
completionDate :: Maybe POSIX
$sel:completionDate:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe POSIX
completionDate} -> Maybe POSIX
completionDate) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe POSIX
a -> DescribeBackupJobResponse
s {$sel:completionDate:DescribeBackupJobResponse' :: Maybe POSIX
completionDate = Maybe POSIX
a} :: DescribeBackupJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeBackupJobResponse -> f DescribeBackupJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeBackupJobResponse
-> f DescribeBackupJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

-- | Represents the actual backup type selected for a backup job. For
-- example, if a successful Windows Volume Shadow Copy Service (VSS) backup
-- was taken, @BackupType@ returns @\"WindowsVSS\"@. If @BackupType@ is
-- empty, then the backup type was a regular backup.
describeBackupJobResponse_backupType :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)
describeBackupJobResponse_backupType :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_backupType = (DescribeBackupJobResponse -> Maybe Text)
-> (DescribeBackupJobResponse
    -> Maybe Text -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe Text
backupType :: Maybe Text
$sel:backupType:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe Text
backupType} -> Maybe Text
backupType) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe Text
a -> DescribeBackupJobResponse
s {$sel:backupType:DescribeBackupJobResponse' :: Maybe Text
backupType = Maybe Text
a} :: DescribeBackupJobResponse)

-- | Represents the options specified as part of backup plan or on-demand
-- backup job.
describeBackupJobResponse_backupOptions :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeBackupJobResponse_backupOptions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeBackupJobResponse -> f DescribeBackupJobResponse
describeBackupJobResponse_backupOptions = (DescribeBackupJobResponse -> Maybe (HashMap Text Text))
-> (DescribeBackupJobResponse
    -> Maybe (HashMap Text Text) -> DescribeBackupJobResponse)
-> Lens
     DescribeBackupJobResponse
     DescribeBackupJobResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupJobResponse' {Maybe (HashMap Text Text)
backupOptions :: Maybe (HashMap Text Text)
$sel:backupOptions:DescribeBackupJobResponse' :: DescribeBackupJobResponse -> Maybe (HashMap Text Text)
backupOptions} -> Maybe (HashMap Text Text)
backupOptions) (\s :: DescribeBackupJobResponse
s@DescribeBackupJobResponse' {} Maybe (HashMap Text Text)
a -> DescribeBackupJobResponse
s {$sel:backupOptions:DescribeBackupJobResponse' :: Maybe (HashMap Text Text)
backupOptions = Maybe (HashMap Text Text)
a} :: DescribeBackupJobResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeBackupJobResponse -> f DescribeBackupJobResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeBackupJobResponse
-> f DescribeBackupJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeBackupJobResponse