{-# 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.ElasticSearch.ListPackagesForDomain
-- 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)
--
-- Lists all packages associated with the Amazon ES domain.
module Amazonka.ElasticSearch.ListPackagesForDomain
  ( -- * Creating a Request
    ListPackagesForDomain (..),
    newListPackagesForDomain,

    -- * Request Lenses
    listPackagesForDomain_nextToken,
    listPackagesForDomain_maxResults,
    listPackagesForDomain_domainName,

    -- * Destructuring the Response
    ListPackagesForDomainResponse (..),
    newListPackagesForDomainResponse,

    -- * Response Lenses
    listPackagesForDomainResponse_domainPackageDetailsList,
    listPackagesForDomainResponse_nextToken,
    listPackagesForDomainResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.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

-- | Container for request parameters to @ ListPackagesForDomain @ operation.
--
-- /See:/ 'newListPackagesForDomain' smart constructor.
data ListPackagesForDomain = ListPackagesForDomain'
  { -- | Used for pagination. Only necessary if a previous API call includes a
    -- non-null NextToken value. If provided, returns results for the next
    -- page.
    ListPackagesForDomain -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Limits results to a maximum number of packages.
    ListPackagesForDomain -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The name of the domain for which you want to list associated packages.
    ListPackagesForDomain -> Text
domainName :: Prelude.Text
  }
  deriving (ListPackagesForDomain -> ListPackagesForDomain -> Bool
(ListPackagesForDomain -> ListPackagesForDomain -> Bool)
-> (ListPackagesForDomain -> ListPackagesForDomain -> Bool)
-> Eq ListPackagesForDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPackagesForDomain -> ListPackagesForDomain -> Bool
$c/= :: ListPackagesForDomain -> ListPackagesForDomain -> Bool
== :: ListPackagesForDomain -> ListPackagesForDomain -> Bool
$c== :: ListPackagesForDomain -> ListPackagesForDomain -> Bool
Prelude.Eq, ReadPrec [ListPackagesForDomain]
ReadPrec ListPackagesForDomain
Int -> ReadS ListPackagesForDomain
ReadS [ListPackagesForDomain]
(Int -> ReadS ListPackagesForDomain)
-> ReadS [ListPackagesForDomain]
-> ReadPrec ListPackagesForDomain
-> ReadPrec [ListPackagesForDomain]
-> Read ListPackagesForDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPackagesForDomain]
$creadListPrec :: ReadPrec [ListPackagesForDomain]
readPrec :: ReadPrec ListPackagesForDomain
$creadPrec :: ReadPrec ListPackagesForDomain
readList :: ReadS [ListPackagesForDomain]
$creadList :: ReadS [ListPackagesForDomain]
readsPrec :: Int -> ReadS ListPackagesForDomain
$creadsPrec :: Int -> ReadS ListPackagesForDomain
Prelude.Read, Int -> ListPackagesForDomain -> ShowS
[ListPackagesForDomain] -> ShowS
ListPackagesForDomain -> String
(Int -> ListPackagesForDomain -> ShowS)
-> (ListPackagesForDomain -> String)
-> ([ListPackagesForDomain] -> ShowS)
-> Show ListPackagesForDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPackagesForDomain] -> ShowS
$cshowList :: [ListPackagesForDomain] -> ShowS
show :: ListPackagesForDomain -> String
$cshow :: ListPackagesForDomain -> String
showsPrec :: Int -> ListPackagesForDomain -> ShowS
$cshowsPrec :: Int -> ListPackagesForDomain -> ShowS
Prelude.Show, (forall x. ListPackagesForDomain -> Rep ListPackagesForDomain x)
-> (forall x. Rep ListPackagesForDomain x -> ListPackagesForDomain)
-> Generic ListPackagesForDomain
forall x. Rep ListPackagesForDomain x -> ListPackagesForDomain
forall x. ListPackagesForDomain -> Rep ListPackagesForDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPackagesForDomain x -> ListPackagesForDomain
$cfrom :: forall x. ListPackagesForDomain -> Rep ListPackagesForDomain x
Prelude.Generic)

-- |
-- Create a value of 'ListPackagesForDomain' 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', 'listPackagesForDomain_nextToken' - Used for pagination. Only necessary if a previous API call includes a
-- non-null NextToken value. If provided, returns results for the next
-- page.
--
-- 'maxResults', 'listPackagesForDomain_maxResults' - Limits results to a maximum number of packages.
--
-- 'domainName', 'listPackagesForDomain_domainName' - The name of the domain for which you want to list associated packages.
newListPackagesForDomain ::
  -- | 'domainName'
  Prelude.Text ->
  ListPackagesForDomain
newListPackagesForDomain :: Text -> ListPackagesForDomain
newListPackagesForDomain Text
pDomainName_ =
  ListPackagesForDomain' :: Maybe Text -> Maybe Int -> Text -> ListPackagesForDomain
ListPackagesForDomain'
    { $sel:nextToken:ListPackagesForDomain' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPackagesForDomain' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:ListPackagesForDomain' :: Text
domainName = Text
pDomainName_
    }

-- | Used for pagination. Only necessary if a previous API call includes a
-- non-null NextToken value. If provided, returns results for the next
-- page.
listPackagesForDomain_nextToken :: Lens.Lens' ListPackagesForDomain (Prelude.Maybe Prelude.Text)
listPackagesForDomain_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPackagesForDomain -> f ListPackagesForDomain
listPackagesForDomain_nextToken = (ListPackagesForDomain -> Maybe Text)
-> (ListPackagesForDomain -> Maybe Text -> ListPackagesForDomain)
-> Lens
     ListPackagesForDomain
     ListPackagesForDomain
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackagesForDomain' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPackagesForDomain' :: ListPackagesForDomain -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPackagesForDomain
s@ListPackagesForDomain' {} Maybe Text
a -> ListPackagesForDomain
s {$sel:nextToken:ListPackagesForDomain' :: Maybe Text
nextToken = Maybe Text
a} :: ListPackagesForDomain)

-- | Limits results to a maximum number of packages.
listPackagesForDomain_maxResults :: Lens.Lens' ListPackagesForDomain (Prelude.Maybe Prelude.Int)
listPackagesForDomain_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListPackagesForDomain -> f ListPackagesForDomain
listPackagesForDomain_maxResults = (ListPackagesForDomain -> Maybe Int)
-> (ListPackagesForDomain -> Maybe Int -> ListPackagesForDomain)
-> Lens
     ListPackagesForDomain ListPackagesForDomain (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackagesForDomain' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListPackagesForDomain' :: ListPackagesForDomain -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListPackagesForDomain
s@ListPackagesForDomain' {} Maybe Int
a -> ListPackagesForDomain
s {$sel:maxResults:ListPackagesForDomain' :: Maybe Int
maxResults = Maybe Int
a} :: ListPackagesForDomain)

-- | The name of the domain for which you want to list associated packages.
listPackagesForDomain_domainName :: Lens.Lens' ListPackagesForDomain Prelude.Text
listPackagesForDomain_domainName :: (Text -> f Text)
-> ListPackagesForDomain -> f ListPackagesForDomain
listPackagesForDomain_domainName = (ListPackagesForDomain -> Text)
-> (ListPackagesForDomain -> Text -> ListPackagesForDomain)
-> Lens ListPackagesForDomain ListPackagesForDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackagesForDomain' {Text
domainName :: Text
$sel:domainName:ListPackagesForDomain' :: ListPackagesForDomain -> Text
domainName} -> Text
domainName) (\s :: ListPackagesForDomain
s@ListPackagesForDomain' {} Text
a -> ListPackagesForDomain
s {$sel:domainName:ListPackagesForDomain' :: Text
domainName = Text
a} :: ListPackagesForDomain)

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

instance Prelude.NFData ListPackagesForDomain

instance Core.ToHeaders ListPackagesForDomain where
  toHeaders :: ListPackagesForDomain -> ResponseHeaders
toHeaders = ResponseHeaders -> ListPackagesForDomain -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ListPackagesForDomain where
  toPath :: ListPackagesForDomain -> ByteString
toPath ListPackagesForDomain' {Maybe Int
Maybe Text
Text
domainName :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:domainName:ListPackagesForDomain' :: ListPackagesForDomain -> Text
$sel:maxResults:ListPackagesForDomain' :: ListPackagesForDomain -> Maybe Int
$sel:nextToken:ListPackagesForDomain' :: ListPackagesForDomain -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2015-01-01/domain/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName,
        ByteString
"/packages"
      ]

instance Core.ToQuery ListPackagesForDomain where
  toQuery :: ListPackagesForDomain -> QueryString
toQuery ListPackagesForDomain' {Maybe Int
Maybe Text
Text
domainName :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:domainName:ListPackagesForDomain' :: ListPackagesForDomain -> Text
$sel:maxResults:ListPackagesForDomain' :: ListPackagesForDomain -> Maybe Int
$sel:nextToken:ListPackagesForDomain' :: ListPackagesForDomain -> 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 Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

-- | Container for response parameters to @ ListPackagesForDomain @
-- operation.
--
-- /See:/ 'newListPackagesForDomainResponse' smart constructor.
data ListPackagesForDomainResponse = ListPackagesForDomainResponse'
  { -- | List of @DomainPackageDetails@ objects.
    ListPackagesForDomainResponse -> Maybe [DomainPackageDetails]
domainPackageDetailsList :: Prelude.Maybe [DomainPackageDetails],
    -- | Pagination token that needs to be supplied to the next call to get the
    -- next page of results.
    ListPackagesForDomainResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPackagesForDomainResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPackagesForDomainResponse
-> ListPackagesForDomainResponse -> Bool
(ListPackagesForDomainResponse
 -> ListPackagesForDomainResponse -> Bool)
-> (ListPackagesForDomainResponse
    -> ListPackagesForDomainResponse -> Bool)
-> Eq ListPackagesForDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPackagesForDomainResponse
-> ListPackagesForDomainResponse -> Bool
$c/= :: ListPackagesForDomainResponse
-> ListPackagesForDomainResponse -> Bool
== :: ListPackagesForDomainResponse
-> ListPackagesForDomainResponse -> Bool
$c== :: ListPackagesForDomainResponse
-> ListPackagesForDomainResponse -> Bool
Prelude.Eq, ReadPrec [ListPackagesForDomainResponse]
ReadPrec ListPackagesForDomainResponse
Int -> ReadS ListPackagesForDomainResponse
ReadS [ListPackagesForDomainResponse]
(Int -> ReadS ListPackagesForDomainResponse)
-> ReadS [ListPackagesForDomainResponse]
-> ReadPrec ListPackagesForDomainResponse
-> ReadPrec [ListPackagesForDomainResponse]
-> Read ListPackagesForDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPackagesForDomainResponse]
$creadListPrec :: ReadPrec [ListPackagesForDomainResponse]
readPrec :: ReadPrec ListPackagesForDomainResponse
$creadPrec :: ReadPrec ListPackagesForDomainResponse
readList :: ReadS [ListPackagesForDomainResponse]
$creadList :: ReadS [ListPackagesForDomainResponse]
readsPrec :: Int -> ReadS ListPackagesForDomainResponse
$creadsPrec :: Int -> ReadS ListPackagesForDomainResponse
Prelude.Read, Int -> ListPackagesForDomainResponse -> ShowS
[ListPackagesForDomainResponse] -> ShowS
ListPackagesForDomainResponse -> String
(Int -> ListPackagesForDomainResponse -> ShowS)
-> (ListPackagesForDomainResponse -> String)
-> ([ListPackagesForDomainResponse] -> ShowS)
-> Show ListPackagesForDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPackagesForDomainResponse] -> ShowS
$cshowList :: [ListPackagesForDomainResponse] -> ShowS
show :: ListPackagesForDomainResponse -> String
$cshow :: ListPackagesForDomainResponse -> String
showsPrec :: Int -> ListPackagesForDomainResponse -> ShowS
$cshowsPrec :: Int -> ListPackagesForDomainResponse -> ShowS
Prelude.Show, (forall x.
 ListPackagesForDomainResponse
 -> Rep ListPackagesForDomainResponse x)
-> (forall x.
    Rep ListPackagesForDomainResponse x
    -> ListPackagesForDomainResponse)
-> Generic ListPackagesForDomainResponse
forall x.
Rep ListPackagesForDomainResponse x
-> ListPackagesForDomainResponse
forall x.
ListPackagesForDomainResponse
-> Rep ListPackagesForDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPackagesForDomainResponse x
-> ListPackagesForDomainResponse
$cfrom :: forall x.
ListPackagesForDomainResponse
-> Rep ListPackagesForDomainResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPackagesForDomainResponse' 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:
--
-- 'domainPackageDetailsList', 'listPackagesForDomainResponse_domainPackageDetailsList' - List of @DomainPackageDetails@ objects.
--
-- 'nextToken', 'listPackagesForDomainResponse_nextToken' - Pagination token that needs to be supplied to the next call to get the
-- next page of results.
--
-- 'httpStatus', 'listPackagesForDomainResponse_httpStatus' - The response's http status code.
newListPackagesForDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPackagesForDomainResponse
newListPackagesForDomainResponse :: Int -> ListPackagesForDomainResponse
newListPackagesForDomainResponse Int
pHttpStatus_ =
  ListPackagesForDomainResponse' :: Maybe [DomainPackageDetails]
-> Maybe Text -> Int -> ListPackagesForDomainResponse
ListPackagesForDomainResponse'
    { $sel:domainPackageDetailsList:ListPackagesForDomainResponse' :: Maybe [DomainPackageDetails]
domainPackageDetailsList =
        Maybe [DomainPackageDetails]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPackagesForDomainResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPackagesForDomainResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | List of @DomainPackageDetails@ objects.
listPackagesForDomainResponse_domainPackageDetailsList :: Lens.Lens' ListPackagesForDomainResponse (Prelude.Maybe [DomainPackageDetails])
listPackagesForDomainResponse_domainPackageDetailsList :: (Maybe [DomainPackageDetails] -> f (Maybe [DomainPackageDetails]))
-> ListPackagesForDomainResponse -> f ListPackagesForDomainResponse
listPackagesForDomainResponse_domainPackageDetailsList = (ListPackagesForDomainResponse -> Maybe [DomainPackageDetails])
-> (ListPackagesForDomainResponse
    -> Maybe [DomainPackageDetails] -> ListPackagesForDomainResponse)
-> Lens
     ListPackagesForDomainResponse
     ListPackagesForDomainResponse
     (Maybe [DomainPackageDetails])
     (Maybe [DomainPackageDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackagesForDomainResponse' {Maybe [DomainPackageDetails]
domainPackageDetailsList :: Maybe [DomainPackageDetails]
$sel:domainPackageDetailsList:ListPackagesForDomainResponse' :: ListPackagesForDomainResponse -> Maybe [DomainPackageDetails]
domainPackageDetailsList} -> Maybe [DomainPackageDetails]
domainPackageDetailsList) (\s :: ListPackagesForDomainResponse
s@ListPackagesForDomainResponse' {} Maybe [DomainPackageDetails]
a -> ListPackagesForDomainResponse
s {$sel:domainPackageDetailsList:ListPackagesForDomainResponse' :: Maybe [DomainPackageDetails]
domainPackageDetailsList = Maybe [DomainPackageDetails]
a} :: ListPackagesForDomainResponse) ((Maybe [DomainPackageDetails] -> f (Maybe [DomainPackageDetails]))
 -> ListPackagesForDomainResponse
 -> f ListPackagesForDomainResponse)
-> ((Maybe [DomainPackageDetails]
     -> f (Maybe [DomainPackageDetails]))
    -> Maybe [DomainPackageDetails]
    -> f (Maybe [DomainPackageDetails]))
-> (Maybe [DomainPackageDetails]
    -> f (Maybe [DomainPackageDetails]))
-> ListPackagesForDomainResponse
-> f ListPackagesForDomainResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DomainPackageDetails]
  [DomainPackageDetails]
  [DomainPackageDetails]
  [DomainPackageDetails]
-> Iso
     (Maybe [DomainPackageDetails])
     (Maybe [DomainPackageDetails])
     (Maybe [DomainPackageDetails])
     (Maybe [DomainPackageDetails])
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
  [DomainPackageDetails]
  [DomainPackageDetails]
  [DomainPackageDetails]
  [DomainPackageDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Pagination token that needs to be supplied to the next call to get the
-- next page of results.
listPackagesForDomainResponse_nextToken :: Lens.Lens' ListPackagesForDomainResponse (Prelude.Maybe Prelude.Text)
listPackagesForDomainResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPackagesForDomainResponse -> f ListPackagesForDomainResponse
listPackagesForDomainResponse_nextToken = (ListPackagesForDomainResponse -> Maybe Text)
-> (ListPackagesForDomainResponse
    -> Maybe Text -> ListPackagesForDomainResponse)
-> Lens
     ListPackagesForDomainResponse
     ListPackagesForDomainResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackagesForDomainResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPackagesForDomainResponse' :: ListPackagesForDomainResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPackagesForDomainResponse
s@ListPackagesForDomainResponse' {} Maybe Text
a -> ListPackagesForDomainResponse
s {$sel:nextToken:ListPackagesForDomainResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPackagesForDomainResponse)

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

instance Prelude.NFData ListPackagesForDomainResponse