{-# 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.ListBackupPlanVersions
-- 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 version metadata of your backup plans, including Amazon Resource
-- Names (ARNs), backup plan IDs, creation and deletion dates, plan names,
-- and version IDs.
module Amazonka.Backup.ListBackupPlanVersions
  ( -- * Creating a Request
    ListBackupPlanVersions (..),
    newListBackupPlanVersions,

    -- * Request Lenses
    listBackupPlanVersions_nextToken,
    listBackupPlanVersions_maxResults,
    listBackupPlanVersions_backupPlanId,

    -- * Destructuring the Response
    ListBackupPlanVersionsResponse (..),
    newListBackupPlanVersionsResponse,

    -- * Response Lenses
    listBackupPlanVersionsResponse_backupPlanVersionsList,
    listBackupPlanVersionsResponse_nextToken,
    listBackupPlanVersionsResponse_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:/ 'newListBackupPlanVersions' smart constructor.
data ListBackupPlanVersions = ListBackupPlanVersions'
  { -- | 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.
    ListBackupPlanVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to be returned.
    ListBackupPlanVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Uniquely identifies a backup plan.
    ListBackupPlanVersions -> Text
backupPlanId :: Prelude.Text
  }
  deriving (ListBackupPlanVersions -> ListBackupPlanVersions -> Bool
(ListBackupPlanVersions -> ListBackupPlanVersions -> Bool)
-> (ListBackupPlanVersions -> ListBackupPlanVersions -> Bool)
-> Eq ListBackupPlanVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBackupPlanVersions -> ListBackupPlanVersions -> Bool
$c/= :: ListBackupPlanVersions -> ListBackupPlanVersions -> Bool
== :: ListBackupPlanVersions -> ListBackupPlanVersions -> Bool
$c== :: ListBackupPlanVersions -> ListBackupPlanVersions -> Bool
Prelude.Eq, ReadPrec [ListBackupPlanVersions]
ReadPrec ListBackupPlanVersions
Int -> ReadS ListBackupPlanVersions
ReadS [ListBackupPlanVersions]
(Int -> ReadS ListBackupPlanVersions)
-> ReadS [ListBackupPlanVersions]
-> ReadPrec ListBackupPlanVersions
-> ReadPrec [ListBackupPlanVersions]
-> Read ListBackupPlanVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBackupPlanVersions]
$creadListPrec :: ReadPrec [ListBackupPlanVersions]
readPrec :: ReadPrec ListBackupPlanVersions
$creadPrec :: ReadPrec ListBackupPlanVersions
readList :: ReadS [ListBackupPlanVersions]
$creadList :: ReadS [ListBackupPlanVersions]
readsPrec :: Int -> ReadS ListBackupPlanVersions
$creadsPrec :: Int -> ReadS ListBackupPlanVersions
Prelude.Read, Int -> ListBackupPlanVersions -> ShowS
[ListBackupPlanVersions] -> ShowS
ListBackupPlanVersions -> String
(Int -> ListBackupPlanVersions -> ShowS)
-> (ListBackupPlanVersions -> String)
-> ([ListBackupPlanVersions] -> ShowS)
-> Show ListBackupPlanVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBackupPlanVersions] -> ShowS
$cshowList :: [ListBackupPlanVersions] -> ShowS
show :: ListBackupPlanVersions -> String
$cshow :: ListBackupPlanVersions -> String
showsPrec :: Int -> ListBackupPlanVersions -> ShowS
$cshowsPrec :: Int -> ListBackupPlanVersions -> ShowS
Prelude.Show, (forall x. ListBackupPlanVersions -> Rep ListBackupPlanVersions x)
-> (forall x.
    Rep ListBackupPlanVersions x -> ListBackupPlanVersions)
-> Generic ListBackupPlanVersions
forall x. Rep ListBackupPlanVersions x -> ListBackupPlanVersions
forall x. ListBackupPlanVersions -> Rep ListBackupPlanVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBackupPlanVersions x -> ListBackupPlanVersions
$cfrom :: forall x. ListBackupPlanVersions -> Rep ListBackupPlanVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListBackupPlanVersions' 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', 'listBackupPlanVersions_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', 'listBackupPlanVersions_maxResults' - The maximum number of items to be returned.
--
-- 'backupPlanId', 'listBackupPlanVersions_backupPlanId' - Uniquely identifies a backup plan.
newListBackupPlanVersions ::
  -- | 'backupPlanId'
  Prelude.Text ->
  ListBackupPlanVersions
newListBackupPlanVersions :: Text -> ListBackupPlanVersions
newListBackupPlanVersions Text
pBackupPlanId_ =
  ListBackupPlanVersions' :: Maybe Text -> Maybe Natural -> Text -> ListBackupPlanVersions
ListBackupPlanVersions'
    { $sel:nextToken:ListBackupPlanVersions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListBackupPlanVersions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanId:ListBackupPlanVersions' :: Text
backupPlanId = Text
pBackupPlanId_
    }

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

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

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

instance Core.AWSRequest ListBackupPlanVersions where
  type
    AWSResponse ListBackupPlanVersions =
      ListBackupPlanVersionsResponse
  request :: ListBackupPlanVersions -> Request ListBackupPlanVersions
request = Service -> ListBackupPlanVersions -> Request ListBackupPlanVersions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListBackupPlanVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBackupPlanVersions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListBackupPlanVersions))
-> Logger
-> Service
-> Proxy ListBackupPlanVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBackupPlanVersions)))
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 [BackupPlansListMember]
-> Maybe Text -> Int -> ListBackupPlanVersionsResponse
ListBackupPlanVersionsResponse'
            (Maybe [BackupPlansListMember]
 -> Maybe Text -> Int -> ListBackupPlanVersionsResponse)
-> Either String (Maybe [BackupPlansListMember])
-> Either
     String (Maybe Text -> Int -> ListBackupPlanVersionsResponse)
forall (f :: * -> *) a b. Functor 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
"BackupPlanVersionsList"
                            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 (Maybe Text -> Int -> ListBackupPlanVersionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListBackupPlanVersionsResponse)
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
"NextToken")
            Either String (Int -> ListBackupPlanVersionsResponse)
-> Either String Int
-> Either String ListBackupPlanVersionsResponse
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 ListBackupPlanVersions

instance Prelude.NFData ListBackupPlanVersions

instance Core.ToHeaders ListBackupPlanVersions where
  toHeaders :: ListBackupPlanVersions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListBackupPlanVersions -> 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 ListBackupPlanVersions where
  toPath :: ListBackupPlanVersions -> ByteString
toPath ListBackupPlanVersions' {Maybe Natural
Maybe Text
Text
backupPlanId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:backupPlanId:ListBackupPlanVersions' :: ListBackupPlanVersions -> Text
$sel:maxResults:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Natural
$sel:nextToken:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe 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,
        ByteString
"/versions/"
      ]

instance Core.ToQuery ListBackupPlanVersions where
  toQuery :: ListBackupPlanVersions -> QueryString
toQuery ListBackupPlanVersions' {Maybe Natural
Maybe Text
Text
backupPlanId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:backupPlanId:ListBackupPlanVersions' :: ListBackupPlanVersions -> Text
$sel:maxResults:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Natural
$sel:nextToken:ListBackupPlanVersions' :: ListBackupPlanVersions -> 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
      ]

-- | /See:/ 'newListBackupPlanVersionsResponse' smart constructor.
data ListBackupPlanVersionsResponse = ListBackupPlanVersionsResponse'
  { -- | An array of version list items containing metadata about your backup
    -- plans.
    ListBackupPlanVersionsResponse -> Maybe [BackupPlansListMember]
backupPlanVersionsList :: Prelude.Maybe [BackupPlansListMember],
    -- | 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.
    ListBackupPlanVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBackupPlanVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBackupPlanVersionsResponse
-> ListBackupPlanVersionsResponse -> Bool
(ListBackupPlanVersionsResponse
 -> ListBackupPlanVersionsResponse -> Bool)
-> (ListBackupPlanVersionsResponse
    -> ListBackupPlanVersionsResponse -> Bool)
-> Eq ListBackupPlanVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBackupPlanVersionsResponse
-> ListBackupPlanVersionsResponse -> Bool
$c/= :: ListBackupPlanVersionsResponse
-> ListBackupPlanVersionsResponse -> Bool
== :: ListBackupPlanVersionsResponse
-> ListBackupPlanVersionsResponse -> Bool
$c== :: ListBackupPlanVersionsResponse
-> ListBackupPlanVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListBackupPlanVersionsResponse]
ReadPrec ListBackupPlanVersionsResponse
Int -> ReadS ListBackupPlanVersionsResponse
ReadS [ListBackupPlanVersionsResponse]
(Int -> ReadS ListBackupPlanVersionsResponse)
-> ReadS [ListBackupPlanVersionsResponse]
-> ReadPrec ListBackupPlanVersionsResponse
-> ReadPrec [ListBackupPlanVersionsResponse]
-> Read ListBackupPlanVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBackupPlanVersionsResponse]
$creadListPrec :: ReadPrec [ListBackupPlanVersionsResponse]
readPrec :: ReadPrec ListBackupPlanVersionsResponse
$creadPrec :: ReadPrec ListBackupPlanVersionsResponse
readList :: ReadS [ListBackupPlanVersionsResponse]
$creadList :: ReadS [ListBackupPlanVersionsResponse]
readsPrec :: Int -> ReadS ListBackupPlanVersionsResponse
$creadsPrec :: Int -> ReadS ListBackupPlanVersionsResponse
Prelude.Read, Int -> ListBackupPlanVersionsResponse -> ShowS
[ListBackupPlanVersionsResponse] -> ShowS
ListBackupPlanVersionsResponse -> String
(Int -> ListBackupPlanVersionsResponse -> ShowS)
-> (ListBackupPlanVersionsResponse -> String)
-> ([ListBackupPlanVersionsResponse] -> ShowS)
-> Show ListBackupPlanVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBackupPlanVersionsResponse] -> ShowS
$cshowList :: [ListBackupPlanVersionsResponse] -> ShowS
show :: ListBackupPlanVersionsResponse -> String
$cshow :: ListBackupPlanVersionsResponse -> String
showsPrec :: Int -> ListBackupPlanVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListBackupPlanVersionsResponse -> ShowS
Prelude.Show, (forall x.
 ListBackupPlanVersionsResponse
 -> Rep ListBackupPlanVersionsResponse x)
-> (forall x.
    Rep ListBackupPlanVersionsResponse x
    -> ListBackupPlanVersionsResponse)
-> Generic ListBackupPlanVersionsResponse
forall x.
Rep ListBackupPlanVersionsResponse x
-> ListBackupPlanVersionsResponse
forall x.
ListBackupPlanVersionsResponse
-> Rep ListBackupPlanVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBackupPlanVersionsResponse x
-> ListBackupPlanVersionsResponse
$cfrom :: forall x.
ListBackupPlanVersionsResponse
-> Rep ListBackupPlanVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBackupPlanVersionsResponse' 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:
--
-- 'backupPlanVersionsList', 'listBackupPlanVersionsResponse_backupPlanVersionsList' - An array of version list items containing metadata about your backup
-- plans.
--
-- 'nextToken', 'listBackupPlanVersionsResponse_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.
--
-- 'httpStatus', 'listBackupPlanVersionsResponse_httpStatus' - The response's http status code.
newListBackupPlanVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBackupPlanVersionsResponse
newListBackupPlanVersionsResponse :: Int -> ListBackupPlanVersionsResponse
newListBackupPlanVersionsResponse Int
pHttpStatus_ =
  ListBackupPlanVersionsResponse' :: Maybe [BackupPlansListMember]
-> Maybe Text -> Int -> ListBackupPlanVersionsResponse
ListBackupPlanVersionsResponse'
    { $sel:backupPlanVersionsList:ListBackupPlanVersionsResponse' :: Maybe [BackupPlansListMember]
backupPlanVersionsList =
        Maybe [BackupPlansListMember]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBackupPlanVersionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBackupPlanVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of version list items containing metadata about your backup
-- plans.
listBackupPlanVersionsResponse_backupPlanVersionsList :: Lens.Lens' ListBackupPlanVersionsResponse (Prelude.Maybe [BackupPlansListMember])
listBackupPlanVersionsResponse_backupPlanVersionsList :: (Maybe [BackupPlansListMember]
 -> f (Maybe [BackupPlansListMember]))
-> ListBackupPlanVersionsResponse
-> f ListBackupPlanVersionsResponse
listBackupPlanVersionsResponse_backupPlanVersionsList = (ListBackupPlanVersionsResponse -> Maybe [BackupPlansListMember])
-> (ListBackupPlanVersionsResponse
    -> Maybe [BackupPlansListMember] -> ListBackupPlanVersionsResponse)
-> Lens
     ListBackupPlanVersionsResponse
     ListBackupPlanVersionsResponse
     (Maybe [BackupPlansListMember])
     (Maybe [BackupPlansListMember])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlanVersionsResponse' {Maybe [BackupPlansListMember]
backupPlanVersionsList :: Maybe [BackupPlansListMember]
$sel:backupPlanVersionsList:ListBackupPlanVersionsResponse' :: ListBackupPlanVersionsResponse -> Maybe [BackupPlansListMember]
backupPlanVersionsList} -> Maybe [BackupPlansListMember]
backupPlanVersionsList) (\s :: ListBackupPlanVersionsResponse
s@ListBackupPlanVersionsResponse' {} Maybe [BackupPlansListMember]
a -> ListBackupPlanVersionsResponse
s {$sel:backupPlanVersionsList:ListBackupPlanVersionsResponse' :: Maybe [BackupPlansListMember]
backupPlanVersionsList = Maybe [BackupPlansListMember]
a} :: ListBackupPlanVersionsResponse) ((Maybe [BackupPlansListMember]
  -> f (Maybe [BackupPlansListMember]))
 -> ListBackupPlanVersionsResponse
 -> f ListBackupPlanVersionsResponse)
-> ((Maybe [BackupPlansListMember]
     -> f (Maybe [BackupPlansListMember]))
    -> Maybe [BackupPlansListMember]
    -> f (Maybe [BackupPlansListMember]))
-> (Maybe [BackupPlansListMember]
    -> f (Maybe [BackupPlansListMember]))
-> ListBackupPlanVersionsResponse
-> f ListBackupPlanVersionsResponse
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 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.
listBackupPlanVersionsResponse_nextToken :: Lens.Lens' ListBackupPlanVersionsResponse (Prelude.Maybe Prelude.Text)
listBackupPlanVersionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBackupPlanVersionsResponse
-> f ListBackupPlanVersionsResponse
listBackupPlanVersionsResponse_nextToken = (ListBackupPlanVersionsResponse -> Maybe Text)
-> (ListBackupPlanVersionsResponse
    -> Maybe Text -> ListBackupPlanVersionsResponse)
-> Lens
     ListBackupPlanVersionsResponse
     ListBackupPlanVersionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBackupPlanVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBackupPlanVersionsResponse' :: ListBackupPlanVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBackupPlanVersionsResponse
s@ListBackupPlanVersionsResponse' {} Maybe Text
a -> ListBackupPlanVersionsResponse
s {$sel:nextToken:ListBackupPlanVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBackupPlanVersionsResponse)

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

instance
  Prelude.NFData
    ListBackupPlanVersionsResponse