{-# 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.ImageBuilder.ListImagePackages
-- 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)
--
-- List the Packages that are associated with an Image Build Version, as
-- determined by Amazon Web Services Systems Manager Inventory at build
-- time.
module Amazonka.ImageBuilder.ListImagePackages
  ( -- * Creating a Request
    ListImagePackages (..),
    newListImagePackages,

    -- * Request Lenses
    listImagePackages_nextToken,
    listImagePackages_maxResults,
    listImagePackages_imageBuildVersionArn,

    -- * Destructuring the Response
    ListImagePackagesResponse (..),
    newListImagePackagesResponse,

    -- * Response Lenses
    listImagePackagesResponse_requestId,
    listImagePackagesResponse_imagePackageList,
    listImagePackagesResponse_nextToken,
    listImagePackagesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types
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:/ 'newListImagePackages' smart constructor.
data ListImagePackages = ListImagePackages'
  { -- | A token to specify where to start paginating. This is the NextToken from
    -- a previously truncated response.
    ListImagePackages -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maxiumum number of results to return from the ListImagePackages
    -- request.
    ListImagePackages -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Filter results for the ListImagePackages request by the Image Build
    -- Version ARN
    ListImagePackages -> Text
imageBuildVersionArn :: Prelude.Text
  }
  deriving (ListImagePackages -> ListImagePackages -> Bool
(ListImagePackages -> ListImagePackages -> Bool)
-> (ListImagePackages -> ListImagePackages -> Bool)
-> Eq ListImagePackages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListImagePackages -> ListImagePackages -> Bool
$c/= :: ListImagePackages -> ListImagePackages -> Bool
== :: ListImagePackages -> ListImagePackages -> Bool
$c== :: ListImagePackages -> ListImagePackages -> Bool
Prelude.Eq, ReadPrec [ListImagePackages]
ReadPrec ListImagePackages
Int -> ReadS ListImagePackages
ReadS [ListImagePackages]
(Int -> ReadS ListImagePackages)
-> ReadS [ListImagePackages]
-> ReadPrec ListImagePackages
-> ReadPrec [ListImagePackages]
-> Read ListImagePackages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListImagePackages]
$creadListPrec :: ReadPrec [ListImagePackages]
readPrec :: ReadPrec ListImagePackages
$creadPrec :: ReadPrec ListImagePackages
readList :: ReadS [ListImagePackages]
$creadList :: ReadS [ListImagePackages]
readsPrec :: Int -> ReadS ListImagePackages
$creadsPrec :: Int -> ReadS ListImagePackages
Prelude.Read, Int -> ListImagePackages -> ShowS
[ListImagePackages] -> ShowS
ListImagePackages -> String
(Int -> ListImagePackages -> ShowS)
-> (ListImagePackages -> String)
-> ([ListImagePackages] -> ShowS)
-> Show ListImagePackages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListImagePackages] -> ShowS
$cshowList :: [ListImagePackages] -> ShowS
show :: ListImagePackages -> String
$cshow :: ListImagePackages -> String
showsPrec :: Int -> ListImagePackages -> ShowS
$cshowsPrec :: Int -> ListImagePackages -> ShowS
Prelude.Show, (forall x. ListImagePackages -> Rep ListImagePackages x)
-> (forall x. Rep ListImagePackages x -> ListImagePackages)
-> Generic ListImagePackages
forall x. Rep ListImagePackages x -> ListImagePackages
forall x. ListImagePackages -> Rep ListImagePackages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListImagePackages x -> ListImagePackages
$cfrom :: forall x. ListImagePackages -> Rep ListImagePackages x
Prelude.Generic)

-- |
-- Create a value of 'ListImagePackages' 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', 'listImagePackages_nextToken' - A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
--
-- 'maxResults', 'listImagePackages_maxResults' - The maxiumum number of results to return from the ListImagePackages
-- request.
--
-- 'imageBuildVersionArn', 'listImagePackages_imageBuildVersionArn' - Filter results for the ListImagePackages request by the Image Build
-- Version ARN
newListImagePackages ::
  -- | 'imageBuildVersionArn'
  Prelude.Text ->
  ListImagePackages
newListImagePackages :: Text -> ListImagePackages
newListImagePackages Text
pImageBuildVersionArn_ =
  ListImagePackages' :: Maybe Text -> Maybe Natural -> Text -> ListImagePackages
ListImagePackages'
    { $sel:nextToken:ListImagePackages' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListImagePackages' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:imageBuildVersionArn:ListImagePackages' :: Text
imageBuildVersionArn = Text
pImageBuildVersionArn_
    }

-- | A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
listImagePackages_nextToken :: Lens.Lens' ListImagePackages (Prelude.Maybe Prelude.Text)
listImagePackages_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListImagePackages -> f ListImagePackages
listImagePackages_nextToken = (ListImagePackages -> Maybe Text)
-> (ListImagePackages -> Maybe Text -> ListImagePackages)
-> Lens
     ListImagePackages ListImagePackages (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagePackages' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListImagePackages' :: ListImagePackages -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListImagePackages
s@ListImagePackages' {} Maybe Text
a -> ListImagePackages
s {$sel:nextToken:ListImagePackages' :: Maybe Text
nextToken = Maybe Text
a} :: ListImagePackages)

-- | The maxiumum number of results to return from the ListImagePackages
-- request.
listImagePackages_maxResults :: Lens.Lens' ListImagePackages (Prelude.Maybe Prelude.Natural)
listImagePackages_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListImagePackages -> f ListImagePackages
listImagePackages_maxResults = (ListImagePackages -> Maybe Natural)
-> (ListImagePackages -> Maybe Natural -> ListImagePackages)
-> Lens
     ListImagePackages ListImagePackages (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagePackages' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListImagePackages' :: ListImagePackages -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListImagePackages
s@ListImagePackages' {} Maybe Natural
a -> ListImagePackages
s {$sel:maxResults:ListImagePackages' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListImagePackages)

-- | Filter results for the ListImagePackages request by the Image Build
-- Version ARN
listImagePackages_imageBuildVersionArn :: Lens.Lens' ListImagePackages Prelude.Text
listImagePackages_imageBuildVersionArn :: (Text -> f Text) -> ListImagePackages -> f ListImagePackages
listImagePackages_imageBuildVersionArn = (ListImagePackages -> Text)
-> (ListImagePackages -> Text -> ListImagePackages)
-> Lens ListImagePackages ListImagePackages Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagePackages' {Text
imageBuildVersionArn :: Text
$sel:imageBuildVersionArn:ListImagePackages' :: ListImagePackages -> Text
imageBuildVersionArn} -> Text
imageBuildVersionArn) (\s :: ListImagePackages
s@ListImagePackages' {} Text
a -> ListImagePackages
s {$sel:imageBuildVersionArn:ListImagePackages' :: Text
imageBuildVersionArn = Text
a} :: ListImagePackages)

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

instance Prelude.NFData ListImagePackages

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

instance Core.ToJSON ListImagePackages where
  toJSON :: ListImagePackages -> Value
toJSON ListImagePackages' {Maybe Natural
Maybe Text
Text
imageBuildVersionArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:imageBuildVersionArn:ListImagePackages' :: ListImagePackages -> Text
$sel:maxResults:ListImagePackages' :: ListImagePackages -> Maybe Natural
$sel:nextToken:ListImagePackages' :: ListImagePackages -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"imageBuildVersionArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
imageBuildVersionArn
              )
          ]
      )

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

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

-- | /See:/ 'newListImagePackagesResponse' smart constructor.
data ListImagePackagesResponse = ListImagePackagesResponse'
  { -- | The request ID that uniquely identifies this request.
    ListImagePackagesResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The list of Image Packages returned in the response.
    ListImagePackagesResponse -> Maybe [ImagePackage]
imagePackageList :: Prelude.Maybe [ImagePackage],
    -- | A token to specify where to start paginating. This is the NextToken from
    -- a previously truncated response.
    ListImagePackagesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListImagePackagesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListImagePackagesResponse -> ListImagePackagesResponse -> Bool
(ListImagePackagesResponse -> ListImagePackagesResponse -> Bool)
-> (ListImagePackagesResponse -> ListImagePackagesResponse -> Bool)
-> Eq ListImagePackagesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListImagePackagesResponse -> ListImagePackagesResponse -> Bool
$c/= :: ListImagePackagesResponse -> ListImagePackagesResponse -> Bool
== :: ListImagePackagesResponse -> ListImagePackagesResponse -> Bool
$c== :: ListImagePackagesResponse -> ListImagePackagesResponse -> Bool
Prelude.Eq, ReadPrec [ListImagePackagesResponse]
ReadPrec ListImagePackagesResponse
Int -> ReadS ListImagePackagesResponse
ReadS [ListImagePackagesResponse]
(Int -> ReadS ListImagePackagesResponse)
-> ReadS [ListImagePackagesResponse]
-> ReadPrec ListImagePackagesResponse
-> ReadPrec [ListImagePackagesResponse]
-> Read ListImagePackagesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListImagePackagesResponse]
$creadListPrec :: ReadPrec [ListImagePackagesResponse]
readPrec :: ReadPrec ListImagePackagesResponse
$creadPrec :: ReadPrec ListImagePackagesResponse
readList :: ReadS [ListImagePackagesResponse]
$creadList :: ReadS [ListImagePackagesResponse]
readsPrec :: Int -> ReadS ListImagePackagesResponse
$creadsPrec :: Int -> ReadS ListImagePackagesResponse
Prelude.Read, Int -> ListImagePackagesResponse -> ShowS
[ListImagePackagesResponse] -> ShowS
ListImagePackagesResponse -> String
(Int -> ListImagePackagesResponse -> ShowS)
-> (ListImagePackagesResponse -> String)
-> ([ListImagePackagesResponse] -> ShowS)
-> Show ListImagePackagesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListImagePackagesResponse] -> ShowS
$cshowList :: [ListImagePackagesResponse] -> ShowS
show :: ListImagePackagesResponse -> String
$cshow :: ListImagePackagesResponse -> String
showsPrec :: Int -> ListImagePackagesResponse -> ShowS
$cshowsPrec :: Int -> ListImagePackagesResponse -> ShowS
Prelude.Show, (forall x.
 ListImagePackagesResponse -> Rep ListImagePackagesResponse x)
-> (forall x.
    Rep ListImagePackagesResponse x -> ListImagePackagesResponse)
-> Generic ListImagePackagesResponse
forall x.
Rep ListImagePackagesResponse x -> ListImagePackagesResponse
forall x.
ListImagePackagesResponse -> Rep ListImagePackagesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListImagePackagesResponse x -> ListImagePackagesResponse
$cfrom :: forall x.
ListImagePackagesResponse -> Rep ListImagePackagesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListImagePackagesResponse' 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:
--
-- 'requestId', 'listImagePackagesResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'imagePackageList', 'listImagePackagesResponse_imagePackageList' - The list of Image Packages returned in the response.
--
-- 'nextToken', 'listImagePackagesResponse_nextToken' - A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
--
-- 'httpStatus', 'listImagePackagesResponse_httpStatus' - The response's http status code.
newListImagePackagesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListImagePackagesResponse
newListImagePackagesResponse :: Int -> ListImagePackagesResponse
newListImagePackagesResponse Int
pHttpStatus_ =
  ListImagePackagesResponse' :: Maybe Text
-> Maybe [ImagePackage]
-> Maybe Text
-> Int
-> ListImagePackagesResponse
ListImagePackagesResponse'
    { $sel:requestId:ListImagePackagesResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imagePackageList:ListImagePackagesResponse' :: Maybe [ImagePackage]
imagePackageList = Maybe [ImagePackage]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListImagePackagesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListImagePackagesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The request ID that uniquely identifies this request.
listImagePackagesResponse_requestId :: Lens.Lens' ListImagePackagesResponse (Prelude.Maybe Prelude.Text)
listImagePackagesResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListImagePackagesResponse -> f ListImagePackagesResponse
listImagePackagesResponse_requestId = (ListImagePackagesResponse -> Maybe Text)
-> (ListImagePackagesResponse
    -> Maybe Text -> ListImagePackagesResponse)
-> Lens
     ListImagePackagesResponse
     ListImagePackagesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagePackagesResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListImagePackagesResponse' :: ListImagePackagesResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListImagePackagesResponse
s@ListImagePackagesResponse' {} Maybe Text
a -> ListImagePackagesResponse
s {$sel:requestId:ListImagePackagesResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListImagePackagesResponse)

-- | The list of Image Packages returned in the response.
listImagePackagesResponse_imagePackageList :: Lens.Lens' ListImagePackagesResponse (Prelude.Maybe [ImagePackage])
listImagePackagesResponse_imagePackageList :: (Maybe [ImagePackage] -> f (Maybe [ImagePackage]))
-> ListImagePackagesResponse -> f ListImagePackagesResponse
listImagePackagesResponse_imagePackageList = (ListImagePackagesResponse -> Maybe [ImagePackage])
-> (ListImagePackagesResponse
    -> Maybe [ImagePackage] -> ListImagePackagesResponse)
-> Lens
     ListImagePackagesResponse
     ListImagePackagesResponse
     (Maybe [ImagePackage])
     (Maybe [ImagePackage])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagePackagesResponse' {Maybe [ImagePackage]
imagePackageList :: Maybe [ImagePackage]
$sel:imagePackageList:ListImagePackagesResponse' :: ListImagePackagesResponse -> Maybe [ImagePackage]
imagePackageList} -> Maybe [ImagePackage]
imagePackageList) (\s :: ListImagePackagesResponse
s@ListImagePackagesResponse' {} Maybe [ImagePackage]
a -> ListImagePackagesResponse
s {$sel:imagePackageList:ListImagePackagesResponse' :: Maybe [ImagePackage]
imagePackageList = Maybe [ImagePackage]
a} :: ListImagePackagesResponse) ((Maybe [ImagePackage] -> f (Maybe [ImagePackage]))
 -> ListImagePackagesResponse -> f ListImagePackagesResponse)
-> ((Maybe [ImagePackage] -> f (Maybe [ImagePackage]))
    -> Maybe [ImagePackage] -> f (Maybe [ImagePackage]))
-> (Maybe [ImagePackage] -> f (Maybe [ImagePackage]))
-> ListImagePackagesResponse
-> f ListImagePackagesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ImagePackage] [ImagePackage] [ImagePackage] [ImagePackage]
-> Iso
     (Maybe [ImagePackage])
     (Maybe [ImagePackage])
     (Maybe [ImagePackage])
     (Maybe [ImagePackage])
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 [ImagePackage] [ImagePackage] [ImagePackage] [ImagePackage]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
listImagePackagesResponse_nextToken :: Lens.Lens' ListImagePackagesResponse (Prelude.Maybe Prelude.Text)
listImagePackagesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListImagePackagesResponse -> f ListImagePackagesResponse
listImagePackagesResponse_nextToken = (ListImagePackagesResponse -> Maybe Text)
-> (ListImagePackagesResponse
    -> Maybe Text -> ListImagePackagesResponse)
-> Lens
     ListImagePackagesResponse
     ListImagePackagesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagePackagesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListImagePackagesResponse' :: ListImagePackagesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListImagePackagesResponse
s@ListImagePackagesResponse' {} Maybe Text
a -> ListImagePackagesResponse
s {$sel:nextToken:ListImagePackagesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListImagePackagesResponse)

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

instance Prelude.NFData ListImagePackagesResponse