{-# 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 #-}
module Amazonka.ServiceCatalog.SearchProductsAsAdmin
(
SearchProductsAsAdmin (..),
newSearchProductsAsAdmin,
searchProductsAsAdmin_acceptLanguage,
searchProductsAsAdmin_filters,
searchProductsAsAdmin_pageSize,
searchProductsAsAdmin_pageToken,
searchProductsAsAdmin_portfolioId,
searchProductsAsAdmin_productSource,
searchProductsAsAdmin_sortBy,
searchProductsAsAdmin_sortOrder,
SearchProductsAsAdminResponse (..),
newSearchProductsAsAdminResponse,
searchProductsAsAdminResponse_nextPageToken,
searchProductsAsAdminResponse_productViewDetails,
searchProductsAsAdminResponse_httpStatus,
)
where
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
import Amazonka.ServiceCatalog.Types
data SearchProductsAsAdmin = SearchProductsAsAdmin'
{
SearchProductsAsAdmin -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
filters :: Prelude.Maybe (Prelude.HashMap ProductViewFilterBy [Prelude.Text]),
SearchProductsAsAdmin -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
SearchProductsAsAdmin -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
SearchProductsAsAdmin -> Maybe Text
portfolioId :: Prelude.Maybe Prelude.Text,
SearchProductsAsAdmin -> Maybe ProductSource
productSource :: Prelude.Maybe ProductSource,
SearchProductsAsAdmin -> Maybe ProductViewSortBy
sortBy :: Prelude.Maybe ProductViewSortBy,
SearchProductsAsAdmin -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder
}
deriving (SearchProductsAsAdmin -> SearchProductsAsAdmin -> Bool
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]
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
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. 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)
newSearchProductsAsAdmin ::
SearchProductsAsAdmin
newSearchProductsAsAdmin :: SearchProductsAsAdmin
newSearchProductsAsAdmin =
SearchProductsAsAdmin'
{ $sel:acceptLanguage:SearchProductsAsAdmin' :: Maybe Text
acceptLanguage =
forall a. Maybe a
Prelude.Nothing,
$sel:filters:SearchProductsAsAdmin' :: Maybe (HashMap ProductViewFilterBy [Text])
filters = forall a. Maybe a
Prelude.Nothing,
$sel:pageSize:SearchProductsAsAdmin' :: Maybe Natural
pageSize = forall a. Maybe a
Prelude.Nothing,
$sel:pageToken:SearchProductsAsAdmin' :: Maybe Text
pageToken = forall a. Maybe a
Prelude.Nothing,
$sel:portfolioId:SearchProductsAsAdmin' :: Maybe Text
portfolioId = forall a. Maybe a
Prelude.Nothing,
$sel:productSource:SearchProductsAsAdmin' :: Maybe ProductSource
productSource = forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:SearchProductsAsAdmin' :: Maybe ProductViewSortBy
sortBy = forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:SearchProductsAsAdmin' :: Maybe SortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing
}
searchProductsAsAdmin_acceptLanguage :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Text)
searchProductsAsAdmin_acceptLanguage :: Lens' SearchProductsAsAdmin (Maybe Text)
searchProductsAsAdmin_acceptLanguage = 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)
searchProductsAsAdmin_filters :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe (Prelude.HashMap ProductViewFilterBy [Prelude.Text]))
searchProductsAsAdmin_filters :: Lens'
SearchProductsAsAdmin (Maybe (HashMap ProductViewFilterBy [Text]))
searchProductsAsAdmin_filters = 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) 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
searchProductsAsAdmin_pageSize :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Natural)
searchProductsAsAdmin_pageSize :: Lens' SearchProductsAsAdmin (Maybe Natural)
searchProductsAsAdmin_pageSize = 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)
searchProductsAsAdmin_pageToken :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Text)
searchProductsAsAdmin_pageToken :: Lens' SearchProductsAsAdmin (Maybe Text)
searchProductsAsAdmin_pageToken = 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)
searchProductsAsAdmin_portfolioId :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe Prelude.Text)
searchProductsAsAdmin_portfolioId :: Lens' SearchProductsAsAdmin (Maybe Text)
searchProductsAsAdmin_portfolioId = 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)
searchProductsAsAdmin_productSource :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe ProductSource)
searchProductsAsAdmin_productSource :: Lens' SearchProductsAsAdmin (Maybe ProductSource)
searchProductsAsAdmin_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)
searchProductsAsAdmin_sortBy :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe ProductViewSortBy)
searchProductsAsAdmin_sortBy :: Lens' SearchProductsAsAdmin (Maybe ProductViewSortBy)
searchProductsAsAdmin_sortBy = 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)
searchProductsAsAdmin_sortOrder :: Lens.Lens' SearchProductsAsAdmin (Prelude.Maybe SortOrder)
searchProductsAsAdmin_sortOrder :: Lens' SearchProductsAsAdmin (Maybe SortOrder)
searchProductsAsAdmin_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)
instance Core.AWSPager SearchProductsAsAdmin where
page :: SearchProductsAsAdmin
-> AWSResponse SearchProductsAsAdmin -> Maybe SearchProductsAsAdmin
page SearchProductsAsAdmin
rq AWSResponse SearchProductsAsAdmin
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse SearchProductsAsAdmin
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchProductsAsAdminResponse (Maybe Text)
searchProductsAsAdminResponse_nextPageToken
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 SearchProductsAsAdmin
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchProductsAsAdminResponse (Maybe [ProductViewDetail])
searchProductsAsAdminResponse_productViewDetails
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.$ SearchProductsAsAdmin
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' SearchProductsAsAdmin (Maybe Text)
searchProductsAsAdmin_pageToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse SearchProductsAsAdmin
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchProductsAsAdminResponse (Maybe Text)
searchProductsAsAdminResponse_nextPageToken
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 SearchProductsAsAdmin where
type
AWSResponse SearchProductsAsAdmin =
SearchProductsAsAdminResponse
request :: (Service -> Service)
-> SearchProductsAsAdmin -> Request SearchProductsAsAdmin
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SearchProductsAsAdmin
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchProductsAsAdmin)))
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 Text
-> Maybe [ProductViewDetail]
-> Int
-> SearchProductsAsAdminResponse
SearchProductsAsAdminResponse'
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
"NextPageToken")
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
"ProductViewDetails"
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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable SearchProductsAsAdmin where
hashWithSalt :: Int -> SearchProductsAsAdmin -> Int
hashWithSalt Int
_salt SearchProductsAsAdmin' {Maybe Natural
Maybe Text
Maybe (HashMap ProductViewFilterBy [Text])
Maybe ProductSource
Maybe ProductViewSortBy
Maybe SortOrder
sortOrder :: Maybe SortOrder
sortBy :: Maybe ProductViewSortBy
productSource :: Maybe ProductSource
portfolioId :: Maybe Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
filters :: Maybe (HashMap ProductViewFilterBy [Text])
acceptLanguage :: Maybe Text
$sel:sortOrder:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe SortOrder
$sel:sortBy:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductViewSortBy
$sel:productSource:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductSource
$sel:portfolioId:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:pageToken:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:pageSize:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Natural
$sel:filters:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
$sel:acceptLanguage:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceptLanguage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap ProductViewFilterBy [Text])
filters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pageSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pageToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
portfolioId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductSource
productSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProductViewSortBy
sortBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SortOrder
sortOrder
instance Prelude.NFData SearchProductsAsAdmin where
rnf :: SearchProductsAsAdmin -> ()
rnf SearchProductsAsAdmin' {Maybe Natural
Maybe Text
Maybe (HashMap ProductViewFilterBy [Text])
Maybe ProductSource
Maybe ProductViewSortBy
Maybe SortOrder
sortOrder :: Maybe SortOrder
sortBy :: Maybe ProductViewSortBy
productSource :: Maybe ProductSource
portfolioId :: Maybe Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
filters :: Maybe (HashMap ProductViewFilterBy [Text])
acceptLanguage :: Maybe Text
$sel:sortOrder:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe SortOrder
$sel:sortBy:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductViewSortBy
$sel:productSource:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductSource
$sel:portfolioId:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:pageToken:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:pageSize:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Natural
$sel:filters:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
$sel:acceptLanguage:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceptLanguage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap ProductViewFilterBy [Text])
filters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
pageSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pageToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
portfolioId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductSource
productSource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductViewSortBy
sortBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SortOrder
sortOrder
instance Data.ToHeaders SearchProductsAsAdmin where
toHeaders :: SearchProductsAsAdmin -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWS242ServiceCatalogService.SearchProductsAsAdmin" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON SearchProductsAsAdmin where
toJSON :: SearchProductsAsAdmin -> Value
toJSON SearchProductsAsAdmin' {Maybe Natural
Maybe Text
Maybe (HashMap ProductViewFilterBy [Text])
Maybe ProductSource
Maybe ProductViewSortBy
Maybe SortOrder
sortOrder :: Maybe SortOrder
sortBy :: Maybe ProductViewSortBy
productSource :: Maybe ProductSource
portfolioId :: Maybe Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
filters :: Maybe (HashMap ProductViewFilterBy [Text])
acceptLanguage :: Maybe Text
$sel:sortOrder:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe SortOrder
$sel:sortBy:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductViewSortBy
$sel:productSource:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe ProductSource
$sel:portfolioId:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:pageToken:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
$sel:pageSize:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Natural
$sel:filters:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe (HashMap ProductViewFilterBy [Text])
$sel:acceptLanguage:SearchProductsAsAdmin' :: SearchProductsAsAdmin -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AcceptLanguage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
(Key
"Filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap ProductViewFilterBy [Text])
filters,
(Key
"PageSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pageSize,
(Key
"PageToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pageToken,
(Key
"PortfolioId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
portfolioId,
(Key
"ProductSource" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProductSource
productSource,
(Key
"SortBy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProductViewSortBy
sortBy,
(Key
"SortOrder" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder
]
)
instance Data.ToPath SearchProductsAsAdmin where
toPath :: SearchProductsAsAdmin -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SearchProductsAsAdmin where
toQuery :: SearchProductsAsAdmin -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data SearchProductsAsAdminResponse = SearchProductsAsAdminResponse'
{
SearchProductsAsAdminResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
SearchProductsAsAdminResponse -> Maybe [ProductViewDetail]
productViewDetails :: Prelude.Maybe [ProductViewDetail],
SearchProductsAsAdminResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SearchProductsAsAdminResponse
-> SearchProductsAsAdminResponse -> Bool
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]
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
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.
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)
newSearchProductsAsAdminResponse ::
Prelude.Int ->
SearchProductsAsAdminResponse
newSearchProductsAsAdminResponse :: Int -> SearchProductsAsAdminResponse
newSearchProductsAsAdminResponse Int
pHttpStatus_ =
SearchProductsAsAdminResponse'
{ $sel:nextPageToken:SearchProductsAsAdminResponse' :: Maybe Text
nextPageToken =
forall a. Maybe a
Prelude.Nothing,
$sel:productViewDetails:SearchProductsAsAdminResponse' :: Maybe [ProductViewDetail]
productViewDetails = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SearchProductsAsAdminResponse' :: Int
httpStatus = Int
pHttpStatus_
}
searchProductsAsAdminResponse_nextPageToken :: Lens.Lens' SearchProductsAsAdminResponse (Prelude.Maybe Prelude.Text)
searchProductsAsAdminResponse_nextPageToken :: Lens' SearchProductsAsAdminResponse (Maybe Text)
searchProductsAsAdminResponse_nextPageToken = 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)
searchProductsAsAdminResponse_productViewDetails :: Lens.Lens' SearchProductsAsAdminResponse (Prelude.Maybe [ProductViewDetail])
searchProductsAsAdminResponse_productViewDetails :: Lens' SearchProductsAsAdminResponse (Maybe [ProductViewDetail])
searchProductsAsAdminResponse_productViewDetails = 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) 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
searchProductsAsAdminResponse_httpStatus :: Lens.Lens' SearchProductsAsAdminResponse Prelude.Int
searchProductsAsAdminResponse_httpStatus :: Lens' SearchProductsAsAdminResponse Int
searchProductsAsAdminResponse_httpStatus = 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 where
rnf :: SearchProductsAsAdminResponse -> ()
rnf SearchProductsAsAdminResponse' {Int
Maybe [ProductViewDetail]
Maybe Text
httpStatus :: Int
productViewDetails :: Maybe [ProductViewDetail]
nextPageToken :: Maybe Text
$sel:httpStatus:SearchProductsAsAdminResponse' :: SearchProductsAsAdminResponse -> Int
$sel:productViewDetails:SearchProductsAsAdminResponse' :: SearchProductsAsAdminResponse -> Maybe [ProductViewDetail]
$sel:nextPageToken:SearchProductsAsAdminResponse' :: SearchProductsAsAdminResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProductViewDetail]
productViewDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus