{-# 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.ListBackupPlans
-- 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 a list of all active backup plans for an authenticated account.
-- The list contains information such as Amazon Resource Names (ARNs), plan
-- IDs, creation and deletion dates, version IDs, plan names, and creator
-- request IDs.
module Amazonka.Backup.ListBackupPlans
  ( -- * Creating a Request
    ListBackupPlans (..),
    newListBackupPlans,

    -- * Request Lenses
    listBackupPlans_nextToken,
    listBackupPlans_maxResults,
    listBackupPlans_includeDeleted,

    -- * Destructuring the Response
    ListBackupPlansResponse (..),
    newListBackupPlansResponse,

    -- * Response Lenses
    listBackupPlansResponse_nextToken,
    listBackupPlansResponse_backupPlansList,
    listBackupPlansResponse_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:/ 'newListBackupPlans' smart constructor.
data ListBackupPlans = ListBackupPlans'
  { -- | The next item following a partial list of returned items. For example,
    -- if a request is made to return @maxResults@ number of items, @NextToken@
    -- allows you to return more items in your list starting at the location
    -- pointed to by the next token.
    ListBackupPlans -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to be returned.
    ListBackupPlans -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A Boolean value with a default value of @FALSE@ that returns deleted
    -- backup plans when set to @TRUE@.
    ListBackupPlans -> Maybe Bool
includeDeleted :: Prelude.Maybe Prelude.Bool
  }
  deriving (ListBackupPlans -> ListBackupPlans -> Bool
(ListBackupPlans -> ListBackupPlans -> Bool)
-> (ListBackupPlans -> ListBackupPlans -> Bool)
-> Eq ListBackupPlans
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBackupPlans -> ListBackupPlans -> Bool
$c/= :: ListBackupPlans -> ListBackupPlans -> Bool
== :: ListBackupPlans -> ListBackupPlans -> Bool
$c== :: ListBackupPlans -> ListBackupPlans -> Bool
Prelude.Eq, ReadPrec [ListBackupPlans]
ReadPrec ListBackupPlans
Int -> ReadS ListBackupPlans
ReadS [ListBackupPlans]
(Int -> ReadS ListBackupPlans)
-> ReadS [ListBackupPlans]
-> ReadPrec ListBackupPlans
-> ReadPrec [ListBackupPlans]
-> Read ListBackupPlans
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBackupPlans]
$creadListPrec :: ReadPrec [ListBackupPlans]
readPrec :: ReadPrec ListBackupPlans
$creadPrec :: ReadPrec ListBackupPlans
readList :: ReadS [ListBackupPlans]
$creadList :: ReadS [ListBackupPlans]
readsPrec :: Int -> ReadS ListBackupPlans
$creadsPrec :: Int -> ReadS ListBackupPlans
Prelude.Read, Int -> ListBackupPlans -> ShowS
[ListBackupPlans] -> ShowS
ListBackupPlans -> String
(Int -> ListBackupPlans -> ShowS)
-> (ListBackupPlans -> String)
-> ([ListBackupPlans] -> ShowS)
-> Show ListBackupPlans
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBackupPlans] -> ShowS
$cshowList :: [ListBackupPlans] -> ShowS
show :: ListBackupPlans -> String
$cshow :: ListBackupPlans -> String
showsPrec :: Int -> ListBackupPlans -> ShowS
$cshowsPrec :: Int -> ListBackupPlans -> ShowS
Prelude.Show, (forall x. ListBackupPlans -> Rep ListBackupPlans x)
-> (forall x. Rep ListBackupPlans x -> ListBackupPlans)
-> Generic ListBackupPlans
forall x. Rep ListBackupPlans x -> ListBackupPlans
forall x. ListBackupPlans -> Rep ListBackupPlans x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBackupPlans x -> ListBackupPlans
$cfrom :: forall x. ListBackupPlans -> Rep ListBackupPlans x
Prelude.Generic)

-- |
-- Create a value of 'ListBackupPlans' 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:
--
-- 'nextToken', 'listBackupPlans_nextToken' - The next item following a partial list of returned items. For example,
-- if a request is made to return @maxResults@ number of items, @NextToken@
-- allows you to return more items in your list starting at the location
-- pointed to by the next token.
--
-- 'maxResults', 'listBackupPlans_maxResults' - The maximum number of items to be returned.
--
-- 'includeDeleted', 'listBackupPlans_includeDeleted' - A Boolean value with a default value of @FALSE@ that returns deleted
-- backup plans when set to @TRUE@.
newListBackupPlans ::
  ListBackupPlans
newListBackupPlans :: ListBackupPlans
newListBackupPlans =
  ListBackupPlans' :: Maybe Text -> Maybe Natural -> Maybe Bool -> ListBackupPlans
ListBackupPlans'
    { $sel:nextToken:ListBackupPlans' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListBackupPlans' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:includeDeleted:ListBackupPlans' :: Maybe Bool
includeDeleted = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The next item following a partial list of returned items. For example,
-- if a request is made to return @maxResults@ number of items, @NextToken@
-- allows you to return more items in your list starting at the location
-- pointed to by the next token.
listBackupPlans_nextToken :: Lens.Lens' ListBackupPlans (Prelude.Maybe Prelude.Text)
listBackupPlans_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBackupPlans -> f ListBackupPlans
listBackupPlans_nextToken = (ListBackupPlans -> Maybe Text)
-> (ListBackupPlans -> Maybe Text -> ListBackupPlans)
-> Lens ListBackupPlans ListBackupPlans (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlans' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBackupPlans' :: ListBackupPlans -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBackupPlans
s@ListBackupPlans' {} Maybe Text
a -> ListBackupPlans
s {$sel:nextToken:ListBackupPlans' :: Maybe Text
nextToken = Maybe Text
a} :: ListBackupPlans)

-- | The maximum number of items to be returned.
listBackupPlans_maxResults :: Lens.Lens' ListBackupPlans (Prelude.Maybe Prelude.Natural)
listBackupPlans_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListBackupPlans -> f ListBackupPlans
listBackupPlans_maxResults = (ListBackupPlans -> Maybe Natural)
-> (ListBackupPlans -> Maybe Natural -> ListBackupPlans)
-> Lens
     ListBackupPlans ListBackupPlans (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlans' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBackupPlans' :: ListBackupPlans -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBackupPlans
s@ListBackupPlans' {} Maybe Natural
a -> ListBackupPlans
s {$sel:maxResults:ListBackupPlans' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBackupPlans)

-- | A Boolean value with a default value of @FALSE@ that returns deleted
-- backup plans when set to @TRUE@.
listBackupPlans_includeDeleted :: Lens.Lens' ListBackupPlans (Prelude.Maybe Prelude.Bool)
listBackupPlans_includeDeleted :: (Maybe Bool -> f (Maybe Bool))
-> ListBackupPlans -> f ListBackupPlans
listBackupPlans_includeDeleted = (ListBackupPlans -> Maybe Bool)
-> (ListBackupPlans -> Maybe Bool -> ListBackupPlans)
-> Lens ListBackupPlans ListBackupPlans (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlans' {Maybe Bool
includeDeleted :: Maybe Bool
$sel:includeDeleted:ListBackupPlans' :: ListBackupPlans -> Maybe Bool
includeDeleted} -> Maybe Bool
includeDeleted) (\s :: ListBackupPlans
s@ListBackupPlans' {} Maybe Bool
a -> ListBackupPlans
s {$sel:includeDeleted:ListBackupPlans' :: Maybe Bool
includeDeleted = Maybe Bool
a} :: ListBackupPlans)

instance Core.AWSRequest ListBackupPlans where
  type
    AWSResponse ListBackupPlans =
      ListBackupPlansResponse
  request :: ListBackupPlans -> Request ListBackupPlans
request = Service -> ListBackupPlans -> Request ListBackupPlans
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListBackupPlans
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListBackupPlans)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListBackupPlans))
-> Logger
-> Service
-> Proxy ListBackupPlans
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListBackupPlans)))
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 [BackupPlansListMember] -> Int -> ListBackupPlansResponse
ListBackupPlansResponse'
            (Maybe Text
 -> Maybe [BackupPlansListMember] -> Int -> ListBackupPlansResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [BackupPlansListMember] -> Int -> ListBackupPlansResponse)
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
"NextToken")
            Either
  String
  (Maybe [BackupPlansListMember] -> Int -> ListBackupPlansResponse)
-> Either String (Maybe [BackupPlansListMember])
-> Either String (Int -> ListBackupPlansResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [BackupPlansListMember]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BackupPlansList"
                            Either String (Maybe (Maybe [BackupPlansListMember]))
-> Maybe [BackupPlansListMember]
-> Either String (Maybe [BackupPlansListMember])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BackupPlansListMember]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListBackupPlansResponse)
-> Either String Int -> Either String ListBackupPlansResponse
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 ListBackupPlans

instance Prelude.NFData ListBackupPlans

instance Core.ToHeaders ListBackupPlans where
  toHeaders :: ListBackupPlans -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListBackupPlans -> 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 ListBackupPlans where
  toPath :: ListBackupPlans -> ByteString
toPath = ByteString -> ListBackupPlans -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/backup/plans/"

instance Core.ToQuery ListBackupPlans where
  toQuery :: ListBackupPlans -> QueryString
toQuery ListBackupPlans' {Maybe Bool
Maybe Natural
Maybe Text
includeDeleted :: Maybe Bool
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:includeDeleted:ListBackupPlans' :: ListBackupPlans -> Maybe Bool
$sel:maxResults:ListBackupPlans' :: ListBackupPlans -> Maybe Natural
$sel:nextToken:ListBackupPlans' :: ListBackupPlans -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
        ByteString
"includeDeleted" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
includeDeleted
      ]

-- | /See:/ 'newListBackupPlansResponse' smart constructor.
data ListBackupPlansResponse = ListBackupPlansResponse'
  { -- | The next item following a partial list of returned items. For example,
    -- if a request is made to return @maxResults@ number of items, @NextToken@
    -- allows you to return more items in your list starting at the location
    -- pointed to by the next token.
    ListBackupPlansResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of backup plan list items containing metadata about your saved
    -- backup plans.
    ListBackupPlansResponse -> Maybe [BackupPlansListMember]
backupPlansList :: Prelude.Maybe [BackupPlansListMember],
    -- | The response's http status code.
    ListBackupPlansResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBackupPlansResponse -> ListBackupPlansResponse -> Bool
(ListBackupPlansResponse -> ListBackupPlansResponse -> Bool)
-> (ListBackupPlansResponse -> ListBackupPlansResponse -> Bool)
-> Eq ListBackupPlansResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBackupPlansResponse -> ListBackupPlansResponse -> Bool
$c/= :: ListBackupPlansResponse -> ListBackupPlansResponse -> Bool
== :: ListBackupPlansResponse -> ListBackupPlansResponse -> Bool
$c== :: ListBackupPlansResponse -> ListBackupPlansResponse -> Bool
Prelude.Eq, ReadPrec [ListBackupPlansResponse]
ReadPrec ListBackupPlansResponse
Int -> ReadS ListBackupPlansResponse
ReadS [ListBackupPlansResponse]
(Int -> ReadS ListBackupPlansResponse)
-> ReadS [ListBackupPlansResponse]
-> ReadPrec ListBackupPlansResponse
-> ReadPrec [ListBackupPlansResponse]
-> Read ListBackupPlansResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBackupPlansResponse]
$creadListPrec :: ReadPrec [ListBackupPlansResponse]
readPrec :: ReadPrec ListBackupPlansResponse
$creadPrec :: ReadPrec ListBackupPlansResponse
readList :: ReadS [ListBackupPlansResponse]
$creadList :: ReadS [ListBackupPlansResponse]
readsPrec :: Int -> ReadS ListBackupPlansResponse
$creadsPrec :: Int -> ReadS ListBackupPlansResponse
Prelude.Read, Int -> ListBackupPlansResponse -> ShowS
[ListBackupPlansResponse] -> ShowS
ListBackupPlansResponse -> String
(Int -> ListBackupPlansResponse -> ShowS)
-> (ListBackupPlansResponse -> String)
-> ([ListBackupPlansResponse] -> ShowS)
-> Show ListBackupPlansResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBackupPlansResponse] -> ShowS
$cshowList :: [ListBackupPlansResponse] -> ShowS
show :: ListBackupPlansResponse -> String
$cshow :: ListBackupPlansResponse -> String
showsPrec :: Int -> ListBackupPlansResponse -> ShowS
$cshowsPrec :: Int -> ListBackupPlansResponse -> ShowS
Prelude.Show, (forall x.
 ListBackupPlansResponse -> Rep ListBackupPlansResponse x)
-> (forall x.
    Rep ListBackupPlansResponse x -> ListBackupPlansResponse)
-> Generic ListBackupPlansResponse
forall x. Rep ListBackupPlansResponse x -> ListBackupPlansResponse
forall x. ListBackupPlansResponse -> Rep ListBackupPlansResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBackupPlansResponse x -> ListBackupPlansResponse
$cfrom :: forall x. ListBackupPlansResponse -> Rep ListBackupPlansResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBackupPlansResponse' 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:
--
-- 'nextToken', 'listBackupPlansResponse_nextToken' - The next item following a partial list of returned items. For example,
-- if a request is made to return @maxResults@ number of items, @NextToken@
-- allows you to return more items in your list starting at the location
-- pointed to by the next token.
--
-- 'backupPlansList', 'listBackupPlansResponse_backupPlansList' - An array of backup plan list items containing metadata about your saved
-- backup plans.
--
-- 'httpStatus', 'listBackupPlansResponse_httpStatus' - The response's http status code.
newListBackupPlansResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBackupPlansResponse
newListBackupPlansResponse :: Int -> ListBackupPlansResponse
newListBackupPlansResponse Int
pHttpStatus_ =
  ListBackupPlansResponse' :: Maybe Text
-> Maybe [BackupPlansListMember] -> Int -> ListBackupPlansResponse
ListBackupPlansResponse'
    { $sel:nextToken:ListBackupPlansResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlansList:ListBackupPlansResponse' :: Maybe [BackupPlansListMember]
backupPlansList = Maybe [BackupPlansListMember]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBackupPlansResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The next item following a partial list of returned items. For example,
-- if a request is made to return @maxResults@ number of items, @NextToken@
-- allows you to return more items in your list starting at the location
-- pointed to by the next token.
listBackupPlansResponse_nextToken :: Lens.Lens' ListBackupPlansResponse (Prelude.Maybe Prelude.Text)
listBackupPlansResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBackupPlansResponse -> f ListBackupPlansResponse
listBackupPlansResponse_nextToken = (ListBackupPlansResponse -> Maybe Text)
-> (ListBackupPlansResponse
    -> Maybe Text -> ListBackupPlansResponse)
-> Lens
     ListBackupPlansResponse
     ListBackupPlansResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlansResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBackupPlansResponse' :: ListBackupPlansResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBackupPlansResponse
s@ListBackupPlansResponse' {} Maybe Text
a -> ListBackupPlansResponse
s {$sel:nextToken:ListBackupPlansResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBackupPlansResponse)

-- | An array of backup plan list items containing metadata about your saved
-- backup plans.
listBackupPlansResponse_backupPlansList :: Lens.Lens' ListBackupPlansResponse (Prelude.Maybe [BackupPlansListMember])
listBackupPlansResponse_backupPlansList :: (Maybe [BackupPlansListMember]
 -> f (Maybe [BackupPlansListMember]))
-> ListBackupPlansResponse -> f ListBackupPlansResponse
listBackupPlansResponse_backupPlansList = (ListBackupPlansResponse -> Maybe [BackupPlansListMember])
-> (ListBackupPlansResponse
    -> Maybe [BackupPlansListMember] -> ListBackupPlansResponse)
-> Lens
     ListBackupPlansResponse
     ListBackupPlansResponse
     (Maybe [BackupPlansListMember])
     (Maybe [BackupPlansListMember])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlansResponse' {Maybe [BackupPlansListMember]
backupPlansList :: Maybe [BackupPlansListMember]
$sel:backupPlansList:ListBackupPlansResponse' :: ListBackupPlansResponse -> Maybe [BackupPlansListMember]
backupPlansList} -> Maybe [BackupPlansListMember]
backupPlansList) (\s :: ListBackupPlansResponse
s@ListBackupPlansResponse' {} Maybe [BackupPlansListMember]
a -> ListBackupPlansResponse
s {$sel:backupPlansList:ListBackupPlansResponse' :: Maybe [BackupPlansListMember]
backupPlansList = Maybe [BackupPlansListMember]
a} :: ListBackupPlansResponse) ((Maybe [BackupPlansListMember]
  -> f (Maybe [BackupPlansListMember]))
 -> ListBackupPlansResponse -> f ListBackupPlansResponse)
-> ((Maybe [BackupPlansListMember]
     -> f (Maybe [BackupPlansListMember]))
    -> Maybe [BackupPlansListMember]
    -> f (Maybe [BackupPlansListMember]))
-> (Maybe [BackupPlansListMember]
    -> f (Maybe [BackupPlansListMember]))
-> ListBackupPlansResponse
-> f ListBackupPlansResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BackupPlansListMember]
  [BackupPlansListMember]
  [BackupPlansListMember]
  [BackupPlansListMember]
-> Iso
     (Maybe [BackupPlansListMember])
     (Maybe [BackupPlansListMember])
     (Maybe [BackupPlansListMember])
     (Maybe [BackupPlansListMember])
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
  [BackupPlansListMember]
  [BackupPlansListMember]
  [BackupPlansListMember]
  [BackupPlansListMember]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListBackupPlansResponse