{-# 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.DeleteBackupPlan
-- 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)
--
-- Deletes a backup plan. A backup plan can only be deleted after all
-- associated selections of resources have been deleted. Deleting a backup
-- plan deletes the current version of a backup plan. Previous versions, if
-- any, will still exist.
module Amazonka.Backup.DeleteBackupPlan
  ( -- * Creating a Request
    DeleteBackupPlan (..),
    newDeleteBackupPlan,

    -- * Request Lenses
    deleteBackupPlan_backupPlanId,

    -- * Destructuring the Response
    DeleteBackupPlanResponse (..),
    newDeleteBackupPlanResponse,

    -- * Response Lenses
    deleteBackupPlanResponse_versionId,
    deleteBackupPlanResponse_backupPlanId,
    deleteBackupPlanResponse_backupPlanArn,
    deleteBackupPlanResponse_deletionDate,
    deleteBackupPlanResponse_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:/ 'newDeleteBackupPlan' smart constructor.
data DeleteBackupPlan = DeleteBackupPlan'
  { -- | Uniquely identifies a backup plan.
    DeleteBackupPlan -> Text
backupPlanId :: Prelude.Text
  }
  deriving (DeleteBackupPlan -> DeleteBackupPlan -> Bool
(DeleteBackupPlan -> DeleteBackupPlan -> Bool)
-> (DeleteBackupPlan -> DeleteBackupPlan -> Bool)
-> Eq DeleteBackupPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBackupPlan -> DeleteBackupPlan -> Bool
$c/= :: DeleteBackupPlan -> DeleteBackupPlan -> Bool
== :: DeleteBackupPlan -> DeleteBackupPlan -> Bool
$c== :: DeleteBackupPlan -> DeleteBackupPlan -> Bool
Prelude.Eq, ReadPrec [DeleteBackupPlan]
ReadPrec DeleteBackupPlan
Int -> ReadS DeleteBackupPlan
ReadS [DeleteBackupPlan]
(Int -> ReadS DeleteBackupPlan)
-> ReadS [DeleteBackupPlan]
-> ReadPrec DeleteBackupPlan
-> ReadPrec [DeleteBackupPlan]
-> Read DeleteBackupPlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBackupPlan]
$creadListPrec :: ReadPrec [DeleteBackupPlan]
readPrec :: ReadPrec DeleteBackupPlan
$creadPrec :: ReadPrec DeleteBackupPlan
readList :: ReadS [DeleteBackupPlan]
$creadList :: ReadS [DeleteBackupPlan]
readsPrec :: Int -> ReadS DeleteBackupPlan
$creadsPrec :: Int -> ReadS DeleteBackupPlan
Prelude.Read, Int -> DeleteBackupPlan -> ShowS
[DeleteBackupPlan] -> ShowS
DeleteBackupPlan -> String
(Int -> DeleteBackupPlan -> ShowS)
-> (DeleteBackupPlan -> String)
-> ([DeleteBackupPlan] -> ShowS)
-> Show DeleteBackupPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBackupPlan] -> ShowS
$cshowList :: [DeleteBackupPlan] -> ShowS
show :: DeleteBackupPlan -> String
$cshow :: DeleteBackupPlan -> String
showsPrec :: Int -> DeleteBackupPlan -> ShowS
$cshowsPrec :: Int -> DeleteBackupPlan -> ShowS
Prelude.Show, (forall x. DeleteBackupPlan -> Rep DeleteBackupPlan x)
-> (forall x. Rep DeleteBackupPlan x -> DeleteBackupPlan)
-> Generic DeleteBackupPlan
forall x. Rep DeleteBackupPlan x -> DeleteBackupPlan
forall x. DeleteBackupPlan -> Rep DeleteBackupPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBackupPlan x -> DeleteBackupPlan
$cfrom :: forall x. DeleteBackupPlan -> Rep DeleteBackupPlan x
Prelude.Generic)

-- |
-- Create a value of 'DeleteBackupPlan' 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:
--
-- 'backupPlanId', 'deleteBackupPlan_backupPlanId' - Uniquely identifies a backup plan.
newDeleteBackupPlan ::
  -- | 'backupPlanId'
  Prelude.Text ->
  DeleteBackupPlan
newDeleteBackupPlan :: Text -> DeleteBackupPlan
newDeleteBackupPlan Text
pBackupPlanId_ =
  DeleteBackupPlan' :: Text -> DeleteBackupPlan
DeleteBackupPlan' {$sel:backupPlanId:DeleteBackupPlan' :: Text
backupPlanId = Text
pBackupPlanId_}

-- | Uniquely identifies a backup plan.
deleteBackupPlan_backupPlanId :: Lens.Lens' DeleteBackupPlan Prelude.Text
deleteBackupPlan_backupPlanId :: (Text -> f Text) -> DeleteBackupPlan -> f DeleteBackupPlan
deleteBackupPlan_backupPlanId = (DeleteBackupPlan -> Text)
-> (DeleteBackupPlan -> Text -> DeleteBackupPlan)
-> Lens DeleteBackupPlan DeleteBackupPlan Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackupPlan' {Text
backupPlanId :: Text
$sel:backupPlanId:DeleteBackupPlan' :: DeleteBackupPlan -> Text
backupPlanId} -> Text
backupPlanId) (\s :: DeleteBackupPlan
s@DeleteBackupPlan' {} Text
a -> DeleteBackupPlan
s {$sel:backupPlanId:DeleteBackupPlan' :: Text
backupPlanId = Text
a} :: DeleteBackupPlan)

instance Core.AWSRequest DeleteBackupPlan where
  type
    AWSResponse DeleteBackupPlan =
      DeleteBackupPlanResponse
  request :: DeleteBackupPlan -> Request DeleteBackupPlan
request = Service -> DeleteBackupPlan -> Request DeleteBackupPlan
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteBackupPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBackupPlan)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteBackupPlan))
-> Logger
-> Service
-> Proxy DeleteBackupPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBackupPlan)))
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 Text
-> Maybe POSIX
-> Int
-> DeleteBackupPlanResponse
DeleteBackupPlanResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> DeleteBackupPlanResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe POSIX -> Int -> DeleteBackupPlanResponse)
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
"VersionId")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe POSIX -> Int -> DeleteBackupPlanResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe POSIX -> Int -> DeleteBackupPlanResponse)
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
"BackupPlanId")
            Either
  String
  (Maybe Text -> Maybe POSIX -> Int -> DeleteBackupPlanResponse)
-> Either String (Maybe Text)
-> Either String (Maybe POSIX -> Int -> DeleteBackupPlanResponse)
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
"BackupPlanArn")
            Either String (Maybe POSIX -> Int -> DeleteBackupPlanResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> DeleteBackupPlanResponse)
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
"DeletionDate")
            Either String (Int -> DeleteBackupPlanResponse)
-> Either String Int -> Either String DeleteBackupPlanResponse
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 DeleteBackupPlan

instance Prelude.NFData DeleteBackupPlan

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

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

-- | /See:/ 'newDeleteBackupPlanResponse' smart constructor.
data DeleteBackupPlanResponse = DeleteBackupPlanResponse'
  { -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
    -- most 1,024 bytes long. Version IDs cannot be edited.
    DeleteBackupPlanResponse -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
    -- | Uniquely identifies a backup plan.
    DeleteBackupPlanResponse -> Maybe Text
backupPlanId :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
    -- for example,
    -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.
    DeleteBackupPlanResponse -> Maybe Text
backupPlanArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time a backup plan is deleted, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @DeletionDate@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    DeleteBackupPlanResponse -> Maybe POSIX
deletionDate :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DeleteBackupPlanResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool
(DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool)
-> (DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool)
-> Eq DeleteBackupPlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool
$c/= :: DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool
== :: DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool
$c== :: DeleteBackupPlanResponse -> DeleteBackupPlanResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBackupPlanResponse]
ReadPrec DeleteBackupPlanResponse
Int -> ReadS DeleteBackupPlanResponse
ReadS [DeleteBackupPlanResponse]
(Int -> ReadS DeleteBackupPlanResponse)
-> ReadS [DeleteBackupPlanResponse]
-> ReadPrec DeleteBackupPlanResponse
-> ReadPrec [DeleteBackupPlanResponse]
-> Read DeleteBackupPlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBackupPlanResponse]
$creadListPrec :: ReadPrec [DeleteBackupPlanResponse]
readPrec :: ReadPrec DeleteBackupPlanResponse
$creadPrec :: ReadPrec DeleteBackupPlanResponse
readList :: ReadS [DeleteBackupPlanResponse]
$creadList :: ReadS [DeleteBackupPlanResponse]
readsPrec :: Int -> ReadS DeleteBackupPlanResponse
$creadsPrec :: Int -> ReadS DeleteBackupPlanResponse
Prelude.Read, Int -> DeleteBackupPlanResponse -> ShowS
[DeleteBackupPlanResponse] -> ShowS
DeleteBackupPlanResponse -> String
(Int -> DeleteBackupPlanResponse -> ShowS)
-> (DeleteBackupPlanResponse -> String)
-> ([DeleteBackupPlanResponse] -> ShowS)
-> Show DeleteBackupPlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBackupPlanResponse] -> ShowS
$cshowList :: [DeleteBackupPlanResponse] -> ShowS
show :: DeleteBackupPlanResponse -> String
$cshow :: DeleteBackupPlanResponse -> String
showsPrec :: Int -> DeleteBackupPlanResponse -> ShowS
$cshowsPrec :: Int -> DeleteBackupPlanResponse -> ShowS
Prelude.Show, (forall x.
 DeleteBackupPlanResponse -> Rep DeleteBackupPlanResponse x)
-> (forall x.
    Rep DeleteBackupPlanResponse x -> DeleteBackupPlanResponse)
-> Generic DeleteBackupPlanResponse
forall x.
Rep DeleteBackupPlanResponse x -> DeleteBackupPlanResponse
forall x.
DeleteBackupPlanResponse -> Rep DeleteBackupPlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteBackupPlanResponse x -> DeleteBackupPlanResponse
$cfrom :: forall x.
DeleteBackupPlanResponse -> Rep DeleteBackupPlanResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteBackupPlanResponse' 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:
--
-- 'versionId', 'deleteBackupPlanResponse_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
-- most 1,024 bytes long. Version IDs cannot be edited.
--
-- 'backupPlanId', 'deleteBackupPlanResponse_backupPlanId' - Uniquely identifies a backup plan.
--
-- 'backupPlanArn', 'deleteBackupPlanResponse_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
-- for example,
-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.
--
-- 'deletionDate', 'deleteBackupPlanResponse_deletionDate' - The date and time a backup plan is deleted, in Unix format and
-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'httpStatus', 'deleteBackupPlanResponse_httpStatus' - The response's http status code.
newDeleteBackupPlanResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteBackupPlanResponse
newDeleteBackupPlanResponse :: Int -> DeleteBackupPlanResponse
newDeleteBackupPlanResponse Int
pHttpStatus_ =
  DeleteBackupPlanResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> DeleteBackupPlanResponse
DeleteBackupPlanResponse'
    { $sel:versionId:DeleteBackupPlanResponse' :: Maybe Text
versionId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanId:DeleteBackupPlanResponse' :: Maybe Text
backupPlanId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanArn:DeleteBackupPlanResponse' :: Maybe Text
backupPlanArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deletionDate:DeleteBackupPlanResponse' :: Maybe POSIX
deletionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteBackupPlanResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
-- most 1,024 bytes long. Version IDs cannot be edited.
deleteBackupPlanResponse_versionId :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.Text)
deleteBackupPlanResponse_versionId :: (Maybe Text -> f (Maybe Text))
-> DeleteBackupPlanResponse -> f DeleteBackupPlanResponse
deleteBackupPlanResponse_versionId = (DeleteBackupPlanResponse -> Maybe Text)
-> (DeleteBackupPlanResponse
    -> Maybe Text -> DeleteBackupPlanResponse)
-> Lens
     DeleteBackupPlanResponse
     DeleteBackupPlanResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackupPlanResponse' {Maybe Text
versionId :: Maybe Text
$sel:versionId:DeleteBackupPlanResponse' :: DeleteBackupPlanResponse -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: DeleteBackupPlanResponse
s@DeleteBackupPlanResponse' {} Maybe Text
a -> DeleteBackupPlanResponse
s {$sel:versionId:DeleteBackupPlanResponse' :: Maybe Text
versionId = Maybe Text
a} :: DeleteBackupPlanResponse)

-- | Uniquely identifies a backup plan.
deleteBackupPlanResponse_backupPlanId :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.Text)
deleteBackupPlanResponse_backupPlanId :: (Maybe Text -> f (Maybe Text))
-> DeleteBackupPlanResponse -> f DeleteBackupPlanResponse
deleteBackupPlanResponse_backupPlanId = (DeleteBackupPlanResponse -> Maybe Text)
-> (DeleteBackupPlanResponse
    -> Maybe Text -> DeleteBackupPlanResponse)
-> Lens
     DeleteBackupPlanResponse
     DeleteBackupPlanResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackupPlanResponse' {Maybe Text
backupPlanId :: Maybe Text
$sel:backupPlanId:DeleteBackupPlanResponse' :: DeleteBackupPlanResponse -> Maybe Text
backupPlanId} -> Maybe Text
backupPlanId) (\s :: DeleteBackupPlanResponse
s@DeleteBackupPlanResponse' {} Maybe Text
a -> DeleteBackupPlanResponse
s {$sel:backupPlanId:DeleteBackupPlanResponse' :: Maybe Text
backupPlanId = Maybe Text
a} :: DeleteBackupPlanResponse)

-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
-- for example,
-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.
deleteBackupPlanResponse_backupPlanArn :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.Text)
deleteBackupPlanResponse_backupPlanArn :: (Maybe Text -> f (Maybe Text))
-> DeleteBackupPlanResponse -> f DeleteBackupPlanResponse
deleteBackupPlanResponse_backupPlanArn = (DeleteBackupPlanResponse -> Maybe Text)
-> (DeleteBackupPlanResponse
    -> Maybe Text -> DeleteBackupPlanResponse)
-> Lens
     DeleteBackupPlanResponse
     DeleteBackupPlanResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackupPlanResponse' {Maybe Text
backupPlanArn :: Maybe Text
$sel:backupPlanArn:DeleteBackupPlanResponse' :: DeleteBackupPlanResponse -> Maybe Text
backupPlanArn} -> Maybe Text
backupPlanArn) (\s :: DeleteBackupPlanResponse
s@DeleteBackupPlanResponse' {} Maybe Text
a -> DeleteBackupPlanResponse
s {$sel:backupPlanArn:DeleteBackupPlanResponse' :: Maybe Text
backupPlanArn = Maybe Text
a} :: DeleteBackupPlanResponse)

-- | The date and time a backup plan is deleted, in Unix format and
-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
deleteBackupPlanResponse_deletionDate :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)
deleteBackupPlanResponse_deletionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteBackupPlanResponse -> f DeleteBackupPlanResponse
deleteBackupPlanResponse_deletionDate = (DeleteBackupPlanResponse -> Maybe POSIX)
-> (DeleteBackupPlanResponse
    -> Maybe POSIX -> DeleteBackupPlanResponse)
-> Lens
     DeleteBackupPlanResponse
     DeleteBackupPlanResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackupPlanResponse' {Maybe POSIX
deletionDate :: Maybe POSIX
$sel:deletionDate:DeleteBackupPlanResponse' :: DeleteBackupPlanResponse -> Maybe POSIX
deletionDate} -> Maybe POSIX
deletionDate) (\s :: DeleteBackupPlanResponse
s@DeleteBackupPlanResponse' {} Maybe POSIX
a -> DeleteBackupPlanResponse
s {$sel:deletionDate:DeleteBackupPlanResponse' :: Maybe POSIX
deletionDate = Maybe POSIX
a} :: DeleteBackupPlanResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeleteBackupPlanResponse -> f DeleteBackupPlanResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteBackupPlanResponse
-> f DeleteBackupPlanResponse
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.
deleteBackupPlanResponse_httpStatus :: Lens.Lens' DeleteBackupPlanResponse Prelude.Int
deleteBackupPlanResponse_httpStatus :: (Int -> f Int)
-> DeleteBackupPlanResponse -> f DeleteBackupPlanResponse
deleteBackupPlanResponse_httpStatus = (DeleteBackupPlanResponse -> Int)
-> (DeleteBackupPlanResponse -> Int -> DeleteBackupPlanResponse)
-> Lens DeleteBackupPlanResponse DeleteBackupPlanResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBackupPlanResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteBackupPlanResponse' :: DeleteBackupPlanResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteBackupPlanResponse
s@DeleteBackupPlanResponse' {} Int
a -> DeleteBackupPlanResponse
s {$sel:httpStatus:DeleteBackupPlanResponse' :: Int
httpStatus = Int
a} :: DeleteBackupPlanResponse)

instance Prelude.NFData DeleteBackupPlanResponse