{-# 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.ScanProvisionedProducts
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the provisioned products that are available (not terminated).
--
-- To use additional filtering, see SearchProvisionedProducts.
--
-- This operation returns paginated results.
module Amazonka.ServiceCatalog.ScanProvisionedProducts
  ( -- * Creating a Request
    ScanProvisionedProducts (..),
    newScanProvisionedProducts,

    -- * Request Lenses
    scanProvisionedProducts_acceptLanguage,
    scanProvisionedProducts_accessLevelFilter,
    scanProvisionedProducts_pageSize,
    scanProvisionedProducts_pageToken,

    -- * Destructuring the Response
    ScanProvisionedProductsResponse (..),
    newScanProvisionedProductsResponse,

    -- * Response Lenses
    scanProvisionedProductsResponse_nextPageToken,
    scanProvisionedProductsResponse_provisionedProducts,
    scanProvisionedProductsResponse_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

-- | /See:/ 'newScanProvisionedProducts' smart constructor.
data ScanProvisionedProducts = ScanProvisionedProducts'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ScanProvisionedProducts -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The access level to use to obtain results. The default is @User@.
    ScanProvisionedProducts -> Maybe AccessLevelFilter
accessLevelFilter :: Prelude.Maybe AccessLevelFilter,
    -- | The maximum number of items to return with this call.
    ScanProvisionedProducts -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    ScanProvisionedProducts -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ScanProvisionedProducts -> ScanProvisionedProducts -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScanProvisionedProducts -> ScanProvisionedProducts -> Bool
$c/= :: ScanProvisionedProducts -> ScanProvisionedProducts -> Bool
== :: ScanProvisionedProducts -> ScanProvisionedProducts -> Bool
$c== :: ScanProvisionedProducts -> ScanProvisionedProducts -> Bool
Prelude.Eq, ReadPrec [ScanProvisionedProducts]
ReadPrec ScanProvisionedProducts
Int -> ReadS ScanProvisionedProducts
ReadS [ScanProvisionedProducts]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScanProvisionedProducts]
$creadListPrec :: ReadPrec [ScanProvisionedProducts]
readPrec :: ReadPrec ScanProvisionedProducts
$creadPrec :: ReadPrec ScanProvisionedProducts
readList :: ReadS [ScanProvisionedProducts]
$creadList :: ReadS [ScanProvisionedProducts]
readsPrec :: Int -> ReadS ScanProvisionedProducts
$creadsPrec :: Int -> ReadS ScanProvisionedProducts
Prelude.Read, Int -> ScanProvisionedProducts -> ShowS
[ScanProvisionedProducts] -> ShowS
ScanProvisionedProducts -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScanProvisionedProducts] -> ShowS
$cshowList :: [ScanProvisionedProducts] -> ShowS
show :: ScanProvisionedProducts -> String
$cshow :: ScanProvisionedProducts -> String
showsPrec :: Int -> ScanProvisionedProducts -> ShowS
$cshowsPrec :: Int -> ScanProvisionedProducts -> ShowS
Prelude.Show, forall x. Rep ScanProvisionedProducts x -> ScanProvisionedProducts
forall x. ScanProvisionedProducts -> Rep ScanProvisionedProducts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScanProvisionedProducts x -> ScanProvisionedProducts
$cfrom :: forall x. ScanProvisionedProducts -> Rep ScanProvisionedProducts x
Prelude.Generic)

-- |
-- Create a value of 'ScanProvisionedProducts' 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:
--
-- 'acceptLanguage', 'scanProvisionedProducts_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'accessLevelFilter', 'scanProvisionedProducts_accessLevelFilter' - The access level to use to obtain results. The default is @User@.
--
-- 'pageSize', 'scanProvisionedProducts_pageSize' - The maximum number of items to return with this call.
--
-- 'pageToken', 'scanProvisionedProducts_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
newScanProvisionedProducts ::
  ScanProvisionedProducts
newScanProvisionedProducts :: ScanProvisionedProducts
newScanProvisionedProducts =
  ScanProvisionedProducts'
    { $sel:acceptLanguage:ScanProvisionedProducts' :: Maybe Text
acceptLanguage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:accessLevelFilter:ScanProvisionedProducts' :: Maybe AccessLevelFilter
accessLevelFilter = forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ScanProvisionedProducts' :: Maybe Natural
pageSize = forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:ScanProvisionedProducts' :: Maybe Text
pageToken = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The access level to use to obtain results. The default is @User@.
scanProvisionedProducts_accessLevelFilter :: Lens.Lens' ScanProvisionedProducts (Prelude.Maybe AccessLevelFilter)
scanProvisionedProducts_accessLevelFilter :: Lens' ScanProvisionedProducts (Maybe AccessLevelFilter)
scanProvisionedProducts_accessLevelFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScanProvisionedProducts' {Maybe AccessLevelFilter
accessLevelFilter :: Maybe AccessLevelFilter
$sel:accessLevelFilter:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe AccessLevelFilter
accessLevelFilter} -> Maybe AccessLevelFilter
accessLevelFilter) (\s :: ScanProvisionedProducts
s@ScanProvisionedProducts' {} Maybe AccessLevelFilter
a -> ScanProvisionedProducts
s {$sel:accessLevelFilter:ScanProvisionedProducts' :: Maybe AccessLevelFilter
accessLevelFilter = Maybe AccessLevelFilter
a} :: ScanProvisionedProducts)

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

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

instance Core.AWSPager ScanProvisionedProducts where
  page :: ScanProvisionedProducts
-> AWSResponse ScanProvisionedProducts
-> Maybe ScanProvisionedProducts
page ScanProvisionedProducts
rq AWSResponse ScanProvisionedProducts
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ScanProvisionedProducts
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ScanProvisionedProductsResponse (Maybe Text)
scanProvisionedProductsResponse_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 ScanProvisionedProducts
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ScanProvisionedProductsResponse (Maybe [ProvisionedProductDetail])
scanProvisionedProductsResponse_provisionedProducts
            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.$ ScanProvisionedProducts
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ScanProvisionedProducts (Maybe Text)
scanProvisionedProducts_pageToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ScanProvisionedProducts
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ScanProvisionedProductsResponse (Maybe Text)
scanProvisionedProductsResponse_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 ScanProvisionedProducts where
  type
    AWSResponse ScanProvisionedProducts =
      ScanProvisionedProductsResponse
  request :: (Service -> Service)
-> ScanProvisionedProducts -> Request ScanProvisionedProducts
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 ScanProvisionedProducts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ScanProvisionedProducts)))
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 [ProvisionedProductDetail]
-> Int
-> ScanProvisionedProductsResponse
ScanProvisionedProductsResponse'
            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
"ProvisionedProducts"
                            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 ScanProvisionedProducts where
  hashWithSalt :: Int -> ScanProvisionedProducts -> Int
hashWithSalt Int
_salt ScanProvisionedProducts' {Maybe Natural
Maybe Text
Maybe AccessLevelFilter
pageToken :: Maybe Text
pageSize :: Maybe Natural
accessLevelFilter :: Maybe AccessLevelFilter
acceptLanguage :: Maybe Text
$sel:pageToken:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe Text
$sel:pageSize:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe Natural
$sel:accessLevelFilter:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe AccessLevelFilter
$sel:acceptLanguage:ScanProvisionedProducts' :: ScanProvisionedProducts -> 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 AccessLevelFilter
accessLevelFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pageSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pageToken

instance Prelude.NFData ScanProvisionedProducts where
  rnf :: ScanProvisionedProducts -> ()
rnf ScanProvisionedProducts' {Maybe Natural
Maybe Text
Maybe AccessLevelFilter
pageToken :: Maybe Text
pageSize :: Maybe Natural
accessLevelFilter :: Maybe AccessLevelFilter
acceptLanguage :: Maybe Text
$sel:pageToken:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe Text
$sel:pageSize:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe Natural
$sel:accessLevelFilter:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe AccessLevelFilter
$sel:acceptLanguage:ScanProvisionedProducts' :: ScanProvisionedProducts -> 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 AccessLevelFilter
accessLevelFilter
      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

instance Data.ToHeaders ScanProvisionedProducts where
  toHeaders :: ScanProvisionedProducts -> 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.ScanProvisionedProducts" ::
                          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 ScanProvisionedProducts where
  toJSON :: ScanProvisionedProducts -> Value
toJSON ScanProvisionedProducts' {Maybe Natural
Maybe Text
Maybe AccessLevelFilter
pageToken :: Maybe Text
pageSize :: Maybe Natural
accessLevelFilter :: Maybe AccessLevelFilter
acceptLanguage :: Maybe Text
$sel:pageToken:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe Text
$sel:pageSize:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe Natural
$sel:accessLevelFilter:ScanProvisionedProducts' :: ScanProvisionedProducts -> Maybe AccessLevelFilter
$sel:acceptLanguage:ScanProvisionedProducts' :: ScanProvisionedProducts -> 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
"AccessLevelFilter" 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 AccessLevelFilter
accessLevelFilter,
            (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
          ]
      )

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

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

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

-- |
-- Create a value of 'ScanProvisionedProductsResponse' 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', 'scanProvisionedProductsResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'provisionedProducts', 'scanProvisionedProductsResponse_provisionedProducts' - Information about the provisioned products.
--
-- 'httpStatus', 'scanProvisionedProductsResponse_httpStatus' - The response's http status code.
newScanProvisionedProductsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ScanProvisionedProductsResponse
newScanProvisionedProductsResponse :: Int -> ScanProvisionedProductsResponse
newScanProvisionedProductsResponse Int
pHttpStatus_ =
  ScanProvisionedProductsResponse'
    { $sel:nextPageToken:ScanProvisionedProductsResponse' :: Maybe Text
nextPageToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:provisionedProducts:ScanProvisionedProductsResponse' :: Maybe [ProvisionedProductDetail]
provisionedProducts = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ScanProvisionedProductsResponse' :: 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.
scanProvisionedProductsResponse_nextPageToken :: Lens.Lens' ScanProvisionedProductsResponse (Prelude.Maybe Prelude.Text)
scanProvisionedProductsResponse_nextPageToken :: Lens' ScanProvisionedProductsResponse (Maybe Text)
scanProvisionedProductsResponse_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScanProvisionedProductsResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:ScanProvisionedProductsResponse' :: ScanProvisionedProductsResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: ScanProvisionedProductsResponse
s@ScanProvisionedProductsResponse' {} Maybe Text
a -> ScanProvisionedProductsResponse
s {$sel:nextPageToken:ScanProvisionedProductsResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: ScanProvisionedProductsResponse)

-- | Information about the provisioned products.
scanProvisionedProductsResponse_provisionedProducts :: Lens.Lens' ScanProvisionedProductsResponse (Prelude.Maybe [ProvisionedProductDetail])
scanProvisionedProductsResponse_provisionedProducts :: Lens'
  ScanProvisionedProductsResponse (Maybe [ProvisionedProductDetail])
scanProvisionedProductsResponse_provisionedProducts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScanProvisionedProductsResponse' {Maybe [ProvisionedProductDetail]
provisionedProducts :: Maybe [ProvisionedProductDetail]
$sel:provisionedProducts:ScanProvisionedProductsResponse' :: ScanProvisionedProductsResponse -> Maybe [ProvisionedProductDetail]
provisionedProducts} -> Maybe [ProvisionedProductDetail]
provisionedProducts) (\s :: ScanProvisionedProductsResponse
s@ScanProvisionedProductsResponse' {} Maybe [ProvisionedProductDetail]
a -> ScanProvisionedProductsResponse
s {$sel:provisionedProducts:ScanProvisionedProductsResponse' :: Maybe [ProvisionedProductDetail]
provisionedProducts = Maybe [ProvisionedProductDetail]
a} :: ScanProvisionedProductsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ScanProvisionedProductsResponse
  where
  rnf :: ScanProvisionedProductsResponse -> ()
rnf ScanProvisionedProductsResponse' {Int
Maybe [ProvisionedProductDetail]
Maybe Text
httpStatus :: Int
provisionedProducts :: Maybe [ProvisionedProductDetail]
nextPageToken :: Maybe Text
$sel:httpStatus:ScanProvisionedProductsResponse' :: ScanProvisionedProductsResponse -> Int
$sel:provisionedProducts:ScanProvisionedProductsResponse' :: ScanProvisionedProductsResponse -> Maybe [ProvisionedProductDetail]
$sel:nextPageToken:ScanProvisionedProductsResponse' :: ScanProvisionedProductsResponse -> 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 [ProvisionedProductDetail]
provisionedProducts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus