{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.
--
-- This operation returns paginated results.
module Amazonka.Backup.ListBackupPlanVersions
  ( -- * Creating a Request
    ListBackupPlanVersions (..),
    newListBackupPlanVersions,

    -- * Request Lenses
    listBackupPlanVersions_maxResults,
    listBackupPlanVersions_nextToken,
    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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 maximum number of items to be returned.
    ListBackupPlanVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | 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,
    -- | Uniquely identifies a backup plan.
    ListBackupPlanVersions -> Text
backupPlanId :: Prelude.Text
  }
  deriving (ListBackupPlanVersions -> ListBackupPlanVersions -> Bool
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]
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
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. 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:
--
-- 'maxResults', 'listBackupPlanVersions_maxResults' - The maximum number of items to be returned.
--
-- '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.
--
-- 'backupPlanId', 'listBackupPlanVersions_backupPlanId' - Uniquely identifies a backup plan.
newListBackupPlanVersions ::
  -- | 'backupPlanId'
  Prelude.Text ->
  ListBackupPlanVersions
newListBackupPlanVersions :: Text -> ListBackupPlanVersions
newListBackupPlanVersions Text
pBackupPlanId_ =
  ListBackupPlanVersions'
    { $sel:maxResults:ListBackupPlanVersions' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBackupPlanVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:backupPlanId:ListBackupPlanVersions' :: Text
backupPlanId = Text
pBackupPlanId_
    }

-- | The maximum number of items to be returned.
listBackupPlanVersions_maxResults :: Lens.Lens' ListBackupPlanVersions (Prelude.Maybe Prelude.Natural)
listBackupPlanVersions_maxResults :: Lens' ListBackupPlanVersions (Maybe Natural)
listBackupPlanVersions_maxResults = 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)

-- | 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 :: Lens' ListBackupPlanVersions (Maybe Text)
listBackupPlanVersions_nextToken = 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)

-- | Uniquely identifies a backup plan.
listBackupPlanVersions_backupPlanId :: Lens.Lens' ListBackupPlanVersions Prelude.Text
listBackupPlanVersions_backupPlanId :: Lens' ListBackupPlanVersions Text
listBackupPlanVersions_backupPlanId = 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.AWSPager ListBackupPlanVersions where
  page :: ListBackupPlanVersions
-> AWSResponse ListBackupPlanVersions
-> Maybe ListBackupPlanVersions
page ListBackupPlanVersions
rq AWSResponse ListBackupPlanVersions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBackupPlanVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListBackupPlanVersionsResponse (Maybe Text)
listBackupPlanVersionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBackupPlanVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListBackupPlanVersionsResponse (Maybe [BackupPlansListMember])
listBackupPlanVersionsResponse_backupPlanVersionsList
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListBackupPlanVersions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListBackupPlanVersions (Maybe Text)
listBackupPlanVersions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListBackupPlanVersions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListBackupPlanVersionsResponse (Maybe Text)
listBackupPlanVersionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListBackupPlanVersions where
  type
    AWSResponse ListBackupPlanVersions =
      ListBackupPlanVersionsResponse
  request :: (Service -> Service)
-> ListBackupPlanVersions -> Request ListBackupPlanVersions
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListBackupPlanVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBackupPlanVersions)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"BackupPlanVersionsList"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListBackupPlanVersions where
  hashWithSalt :: Int -> ListBackupPlanVersions -> Int
hashWithSalt Int
_salt ListBackupPlanVersions' {Maybe Natural
Maybe Text
Text
backupPlanId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:backupPlanId:ListBackupPlanVersions' :: ListBackupPlanVersions -> Text
$sel:nextToken:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Text
$sel:maxResults:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
backupPlanId

instance Prelude.NFData ListBackupPlanVersions where
  rnf :: ListBackupPlanVersions -> ()
rnf ListBackupPlanVersions' {Maybe Natural
Maybe Text
Text
backupPlanId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:backupPlanId:ListBackupPlanVersions' :: ListBackupPlanVersions -> Text
$sel:nextToken:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Text
$sel:maxResults:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
backupPlanId

instance Data.ToHeaders ListBackupPlanVersions where
  toHeaders :: ListBackupPlanVersions -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath ListBackupPlanVersions where
  toPath :: ListBackupPlanVersions -> ByteString
toPath ListBackupPlanVersions' {Maybe Natural
Maybe Text
Text
backupPlanId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:backupPlanId:ListBackupPlanVersions' :: ListBackupPlanVersions -> Text
$sel:nextToken:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Text
$sel:maxResults:ListBackupPlanVersions' :: ListBackupPlanVersions -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/backup/plans/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
backupPlanId,
        ByteString
"/versions/"
      ]

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

-- | /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
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]
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
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.
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'
    { $sel:backupPlanVersionsList:ListBackupPlanVersionsResponse' :: Maybe [BackupPlansListMember]
backupPlanVersionsList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBackupPlanVersionsResponse' :: Maybe Text
nextToken = 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 :: Lens'
  ListBackupPlanVersionsResponse (Maybe [BackupPlansListMember])
listBackupPlanVersionsResponse_backupPlanVersionsList = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' ListBackupPlanVersionsResponse (Maybe Text)
listBackupPlanVersionsResponse_nextToken = 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 :: Lens' ListBackupPlanVersionsResponse Int
listBackupPlanVersionsResponse_httpStatus = 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
  where
  rnf :: ListBackupPlanVersionsResponse -> ()
rnf ListBackupPlanVersionsResponse' {Int
Maybe [BackupPlansListMember]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
backupPlanVersionsList :: Maybe [BackupPlansListMember]
$sel:httpStatus:ListBackupPlanVersionsResponse' :: ListBackupPlanVersionsResponse -> Int
$sel:nextToken:ListBackupPlanVersionsResponse' :: ListBackupPlanVersionsResponse -> Maybe Text
$sel:backupPlanVersionsList:ListBackupPlanVersionsResponse' :: ListBackupPlanVersionsResponse -> Maybe [BackupPlansListMember]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [BackupPlansListMember]
backupPlanVersionsList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus