{-# 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.StartBackupJob
-- 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)
--
-- Starts an on-demand backup job for the specified resource.
module Amazonka.Backup.StartBackupJob
  ( -- * Creating a Request
    StartBackupJob (..),
    newStartBackupJob,

    -- * Request Lenses
    startBackupJob_idempotencyToken,
    startBackupJob_lifecycle,
    startBackupJob_recoveryPointTags,
    startBackupJob_completeWindowMinutes,
    startBackupJob_backupOptions,
    startBackupJob_startWindowMinutes,
    startBackupJob_backupVaultName,
    startBackupJob_resourceArn,
    startBackupJob_iamRoleArn,

    -- * Destructuring the Response
    StartBackupJobResponse (..),
    newStartBackupJobResponse,

    -- * Response Lenses
    startBackupJobResponse_backupJobId,
    startBackupJobResponse_recoveryPointArn,
    startBackupJobResponse_creationDate,
    startBackupJobResponse_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:/ 'newStartBackupJob' smart constructor.
data StartBackupJob = StartBackupJob'
  { -- | A customer-chosen string that you can use to distinguish between
    -- otherwise identical calls to @StartBackupJob@. Retrying a successful
    -- request with the same idempotency token results in a success message
    -- with no action taken.
    StartBackupJob -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
    -- | The lifecycle defines when a protected resource is transitioned to cold
    -- storage and when it expires. Backup will transition and expire backups
    -- automatically according to the lifecycle that you define.
    --
    -- Backups transitioned to cold storage must be stored in cold storage for
    -- a minimum of 90 days. Therefore, the “expire after days” setting must be
    -- 90 days greater than the “transition to cold after days” setting. The
    -- “transition to cold after days” setting cannot be changed after a backup
    -- has been transitioned to cold.
    --
    -- Only Amazon EFS file system backups can be transitioned to cold storage.
    StartBackupJob -> Maybe Lifecycle
lifecycle :: Prelude.Maybe Lifecycle,
    -- | To help organize your resources, you can assign your own metadata to the
    -- resources that you create. Each tag is a key-value pair.
    StartBackupJob -> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | A value in minutes during which a successfully started backup must
    -- complete, or else AWS Backup will cancel the job. This value is
    -- optional. This value begins counting down from when the backup was
    -- scheduled. It does not add additional time for @StartWindowMinutes@, or
    -- if the backup started later than scheduled.
    StartBackupJob -> Maybe Integer
completeWindowMinutes :: Prelude.Maybe Prelude.Integer,
    -- | Specifies the backup option for a selected resource. This option is only
    -- available for Windows Volume Shadow Copy Service (VSS) backup jobs.
    --
    -- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the
    -- @WindowsVSS@ backup option and create a Windows VSS backup. Set to
    -- @\"WindowsVSS\"\"disabled\"@ to create a regular backup. The
    -- @WindowsVSS@ option is not enabled by default.
    StartBackupJob -> Maybe (HashMap Text Text)
backupOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A value in minutes after a backup is scheduled before a job will be
    -- canceled if it doesn\'t start successfully. This value is optional, and
    -- the default is 8 hours.
    StartBackupJob -> Maybe Integer
startWindowMinutes :: Prelude.Maybe Prelude.Integer,
    -- | 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.
    StartBackupJob -> Text
backupVaultName :: Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
    -- format of the ARN depends on the resource type.
    StartBackupJob -> Text
resourceArn :: Prelude.Text,
    -- | Specifies the IAM role ARN used to create the target recovery point; for
    -- example, @arn:aws:iam::123456789012:role\/S3Access@.
    StartBackupJob -> Text
iamRoleArn :: Prelude.Text
  }
  deriving (StartBackupJob -> StartBackupJob -> Bool
(StartBackupJob -> StartBackupJob -> Bool)
-> (StartBackupJob -> StartBackupJob -> Bool) -> Eq StartBackupJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartBackupJob -> StartBackupJob -> Bool
$c/= :: StartBackupJob -> StartBackupJob -> Bool
== :: StartBackupJob -> StartBackupJob -> Bool
$c== :: StartBackupJob -> StartBackupJob -> Bool
Prelude.Eq, Int -> StartBackupJob -> ShowS
[StartBackupJob] -> ShowS
StartBackupJob -> String
(Int -> StartBackupJob -> ShowS)
-> (StartBackupJob -> String)
-> ([StartBackupJob] -> ShowS)
-> Show StartBackupJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartBackupJob] -> ShowS
$cshowList :: [StartBackupJob] -> ShowS
show :: StartBackupJob -> String
$cshow :: StartBackupJob -> String
showsPrec :: Int -> StartBackupJob -> ShowS
$cshowsPrec :: Int -> StartBackupJob -> ShowS
Prelude.Show, (forall x. StartBackupJob -> Rep StartBackupJob x)
-> (forall x. Rep StartBackupJob x -> StartBackupJob)
-> Generic StartBackupJob
forall x. Rep StartBackupJob x -> StartBackupJob
forall x. StartBackupJob -> Rep StartBackupJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartBackupJob x -> StartBackupJob
$cfrom :: forall x. StartBackupJob -> Rep StartBackupJob x
Prelude.Generic)

-- |
-- Create a value of 'StartBackupJob' 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:
--
-- 'idempotencyToken', 'startBackupJob_idempotencyToken' - A customer-chosen string that you can use to distinguish between
-- otherwise identical calls to @StartBackupJob@. Retrying a successful
-- request with the same idempotency token results in a success message
-- with no action taken.
--
-- 'lifecycle', 'startBackupJob_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold
-- storage and when it expires. Backup will transition and expire backups
-- automatically according to the lifecycle that you define.
--
-- Backups transitioned to cold storage must be stored in cold storage for
-- a minimum of 90 days. Therefore, the “expire after days” setting must be
-- 90 days greater than the “transition to cold after days” setting. The
-- “transition to cold after days” setting cannot be changed after a backup
-- has been transitioned to cold.
--
-- Only Amazon EFS file system backups can be transitioned to cold storage.
--
-- 'recoveryPointTags', 'startBackupJob_recoveryPointTags' - To help organize your resources, you can assign your own metadata to the
-- resources that you create. Each tag is a key-value pair.
--
-- 'completeWindowMinutes', 'startBackupJob_completeWindowMinutes' - A value in minutes during which a successfully started backup must
-- complete, or else AWS Backup will cancel the job. This value is
-- optional. This value begins counting down from when the backup was
-- scheduled. It does not add additional time for @StartWindowMinutes@, or
-- if the backup started later than scheduled.
--
-- 'backupOptions', 'startBackupJob_backupOptions' - Specifies the backup option for a selected resource. This option is only
-- available for Windows Volume Shadow Copy Service (VSS) backup jobs.
--
-- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the
-- @WindowsVSS@ backup option and create a Windows VSS backup. Set to
-- @\"WindowsVSS\"\"disabled\"@ to create a regular backup. The
-- @WindowsVSS@ option is not enabled by default.
--
-- 'startWindowMinutes', 'startBackupJob_startWindowMinutes' - A value in minutes after a backup is scheduled before a job will be
-- canceled if it doesn\'t start successfully. This value is optional, and
-- the default is 8 hours.
--
-- 'backupVaultName', 'startBackupJob_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.
--
-- 'resourceArn', 'startBackupJob_resourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
--
-- 'iamRoleArn', 'startBackupJob_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for
-- example, @arn:aws:iam::123456789012:role\/S3Access@.
newStartBackupJob ::
  -- | 'backupVaultName'
  Prelude.Text ->
  -- | 'resourceArn'
  Prelude.Text ->
  -- | 'iamRoleArn'
  Prelude.Text ->
  StartBackupJob
newStartBackupJob :: Text -> Text -> Text -> StartBackupJob
newStartBackupJob
  Text
pBackupVaultName_
  Text
pResourceArn_
  Text
pIamRoleArn_ =
    StartBackupJob' :: Maybe Text
-> Maybe Lifecycle
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Integer
-> Maybe (HashMap Text Text)
-> Maybe Integer
-> Text
-> Text
-> Text
-> StartBackupJob
StartBackupJob'
      { $sel:idempotencyToken:StartBackupJob' :: Maybe Text
idempotencyToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:lifecycle:StartBackupJob' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
forall a. Maybe a
Prelude.Nothing,
        $sel:recoveryPointTags:StartBackupJob' :: Maybe (Sensitive (HashMap Text Text))
recoveryPointTags = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
        $sel:completeWindowMinutes:StartBackupJob' :: Maybe Integer
completeWindowMinutes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
        $sel:backupOptions:StartBackupJob' :: Maybe (HashMap Text Text)
backupOptions = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:startWindowMinutes:StartBackupJob' :: Maybe Integer
startWindowMinutes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
        $sel:backupVaultName:StartBackupJob' :: Text
backupVaultName = Text
pBackupVaultName_,
        $sel:resourceArn:StartBackupJob' :: Text
resourceArn = Text
pResourceArn_,
        $sel:iamRoleArn:StartBackupJob' :: Text
iamRoleArn = Text
pIamRoleArn_
      }

-- | A customer-chosen string that you can use to distinguish between
-- otherwise identical calls to @StartBackupJob@. Retrying a successful
-- request with the same idempotency token results in a success message
-- with no action taken.
startBackupJob_idempotencyToken :: Lens.Lens' StartBackupJob (Prelude.Maybe Prelude.Text)
startBackupJob_idempotencyToken :: (Maybe Text -> f (Maybe Text))
-> StartBackupJob -> f StartBackupJob
startBackupJob_idempotencyToken = (StartBackupJob -> Maybe Text)
-> (StartBackupJob -> Maybe Text -> StartBackupJob)
-> Lens StartBackupJob StartBackupJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBackupJob' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:StartBackupJob' :: StartBackupJob -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: StartBackupJob
s@StartBackupJob' {} Maybe Text
a -> StartBackupJob
s {$sel:idempotencyToken:StartBackupJob' :: Maybe Text
idempotencyToken = Maybe Text
a} :: StartBackupJob)

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

-- | To help organize your resources, you can assign your own metadata to the
-- resources that you create. Each tag is a key-value pair.
startBackupJob_recoveryPointTags :: Lens.Lens' StartBackupJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startBackupJob_recoveryPointTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartBackupJob -> f StartBackupJob
startBackupJob_recoveryPointTags = (StartBackupJob -> Maybe (Sensitive (HashMap Text Text)))
-> (StartBackupJob
    -> Maybe (Sensitive (HashMap Text Text)) -> StartBackupJob)
-> Lens
     StartBackupJob
     StartBackupJob
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBackupJob' {Maybe (Sensitive (HashMap Text Text))
recoveryPointTags :: Maybe (Sensitive (HashMap Text Text))
$sel:recoveryPointTags:StartBackupJob' :: StartBackupJob -> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags} -> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags) (\s :: StartBackupJob
s@StartBackupJob' {} Maybe (Sensitive (HashMap Text Text))
a -> StartBackupJob
s {$sel:recoveryPointTags:StartBackupJob' :: Maybe (Sensitive (HashMap Text Text))
recoveryPointTags = Maybe (Sensitive (HashMap Text Text))
a} :: StartBackupJob) ((Maybe (Sensitive (HashMap Text Text))
  -> f (Maybe (Sensitive (HashMap Text Text))))
 -> StartBackupJob -> f StartBackupJob)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (Sensitive (HashMap Text Text))
    -> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartBackupJob
-> f StartBackupJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (Sensitive (HashMap Text Text)))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
  (Sensitive (HashMap Text Text))
  (Sensitive (HashMap Text Text))
  (HashMap Text Text)
  (HashMap Text Text)
-> (Exchange
      (HashMap Text Text)
      (HashMap Text Text)
      (HashMap Text Text)
      (Identity (HashMap Text Text))
    -> Exchange
         (HashMap Text Text)
         (HashMap Text Text)
         (HashMap Text Text)
         (Identity (HashMap Text Text)))
-> AnIso
     (Sensitive (HashMap Text Text))
     (Sensitive (HashMap Text Text))
     (HashMap Text Text)
     (HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (Identity (HashMap Text Text))
-> Exchange
     (HashMap Text Text)
     (HashMap Text Text)
     (HashMap Text Text)
     (Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | A value in minutes during which a successfully started backup must
-- complete, or else AWS Backup will cancel the job. This value is
-- optional. This value begins counting down from when the backup was
-- scheduled. It does not add additional time for @StartWindowMinutes@, or
-- if the backup started later than scheduled.
startBackupJob_completeWindowMinutes :: Lens.Lens' StartBackupJob (Prelude.Maybe Prelude.Integer)
startBackupJob_completeWindowMinutes :: (Maybe Integer -> f (Maybe Integer))
-> StartBackupJob -> f StartBackupJob
startBackupJob_completeWindowMinutes = (StartBackupJob -> Maybe Integer)
-> (StartBackupJob -> Maybe Integer -> StartBackupJob)
-> Lens
     StartBackupJob StartBackupJob (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBackupJob' {Maybe Integer
completeWindowMinutes :: Maybe Integer
$sel:completeWindowMinutes:StartBackupJob' :: StartBackupJob -> Maybe Integer
completeWindowMinutes} -> Maybe Integer
completeWindowMinutes) (\s :: StartBackupJob
s@StartBackupJob' {} Maybe Integer
a -> StartBackupJob
s {$sel:completeWindowMinutes:StartBackupJob' :: Maybe Integer
completeWindowMinutes = Maybe Integer
a} :: StartBackupJob)

-- | Specifies the backup option for a selected resource. This option is only
-- available for Windows Volume Shadow Copy Service (VSS) backup jobs.
--
-- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the
-- @WindowsVSS@ backup option and create a Windows VSS backup. Set to
-- @\"WindowsVSS\"\"disabled\"@ to create a regular backup. The
-- @WindowsVSS@ option is not enabled by default.
startBackupJob_backupOptions :: Lens.Lens' StartBackupJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startBackupJob_backupOptions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartBackupJob -> f StartBackupJob
startBackupJob_backupOptions = (StartBackupJob -> Maybe (HashMap Text Text))
-> (StartBackupJob -> Maybe (HashMap Text Text) -> StartBackupJob)
-> Lens
     StartBackupJob
     StartBackupJob
     (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 (\StartBackupJob' {Maybe (HashMap Text Text)
backupOptions :: Maybe (HashMap Text Text)
$sel:backupOptions:StartBackupJob' :: StartBackupJob -> Maybe (HashMap Text Text)
backupOptions} -> Maybe (HashMap Text Text)
backupOptions) (\s :: StartBackupJob
s@StartBackupJob' {} Maybe (HashMap Text Text)
a -> StartBackupJob
s {$sel:backupOptions:StartBackupJob' :: Maybe (HashMap Text Text)
backupOptions = Maybe (HashMap Text Text)
a} :: StartBackupJob) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StartBackupJob -> f StartBackupJob)
-> ((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)))
-> StartBackupJob
-> f StartBackupJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Exchange
   (HashMap Text Text)
   (HashMap Text Text)
   (HashMap Text Text)
   (Identity (HashMap Text Text))
 -> Exchange
      (HashMap Text Text)
      (HashMap Text Text)
      (HashMap Text Text)
      (Identity (HashMap Text Text)))
-> 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 Exchange
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (Identity (HashMap Text Text))
-> Exchange
     (HashMap Text Text)
     (HashMap Text Text)
     (HashMap Text Text)
     (Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value in minutes after a backup is scheduled before a job will be
-- canceled if it doesn\'t start successfully. This value is optional, and
-- the default is 8 hours.
startBackupJob_startWindowMinutes :: Lens.Lens' StartBackupJob (Prelude.Maybe Prelude.Integer)
startBackupJob_startWindowMinutes :: (Maybe Integer -> f (Maybe Integer))
-> StartBackupJob -> f StartBackupJob
startBackupJob_startWindowMinutes = (StartBackupJob -> Maybe Integer)
-> (StartBackupJob -> Maybe Integer -> StartBackupJob)
-> Lens
     StartBackupJob StartBackupJob (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBackupJob' {Maybe Integer
startWindowMinutes :: Maybe Integer
$sel:startWindowMinutes:StartBackupJob' :: StartBackupJob -> Maybe Integer
startWindowMinutes} -> Maybe Integer
startWindowMinutes) (\s :: StartBackupJob
s@StartBackupJob' {} Maybe Integer
a -> StartBackupJob
s {$sel:startWindowMinutes:StartBackupJob' :: Maybe Integer
startWindowMinutes = Maybe Integer
a} :: StartBackupJob)

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

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

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

instance Core.AWSRequest StartBackupJob where
  type
    AWSResponse StartBackupJob =
      StartBackupJobResponse
  request :: StartBackupJob -> Request StartBackupJob
request = Service -> StartBackupJob -> Request StartBackupJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartBackupJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartBackupJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartBackupJob))
-> Logger
-> Service
-> Proxy StartBackupJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartBackupJob)))
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 Text -> Maybe POSIX -> Int -> StartBackupJobResponse
StartBackupJobResponse'
            (Maybe Text
 -> Maybe Text -> Maybe POSIX -> Int -> StartBackupJobResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe POSIX -> Int -> StartBackupJobResponse)
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
"BackupJobId")
            Either
  String (Maybe Text -> Maybe POSIX -> Int -> StartBackupJobResponse)
-> Either String (Maybe Text)
-> Either String (Maybe POSIX -> Int -> StartBackupJobResponse)
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 POSIX -> Int -> StartBackupJobResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> StartBackupJobResponse)
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 (Int -> StartBackupJobResponse)
-> Either String Int -> Either String StartBackupJobResponse
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 StartBackupJob

instance Prelude.NFData StartBackupJob

instance Core.ToHeaders StartBackupJob where
  toHeaders :: StartBackupJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartBackupJob -> 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.ToJSON StartBackupJob where
  toJSON :: StartBackupJob -> Value
toJSON StartBackupJob' {Maybe Integer
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text Text))
Maybe Lifecycle
Text
iamRoleArn :: Text
resourceArn :: Text
backupVaultName :: Text
startWindowMinutes :: Maybe Integer
backupOptions :: Maybe (HashMap Text Text)
completeWindowMinutes :: Maybe Integer
recoveryPointTags :: Maybe (Sensitive (HashMap Text Text))
lifecycle :: Maybe Lifecycle
idempotencyToken :: Maybe Text
$sel:iamRoleArn:StartBackupJob' :: StartBackupJob -> Text
$sel:resourceArn:StartBackupJob' :: StartBackupJob -> Text
$sel:backupVaultName:StartBackupJob' :: StartBackupJob -> Text
$sel:startWindowMinutes:StartBackupJob' :: StartBackupJob -> Maybe Integer
$sel:backupOptions:StartBackupJob' :: StartBackupJob -> Maybe (HashMap Text Text)
$sel:completeWindowMinutes:StartBackupJob' :: StartBackupJob -> Maybe Integer
$sel:recoveryPointTags:StartBackupJob' :: StartBackupJob -> Maybe (Sensitive (HashMap Text Text))
$sel:lifecycle:StartBackupJob' :: StartBackupJob -> Maybe Lifecycle
$sel:idempotencyToken:StartBackupJob' :: StartBackupJob -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
idempotencyToken,
            (Text
"Lifecycle" Text -> Lifecycle -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Lifecycle -> Pair) -> Maybe Lifecycle -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Lifecycle
lifecycle,
            (Text
"RecoveryPointTags" Text -> Sensitive (HashMap Text Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive (HashMap Text Text) -> Pair)
-> Maybe (Sensitive (HashMap Text Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
recoveryPointTags,
            (Text
"CompleteWindowMinutes" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
completeWindowMinutes,
            (Text
"BackupOptions" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
backupOptions,
            (Text
"StartWindowMinutes" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
startWindowMinutes,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"BackupVaultName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
backupVaultName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ResourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IamRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
iamRoleArn)
          ]
      )

instance Core.ToPath StartBackupJob where
  toPath :: StartBackupJob -> ByteString
toPath = ByteString -> StartBackupJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/backup-jobs"

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

-- | /See:/ 'newStartBackupJobResponse' smart constructor.
data StartBackupJobResponse = StartBackupJobResponse'
  { -- | Uniquely identifies a request to Backup to back up a resource.
    StartBackupJobResponse -> Maybe Text
backupJobId :: 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@.
    StartBackupJobResponse -> Maybe Text
recoveryPointArn :: Prelude.Maybe Prelude.Text,
    -- | 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.
    StartBackupJobResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    StartBackupJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartBackupJobResponse -> StartBackupJobResponse -> Bool
(StartBackupJobResponse -> StartBackupJobResponse -> Bool)
-> (StartBackupJobResponse -> StartBackupJobResponse -> Bool)
-> Eq StartBackupJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartBackupJobResponse -> StartBackupJobResponse -> Bool
$c/= :: StartBackupJobResponse -> StartBackupJobResponse -> Bool
== :: StartBackupJobResponse -> StartBackupJobResponse -> Bool
$c== :: StartBackupJobResponse -> StartBackupJobResponse -> Bool
Prelude.Eq, ReadPrec [StartBackupJobResponse]
ReadPrec StartBackupJobResponse
Int -> ReadS StartBackupJobResponse
ReadS [StartBackupJobResponse]
(Int -> ReadS StartBackupJobResponse)
-> ReadS [StartBackupJobResponse]
-> ReadPrec StartBackupJobResponse
-> ReadPrec [StartBackupJobResponse]
-> Read StartBackupJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartBackupJobResponse]
$creadListPrec :: ReadPrec [StartBackupJobResponse]
readPrec :: ReadPrec StartBackupJobResponse
$creadPrec :: ReadPrec StartBackupJobResponse
readList :: ReadS [StartBackupJobResponse]
$creadList :: ReadS [StartBackupJobResponse]
readsPrec :: Int -> ReadS StartBackupJobResponse
$creadsPrec :: Int -> ReadS StartBackupJobResponse
Prelude.Read, Int -> StartBackupJobResponse -> ShowS
[StartBackupJobResponse] -> ShowS
StartBackupJobResponse -> String
(Int -> StartBackupJobResponse -> ShowS)
-> (StartBackupJobResponse -> String)
-> ([StartBackupJobResponse] -> ShowS)
-> Show StartBackupJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartBackupJobResponse] -> ShowS
$cshowList :: [StartBackupJobResponse] -> ShowS
show :: StartBackupJobResponse -> String
$cshow :: StartBackupJobResponse -> String
showsPrec :: Int -> StartBackupJobResponse -> ShowS
$cshowsPrec :: Int -> StartBackupJobResponse -> ShowS
Prelude.Show, (forall x. StartBackupJobResponse -> Rep StartBackupJobResponse x)
-> (forall x.
    Rep StartBackupJobResponse x -> StartBackupJobResponse)
-> Generic StartBackupJobResponse
forall x. Rep StartBackupJobResponse x -> StartBackupJobResponse
forall x. StartBackupJobResponse -> Rep StartBackupJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartBackupJobResponse x -> StartBackupJobResponse
$cfrom :: forall x. StartBackupJobResponse -> Rep StartBackupJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartBackupJobResponse' 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', 'startBackupJobResponse_backupJobId' - Uniquely identifies a request to Backup to back up a resource.
--
-- 'recoveryPointArn', 'startBackupJobResponse_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@.
--
-- 'creationDate', 'startBackupJobResponse_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.
--
-- 'httpStatus', 'startBackupJobResponse_httpStatus' - The response's http status code.
newStartBackupJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartBackupJobResponse
newStartBackupJobResponse :: Int -> StartBackupJobResponse
newStartBackupJobResponse Int
pHttpStatus_ =
  StartBackupJobResponse' :: Maybe Text
-> Maybe Text -> Maybe POSIX -> Int -> StartBackupJobResponse
StartBackupJobResponse'
    { $sel:backupJobId:StartBackupJobResponse' :: Maybe Text
backupJobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryPointArn:StartBackupJobResponse' :: Maybe Text
recoveryPointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:StartBackupJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartBackupJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | 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.
startBackupJobResponse_creationDate :: Lens.Lens' StartBackupJobResponse (Prelude.Maybe Prelude.UTCTime)
startBackupJobResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartBackupJobResponse -> f StartBackupJobResponse
startBackupJobResponse_creationDate = (StartBackupJobResponse -> Maybe POSIX)
-> (StartBackupJobResponse
    -> Maybe POSIX -> StartBackupJobResponse)
-> Lens
     StartBackupJobResponse
     StartBackupJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBackupJobResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:StartBackupJobResponse' :: StartBackupJobResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: StartBackupJobResponse
s@StartBackupJobResponse' {} Maybe POSIX
a -> StartBackupJobResponse
s {$sel:creationDate:StartBackupJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: StartBackupJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> StartBackupJobResponse -> f StartBackupJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartBackupJobResponse
-> f StartBackupJobResponse
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.
startBackupJobResponse_httpStatus :: Lens.Lens' StartBackupJobResponse Prelude.Int
startBackupJobResponse_httpStatus :: (Int -> f Int)
-> StartBackupJobResponse -> f StartBackupJobResponse
startBackupJobResponse_httpStatus = (StartBackupJobResponse -> Int)
-> (StartBackupJobResponse -> Int -> StartBackupJobResponse)
-> Lens StartBackupJobResponse StartBackupJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBackupJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartBackupJobResponse' :: StartBackupJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartBackupJobResponse
s@StartBackupJobResponse' {} Int
a -> StartBackupJobResponse
s {$sel:httpStatus:StartBackupJobResponse' :: Int
httpStatus = Int
a} :: StartBackupJobResponse)

instance Prelude.NFData StartBackupJobResponse