{-# 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.ServiceCatalog.SearchProductsAsAdmin
-- 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)
--
-- Gets information about the products for the specified portfolio or all
-- products.
--
-- This operation returns paginated results.
module Amazonka.ServiceCatalog.SearchProductsAsAdmin
  ( -- * Creating a Request
    SearchProductsAsAdmin (..),
    newSearchProductsAsAdmin,

    -- * Request Lenses
    searchProductsAsAdmin_portfolioId,
    searchProductsAsAdmin_filters,
    searchProductsAsAdmin_sortOrder,
    searchProductsAsAdmin_acceptLanguage,
    searchProductsAsAdmin_pageToken,
    searchProductsAsAdmin_pageSize,
    searchProductsAsAdmin_productSource,
    searchProductsAsAdmin_sortBy,

    -- * Destructuring the Response
    SearchProductsAsAdminResponse (..),
    newSearchProductsAsAdminResponse,

    -- * Response Lenses
    searchProductsAsAdminResponse_nextPageToken,
    searchProductsAsAdminResponse_productViewDetails,
    searchProductsAsAdminResponse_httpStatus,
  )
where

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
import Amazonka.ServiceCatalog.Types

-- | /See:/ 'newSearchProductsAsAdmin' smart constructor.
data SearchProductsAsAdmin = SearchProductsAsAdmin'
  { -- | The portfolio identifier.
    SearchProductsAsAdmin -> Maybe Text
portfolioId :: Prelude.Maybe Prelude.Text,
    -- | The search filters. If no search filters are specified, the output
    -- includes all products to which the administrator has access.
    SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
filters :: Prelude.Maybe (Prelude.HashMap ProductViewFilterBy [Prelude.Text]),
    -- | The sort order. If no value is specified, the results are not sorted.
    SearchProductsAsAdmin -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    SearchProductsAsAdmin -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    SearchProductsAsAdmin -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    SearchProductsAsAdmin -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | Access level of the source of the product.
    SearchProductsAsAdmin -> Maybe ProductSource
productSource :: Prelude.Maybe ProductSource,
    -- | The sort field. If no value is specified, the results are not sorted.
    SearchProductsAsAdmin -> Maybe ProductViewSortBy
sortBy :: Prelude.Maybe ProductViewSortBy
  }
  deriving (SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool
(SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool)
-> (SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool)
-> Eq SearchProductsAsAdmin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool
$c/= :: SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool
== :: SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool
$c== :: SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool
Prelude.Eq, ReadPrec [SearchProductsAsAdmin]
ReadPrec SearchProductsAsAdmin
Int -> ReadS SearchProductsAsAdmin
ReadS [SearchProductsAsAdmin]
(Int -> ReadS SearchProductsAsAdmin)
-> ReadS [SearchProductsAsAdmin]
-> ReadPrec SearchProductsAsAdmin
-> ReadPrec [SearchProductsAsAdmin]
-> Read SearchProductsAsAdmin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchProductsAsAdmin]
$creadListPrec :: ReadPrec [SearchProductsAsAdmin]
readPrec :: ReadPrec SearchProductsAsAdmin
$creadPrec :: ReadPrec SearchProductsAsAdmin
readList :: ReadS [SearchProductsAsAdmin]
$creadList :: ReadS [SearchProductsAsAdmin]
readsPrec :: Int -> ReadS SearchProductsAsAdmin
$creadsPrec :: Int -> ReadS SearchProductsAsAdmin
Prelude.Read, Int -> SearchProductsAsAdmin -> ShowS
[SearchProductsAsAdmin] -> ShowS
SearchProductsAsAdmin -> String
(Int -> SearchProductsAsAdmin -> ShowS)
-> (SearchProductsAsAdmin -> String)
-> ([SearchProductsAsAdmin] -> ShowS)
-> Show SearchProductsAsAdmin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchProductsAsAdmin] -> ShowS
$cshowList :: [SearchProductsAsAdmin] -> ShowS
show :: SearchProductsAsAdmin -> String
$cshow :: SearchProductsAsAdmin -> String
showsPrec :: Int -> SearchProductsAsAdmin -> ShowS
$cshowsPrec :: Int -> SearchProductsAsAdmin -> ShowS
Prelude.Show, (forall x. SearchProductsAsAdmin -> Rep SearchProductsAsAdmin x)
-> (forall x. Rep SearchProductsAsAdmin x -> SearchProductsAsAdmin)
-> Generic SearchProductsAsAdmin
forall x. Rep SearchProductsAsAdmin x -> SearchProductsAsAdmin
forall x. SearchProductsAsAdmin -> Rep SearchProductsAsAdmin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchProductsAsAdmin x -> SearchProductsAsAdmin
$cfrom :: forall x. SearchProductsAsAdmin -> Rep SearchProductsAsAdmin x
Prelude.Generic)

-- |
-- Create a value of 'SearchProductsAsAdmin' 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:
--
-- 'portfolioId', 'searchProductsAsAdmin_portfolioId' - The portfolio identifier.
--
-- 'filters', 'searchProductsAsAdmin_filters' - The search filters. If no search filters are specified, the output
-- includes all products to which the administrator has access.
--
-- 'sortOrder', 'searchProductsAsAdmin_sortOrder' - The sort order. If no value is specified, the results are not sorted.
--
-- 'acceptLanguage', 'searchProductsAsAdmin_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageToken', 'searchProductsAsAdmin_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'pageSize', 'searchProductsAsAdmin_pageSize' - The maximum number of items to return with this call.
--
-- 'productSource', 'searchProductsAsAdmin_productSource' - Access level of the source of the product.
--
-- 'sortBy', 'searchProductsAsAdmin_sortBy' - The sort field. If no value is specified, the results are not sorted.
newSearchProductsAsAdmin ::
  SearchProductsAsAdmin
newSearchProductsAsAdmin :: SearchProductsAsAdmin
newSearchProductsAsAdmin =
  SearchProductsAsAdmin' :: Maybe Text
-> Maybe (HashMap ProductViewFilterBy [Text])
-> Maybe SortOrder
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ProductSource
-> Maybe ProductViewSortBy
-> SearchProductsAsAdmin
SearchProductsAsAdmin'
    { $sel:portfolioId:SearchProductsAsAdmin' :: Maybe Text
portfolioId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:SearchProductsAsAdmin' :: Maybe (HashMap ProductViewFilterBy [Text])
filters = Maybe (HashMap ProductViewFilterBy [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:SearchProductsAsAdmin' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptLanguage:SearchProductsAsAdmin' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:SearchProductsAsAdmin' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:SearchProductsAsAdmin' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:productSource:SearchProductsAsAdmin' :: Maybe ProductSource
productSource = Maybe ProductSource
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:SearchProductsAsAdmin' :: Maybe ProductViewSortBy
sortBy = Maybe ProductViewSortBy
forall a. Maybe a
Prelude.Nothing
    }

-- | The portfolio identifier.
searchProductsAsAdmin_portfolioId :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Text)
searchProductsAsAdmin_portfolioId :: (Maybe Text -> f (Maybe Text))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_portfolioId = (SearchProductsAsAdmin -> Maybe Text)
-> (SearchProductsAsAdmin -> Maybe Text -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe Text
portfolioId :: Maybe Text
$sel:portfolioId:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
portfolioId} -> Maybe Text
portfolioId) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe Text
a -> SearchProductsAsAdmin
s {$sel:portfolioId:SearchProductsAsAdmin' :: Maybe Text
portfolioId = Maybe Text
a} :: SearchProductsAsAdmin)

-- | The search filters. If no search filters are specified, the output
-- includes all products to which the administrator has access.
searchProductsAsAdmin_filters :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe (Prelude.HashMap ProductViewFilterBy [Prelude.Text]))
searchProductsAsAdmin_filters :: (Maybe (HashMap ProductViewFilterBy [Text])
 -> f (Maybe (HashMap ProductViewFilterBy [Text])))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_filters = (SearchProductsAsAdmin
 -> Maybe (HashMap ProductViewFilterBy [Text]))
-> (SearchProductsAsAdmin
    -> Maybe (HashMap ProductViewFilterBy [Text])
    -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe (HashMap ProductViewFilterBy [Text]))
     (Maybe (HashMap ProductViewFilterBy [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe (HashMap ProductViewFilterBy [Text])
filters :: Maybe (HashMap ProductViewFilterBy [Text])
$sel:filters:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
filters} -> Maybe (HashMap ProductViewFilterBy [Text])
filters) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe (HashMap ProductViewFilterBy [Text])
a -> SearchProductsAsAdmin
s {$sel:filters:SearchProductsAsAdmin' :: Maybe (HashMap ProductViewFilterBy [Text])
filters = Maybe (HashMap ProductViewFilterBy [Text])
a} :: SearchProductsAsAdmin) ((Maybe (HashMap ProductViewFilterBy [Text])
  -> f (Maybe (HashMap ProductViewFilterBy [Text])))
 -> SearchProductsAsAdmin -> f SearchProductsAsAdmin)
-> ((Maybe (HashMap ProductViewFilterBy [Text])
     -> f (Maybe (HashMap ProductViewFilterBy [Text])))
    -> Maybe (HashMap ProductViewFilterBy [Text])
    -> f (Maybe (HashMap ProductViewFilterBy [Text])))
-> (Maybe (HashMap ProductViewFilterBy [Text])
    -> f (Maybe (HashMap ProductViewFilterBy [Text])))
-> SearchProductsAsAdmin
-> f SearchProductsAsAdmin
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap ProductViewFilterBy [Text])
  (HashMap ProductViewFilterBy [Text])
  (HashMap ProductViewFilterBy [Text])
  (HashMap ProductViewFilterBy [Text])
-> Iso
     (Maybe (HashMap ProductViewFilterBy [Text]))
     (Maybe (HashMap ProductViewFilterBy [Text]))
     (Maybe (HashMap ProductViewFilterBy [Text]))
     (Maybe (HashMap ProductViewFilterBy [Text]))
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
  (HashMap ProductViewFilterBy [Text])
  (HashMap ProductViewFilterBy [Text])
  (HashMap ProductViewFilterBy [Text])
  (HashMap ProductViewFilterBy [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The sort order. If no value is specified, the results are not sorted.
searchProductsAsAdmin_sortOrder :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe SortOrder)
searchProductsAsAdmin_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_sortOrder = (SearchProductsAsAdmin -> Maybe SortOrder)
-> (SearchProductsAsAdmin
    -> Maybe SortOrder -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe SortOrder
a -> SearchProductsAsAdmin
s {$sel:sortOrder:SearchProductsAsAdmin' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: SearchProductsAsAdmin)

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
searchProductsAsAdmin_acceptLanguage :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Text)
searchProductsAsAdmin_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_acceptLanguage = (SearchProductsAsAdmin -> Maybe Text)
-> (SearchProductsAsAdmin -> Maybe Text -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe Text
a -> SearchProductsAsAdmin
s {$sel:acceptLanguage:SearchProductsAsAdmin' :: Maybe Text
acceptLanguage = Maybe Text
a} :: SearchProductsAsAdmin)

-- | The page token for the next set of results. To retrieve the first set of
-- results, use null.
searchProductsAsAdmin_pageToken :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Text)
searchProductsAsAdmin_pageToken :: (Maybe Text -> f (Maybe Text))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_pageToken = (SearchProductsAsAdmin -> Maybe Text)
-> (SearchProductsAsAdmin -> Maybe Text -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe Text
a -> SearchProductsAsAdmin
s {$sel:pageToken:SearchProductsAsAdmin' :: Maybe Text
pageToken = Maybe Text
a} :: SearchProductsAsAdmin)

-- | The maximum number of items to return with this call.
searchProductsAsAdmin_pageSize :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Natural)
searchProductsAsAdmin_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_pageSize = (SearchProductsAsAdmin -> Maybe Natural)
-> (SearchProductsAsAdmin
    -> Maybe Natural -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe Natural
a -> SearchProductsAsAdmin
s {$sel:pageSize:SearchProductsAsAdmin' :: Maybe Natural
pageSize = Maybe Natural
a} :: SearchProductsAsAdmin)

-- | Access level of the source of the product.
searchProductsAsAdmin_productSource :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe ProductSource)
searchProductsAsAdmin_productSource :: (Maybe ProductSource -> f (Maybe ProductSource))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_productSource = (SearchProductsAsAdmin -> Maybe ProductSource)
-> (SearchProductsAsAdmin
    -> Maybe ProductSource -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe ProductSource)
     (Maybe ProductSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe ProductSource
productSource :: Maybe ProductSource
$sel:productSource:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductSource
productSource} -> Maybe ProductSource
productSource) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe ProductSource
a -> SearchProductsAsAdmin
s {$sel:productSource:SearchProductsAsAdmin' :: Maybe ProductSource
productSource = Maybe ProductSource
a} :: SearchProductsAsAdmin)

-- | The sort field. If no value is specified, the results are not sorted.
searchProductsAsAdmin_sortBy :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe ProductViewSortBy)
searchProductsAsAdmin_sortBy :: (Maybe ProductViewSortBy -> f (Maybe ProductViewSortBy))
-> SearchProductsAsAdmin -> f SearchProductsAsAdmin
searchProductsAsAdmin_sortBy = (SearchProductsAsAdmin -> Maybe ProductViewSortBy)
-> (SearchProductsAsAdmin
    -> Maybe ProductViewSortBy -> SearchProductsAsAdmin)
-> Lens
     SearchProductsAsAdmin
     SearchProductsAsAdmin
     (Maybe ProductViewSortBy)
     (Maybe ProductViewSortBy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdmin' {Maybe ProductViewSortBy
sortBy :: Maybe ProductViewSortBy
$sel:sortBy:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductViewSortBy
sortBy} -> Maybe ProductViewSortBy
sortBy) (\s :: SearchProductsAsAdmin
s@SearchProductsAsAdmin' {} Maybe ProductViewSortBy
a -> SearchProductsAsAdmin
s {$sel:sortBy:SearchProductsAsAdmin' :: Maybe ProductViewSortBy
sortBy = Maybe ProductViewSortBy
a} :: SearchProductsAsAdmin)

instance Core.AWSPager SearchProductsAsAdmin where
  page :: SearchProductsAsAdmin
-> AWSResponse SearchProductsAsAdmin -> Maybe SearchProductsAsAdmin
page SearchProductsAsAdmin
rq AWSResponse SearchProductsAsAdmin
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SearchProductsAsAdmin
SearchProductsAsAdminResponse
rs
            SearchProductsAsAdminResponse
-> Getting (First Text) SearchProductsAsAdminResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> SearchProductsAsAdminResponse
-> Const (First Text) SearchProductsAsAdminResponse
Lens' SearchProductsAsAdminResponse (Maybe Text)
searchProductsAsAdminResponse_nextPageToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> SearchProductsAsAdminResponse
 -> Const (First Text) SearchProductsAsAdminResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) SearchProductsAsAdminResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe SearchProductsAsAdmin
forall a. Maybe a
Prelude.Nothing
    | Maybe [ProductViewDetail] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SearchProductsAsAdmin
SearchProductsAsAdminResponse
rs
            SearchProductsAsAdminResponse
-> Getting
     (First [ProductViewDetail])
     SearchProductsAsAdminResponse
     [ProductViewDetail]
-> Maybe [ProductViewDetail]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ProductViewDetail]
 -> Const (First [ProductViewDetail]) (Maybe [ProductViewDetail]))
-> SearchProductsAsAdminResponse
-> Const (First [ProductViewDetail]) SearchProductsAsAdminResponse
Lens' SearchProductsAsAdminResponse (Maybe [ProductViewDetail])
searchProductsAsAdminResponse_productViewDetails
              ((Maybe [ProductViewDetail]
  -> Const (First [ProductViewDetail]) (Maybe [ProductViewDetail]))
 -> SearchProductsAsAdminResponse
 -> Const (First [ProductViewDetail]) SearchProductsAsAdminResponse)
-> (([ProductViewDetail]
     -> Const (First [ProductViewDetail]) [ProductViewDetail])
    -> Maybe [ProductViewDetail]
    -> Const (First [ProductViewDetail]) (Maybe [ProductViewDetail]))
-> Getting
     (First [ProductViewDetail])
     SearchProductsAsAdminResponse
     [ProductViewDetail]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ProductViewDetail]
 -> Const (First [ProductViewDetail]) [ProductViewDetail])
-> Maybe [ProductViewDetail]
-> Const (First [ProductViewDetail]) (Maybe [ProductViewDetail])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe SearchProductsAsAdmin
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      SearchProductsAsAdmin -> Maybe SearchProductsAsAdmin
forall a. a -> Maybe a
Prelude.Just (SearchProductsAsAdmin -> Maybe SearchProductsAsAdmin)
-> SearchProductsAsAdmin -> Maybe SearchProductsAsAdmin
forall a b. (a -> b) -> a -> b
Prelude.$
        SearchProductsAsAdmin
rq
          SearchProductsAsAdmin
-> (SearchProductsAsAdmin -> SearchProductsAsAdmin)
-> SearchProductsAsAdmin
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> SearchProductsAsAdmin -> Identity SearchProductsAsAdmin
Lens
  SearchProductsAsAdmin
  SearchProductsAsAdmin
  (Maybe Text)
  (Maybe Text)
searchProductsAsAdmin_pageToken
          ((Maybe Text -> Identity (Maybe Text))
 -> SearchProductsAsAdmin -> Identity SearchProductsAsAdmin)
-> Maybe Text -> SearchProductsAsAdmin -> SearchProductsAsAdmin
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse SearchProductsAsAdmin
SearchProductsAsAdminResponse
rs
          SearchProductsAsAdminResponse
-> Getting (First Text) SearchProductsAsAdminResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> SearchProductsAsAdminResponse
-> Const (First Text) SearchProductsAsAdminResponse
Lens' SearchProductsAsAdminResponse (Maybe Text)
searchProductsAsAdminResponse_nextPageToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> SearchProductsAsAdminResponse
 -> Const (First Text) SearchProductsAsAdminResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) SearchProductsAsAdminResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData SearchProductsAsAdmin

instance Core.ToHeaders SearchProductsAsAdmin where
  toHeaders :: SearchProductsAsAdmin -> ResponseHeaders
toHeaders =
    ResponseHeaders -> SearchProductsAsAdmin -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWS242ServiceCatalogService.SearchProductsAsAdmin" ::
                          Prelude.ByteString
                      ),
            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 SearchProductsAsAdmin where
  toJSON :: SearchProductsAsAdmin -> Value
toJSON SearchProductsAsAdmin' {Maybe Natural
Maybe Text
Maybe (HashMap ProductViewFilterBy [Text])
Maybe ProductSource
Maybe ProductViewSortBy
Maybe SortOrder
sortBy :: Maybe ProductViewSortBy
productSource :: Maybe ProductSource
pageSize :: Maybe Natural
pageToken :: Maybe Text
acceptLanguage :: Maybe Text
sortOrder :: Maybe SortOrder
filters :: Maybe (HashMap ProductViewFilterBy [Text])
portfolioId :: Maybe Text
$sel:sortBy:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductViewSortBy
$sel:productSource:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductSource
$sel:pageSize:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Natural
$sel:pageToken:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:acceptLanguage:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:sortOrder:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe SortOrder
$sel:filters:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
$sel:portfolioId:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PortfolioId" 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
portfolioId,
            (Text
"Filters" Text -> HashMap ProductViewFilterBy [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap ProductViewFilterBy [Text] -> Pair)
-> Maybe (HashMap ProductViewFilterBy [Text]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap ProductViewFilterBy [Text])
filters,
            (Text
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Text
"AcceptLanguage" 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
acceptLanguage,
            (Text
"PageToken" 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
pageToken,
            (Text
"PageSize" 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
pageSize,
            (Text
"ProductSource" Text -> ProductSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProductSource -> Pair) -> Maybe ProductSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProductSource
productSource,
            (Text
"SortBy" Text -> ProductViewSortBy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProductViewSortBy -> Pair)
-> Maybe ProductViewSortBy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProductViewSortBy
sortBy
          ]
      )

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

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

-- | /See:/ 'newSearchProductsAsAdminResponse' smart constructor.
data SearchProductsAsAdminResponse = SearchProductsAsAdminResponse'
  { -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    SearchProductsAsAdminResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the product views.
    SearchProductsAsAdminResponse -> Maybe [ProductViewDetail]
productViewDetails :: Prelude.Maybe [ProductViewDetail],
    -- | The response's http status code.
    SearchProductsAsAdminResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SearchProductsAsAdminResponse
-> SearchProductsAsAdminResponse -> Bool
(SearchProductsAsAdminResponse
 -> SearchProductsAsAdminResponse -> Bool)
-> (SearchProductsAsAdminResponse
    -> SearchProductsAsAdminResponse -> Bool)
-> Eq SearchProductsAsAdminResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchProductsAsAdminResponse
-> SearchProductsAsAdminResponse -> Bool
$c/= :: SearchProductsAsAdminResponse
-> SearchProductsAsAdminResponse -> Bool
== :: SearchProductsAsAdminResponse
-> SearchProductsAsAdminResponse -> Bool
$c== :: SearchProductsAsAdminResponse
-> SearchProductsAsAdminResponse -> Bool
Prelude.Eq, ReadPrec [SearchProductsAsAdminResponse]
ReadPrec SearchProductsAsAdminResponse
Int -> ReadS SearchProductsAsAdminResponse
ReadS [SearchProductsAsAdminResponse]
(Int -> ReadS SearchProductsAsAdminResponse)
-> ReadS [SearchProductsAsAdminResponse]
-> ReadPrec SearchProductsAsAdminResponse
-> ReadPrec [SearchProductsAsAdminResponse]
-> Read SearchProductsAsAdminResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchProductsAsAdminResponse]
$creadListPrec :: ReadPrec [SearchProductsAsAdminResponse]
readPrec :: ReadPrec SearchProductsAsAdminResponse
$creadPrec :: ReadPrec SearchProductsAsAdminResponse
readList :: ReadS [SearchProductsAsAdminResponse]
$creadList :: ReadS [SearchProductsAsAdminResponse]
readsPrec :: Int -> ReadS SearchProductsAsAdminResponse
$creadsPrec :: Int -> ReadS SearchProductsAsAdminResponse
Prelude.Read, Int -> SearchProductsAsAdminResponse -> ShowS
[SearchProductsAsAdminResponse] -> ShowS
SearchProductsAsAdminResponse -> String
(Int -> SearchProductsAsAdminResponse -> ShowS)
-> (SearchProductsAsAdminResponse -> String)
-> ([SearchProductsAsAdminResponse] -> ShowS)
-> Show SearchProductsAsAdminResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchProductsAsAdminResponse] -> ShowS
$cshowList :: [SearchProductsAsAdminResponse] -> ShowS
show :: SearchProductsAsAdminResponse -> String
$cshow :: SearchProductsAsAdminResponse -> String
showsPrec :: Int -> SearchProductsAsAdminResponse -> ShowS
$cshowsPrec :: Int -> SearchProductsAsAdminResponse -> ShowS
Prelude.Show, (forall x.
 SearchProductsAsAdminResponse
 -> Rep SearchProductsAsAdminResponse x)
-> (forall x.
    Rep SearchProductsAsAdminResponse x
    -> SearchProductsAsAdminResponse)
-> Generic SearchProductsAsAdminResponse
forall x.
Rep SearchProductsAsAdminResponse x
-> SearchProductsAsAdminResponse
forall x.
SearchProductsAsAdminResponse
-> Rep SearchProductsAsAdminResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchProductsAsAdminResponse x
-> SearchProductsAsAdminResponse
$cfrom :: forall x.
SearchProductsAsAdminResponse
-> Rep SearchProductsAsAdminResponse x
Prelude.Generic)

-- |
-- Create a value of 'SearchProductsAsAdminResponse' 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:
--
-- 'nextPageToken', 'searchProductsAsAdminResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'productViewDetails', 'searchProductsAsAdminResponse_productViewDetails' - Information about the product views.
--
-- 'httpStatus', 'searchProductsAsAdminResponse_httpStatus' - The response's http status code.
newSearchProductsAsAdminResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SearchProductsAsAdminResponse
newSearchProductsAsAdminResponse :: Int -> SearchProductsAsAdminResponse
newSearchProductsAsAdminResponse Int
pHttpStatus_ =
  SearchProductsAsAdminResponse' :: Maybe Text
-> Maybe [ProductViewDetail]
-> Int
-> SearchProductsAsAdminResponse
SearchProductsAsAdminResponse'
    { $sel:nextPageToken:SearchProductsAsAdminResponse' :: Maybe Text
nextPageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:productViewDetails:SearchProductsAsAdminResponse' :: Maybe [ProductViewDetail]
productViewDetails = Maybe [ProductViewDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SearchProductsAsAdminResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
searchProductsAsAdminResponse_nextPageToken :: Lens.Lens' SearchProductsAsAdminResponse (Prelude.Maybe Prelude.Text)
searchProductsAsAdminResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> SearchProductsAsAdminResponse -> f SearchProductsAsAdminResponse
searchProductsAsAdminResponse_nextPageToken = (SearchProductsAsAdminResponse -> Maybe Text)
-> (SearchProductsAsAdminResponse
    -> Maybe Text -> SearchProductsAsAdminResponse)
-> Lens' SearchProductsAsAdminResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdminResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:SearchProductsAsAdminResponse' :: SearchProductsAsAdminResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: SearchProductsAsAdminResponse
s@SearchProductsAsAdminResponse' {} Maybe Text
a -> SearchProductsAsAdminResponse
s {$sel:nextPageToken:SearchProductsAsAdminResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: SearchProductsAsAdminResponse)

-- | Information about the product views.
searchProductsAsAdminResponse_productViewDetails :: Lens.Lens' SearchProductsAsAdminResponse (Prelude.Maybe [ProductViewDetail])
searchProductsAsAdminResponse_productViewDetails :: (Maybe [ProductViewDetail] -> f (Maybe [ProductViewDetail]))
-> SearchProductsAsAdminResponse -> f SearchProductsAsAdminResponse
searchProductsAsAdminResponse_productViewDetails = (SearchProductsAsAdminResponse -> Maybe [ProductViewDetail])
-> (SearchProductsAsAdminResponse
    -> Maybe [ProductViewDetail] -> SearchProductsAsAdminResponse)
-> Lens' SearchProductsAsAdminResponse (Maybe [ProductViewDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProductsAsAdminResponse' {Maybe [ProductViewDetail]
productViewDetails :: Maybe [ProductViewDetail]
$sel:productViewDetails:SearchProductsAsAdminResponse' :: SearchProductsAsAdminResponse -> Maybe [ProductViewDetail]
productViewDetails} -> Maybe [ProductViewDetail]
productViewDetails) (\s :: SearchProductsAsAdminResponse
s@SearchProductsAsAdminResponse' {} Maybe [ProductViewDetail]
a -> SearchProductsAsAdminResponse
s {$sel:productViewDetails:SearchProductsAsAdminResponse' :: Maybe [ProductViewDetail]
productViewDetails = Maybe [ProductViewDetail]
a} :: SearchProductsAsAdminResponse) ((Maybe [ProductViewDetail] -> f (Maybe [ProductViewDetail]))
 -> SearchProductsAsAdminResponse
 -> f SearchProductsAsAdminResponse)
-> ((Maybe [ProductViewDetail] -> f (Maybe [ProductViewDetail]))
    -> Maybe [ProductViewDetail] -> f (Maybe [ProductViewDetail]))
-> (Maybe [ProductViewDetail] -> f (Maybe [ProductViewDetail]))
-> SearchProductsAsAdminResponse
-> f SearchProductsAsAdminResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProductViewDetail]
  [ProductViewDetail]
  [ProductViewDetail]
  [ProductViewDetail]
-> Iso
     (Maybe [ProductViewDetail])
     (Maybe [ProductViewDetail])
     (Maybe [ProductViewDetail])
     (Maybe [ProductViewDetail])
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
  [ProductViewDetail]
  [ProductViewDetail]
  [ProductViewDetail]
  [ProductViewDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData SearchProductsAsAdminResponse