{-# 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.ListStackInstancesForProvisionedProduct
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns summary information about stack instances that are associated
-- with the specified @CFN_STACKSET@ type provisioned product. You can
-- filter for stack instances that are associated with a specific Amazon
-- Web Services account name or Region.
module Amazonka.ServiceCatalog.ListStackInstancesForProvisionedProduct
  ( -- * Creating a Request
    ListStackInstancesForProvisionedProduct (..),
    newListStackInstancesForProvisionedProduct,

    -- * Request Lenses
    listStackInstancesForProvisionedProduct_acceptLanguage,
    listStackInstancesForProvisionedProduct_pageSize,
    listStackInstancesForProvisionedProduct_pageToken,
    listStackInstancesForProvisionedProduct_provisionedProductId,

    -- * Destructuring the Response
    ListStackInstancesForProvisionedProductResponse (..),
    newListStackInstancesForProvisionedProductResponse,

    -- * Response Lenses
    listStackInstancesForProvisionedProductResponse_nextPageToken,
    listStackInstancesForProvisionedProductResponse_stackInstances,
    listStackInstancesForProvisionedProductResponse_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:/ 'newListStackInstancesForProvisionedProduct' smart constructor.
data ListStackInstancesForProvisionedProduct = ListStackInstancesForProvisionedProduct'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ListStackInstancesForProvisionedProduct -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    ListStackInstancesForProvisionedProduct -> 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.
    ListStackInstancesForProvisionedProduct -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the provisioned product.
    ListStackInstancesForProvisionedProduct -> Text
provisionedProductId :: Prelude.Text
  }
  deriving (ListStackInstancesForProvisionedProduct
-> ListStackInstancesForProvisionedProduct -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStackInstancesForProvisionedProduct
-> ListStackInstancesForProvisionedProduct -> Bool
$c/= :: ListStackInstancesForProvisionedProduct
-> ListStackInstancesForProvisionedProduct -> Bool
== :: ListStackInstancesForProvisionedProduct
-> ListStackInstancesForProvisionedProduct -> Bool
$c== :: ListStackInstancesForProvisionedProduct
-> ListStackInstancesForProvisionedProduct -> Bool
Prelude.Eq, ReadPrec [ListStackInstancesForProvisionedProduct]
ReadPrec ListStackInstancesForProvisionedProduct
Int -> ReadS ListStackInstancesForProvisionedProduct
ReadS [ListStackInstancesForProvisionedProduct]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStackInstancesForProvisionedProduct]
$creadListPrec :: ReadPrec [ListStackInstancesForProvisionedProduct]
readPrec :: ReadPrec ListStackInstancesForProvisionedProduct
$creadPrec :: ReadPrec ListStackInstancesForProvisionedProduct
readList :: ReadS [ListStackInstancesForProvisionedProduct]
$creadList :: ReadS [ListStackInstancesForProvisionedProduct]
readsPrec :: Int -> ReadS ListStackInstancesForProvisionedProduct
$creadsPrec :: Int -> ReadS ListStackInstancesForProvisionedProduct
Prelude.Read, Int -> ListStackInstancesForProvisionedProduct -> ShowS
[ListStackInstancesForProvisionedProduct] -> ShowS
ListStackInstancesForProvisionedProduct -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStackInstancesForProvisionedProduct] -> ShowS
$cshowList :: [ListStackInstancesForProvisionedProduct] -> ShowS
show :: ListStackInstancesForProvisionedProduct -> String
$cshow :: ListStackInstancesForProvisionedProduct -> String
showsPrec :: Int -> ListStackInstancesForProvisionedProduct -> ShowS
$cshowsPrec :: Int -> ListStackInstancesForProvisionedProduct -> ShowS
Prelude.Show, forall x.
Rep ListStackInstancesForProvisionedProduct x
-> ListStackInstancesForProvisionedProduct
forall x.
ListStackInstancesForProvisionedProduct
-> Rep ListStackInstancesForProvisionedProduct x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListStackInstancesForProvisionedProduct x
-> ListStackInstancesForProvisionedProduct
$cfrom :: forall x.
ListStackInstancesForProvisionedProduct
-> Rep ListStackInstancesForProvisionedProduct x
Prelude.Generic)

-- |
-- Create a value of 'ListStackInstancesForProvisionedProduct' 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', 'listStackInstancesForProvisionedProduct_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageSize', 'listStackInstancesForProvisionedProduct_pageSize' - The maximum number of items to return with this call.
--
-- 'pageToken', 'listStackInstancesForProvisionedProduct_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'provisionedProductId', 'listStackInstancesForProvisionedProduct_provisionedProductId' - The identifier of the provisioned product.
newListStackInstancesForProvisionedProduct ::
  -- | 'provisionedProductId'
  Prelude.Text ->
  ListStackInstancesForProvisionedProduct
newListStackInstancesForProvisionedProduct :: Text -> ListStackInstancesForProvisionedProduct
newListStackInstancesForProvisionedProduct
  Text
pProvisionedProductId_ =
    ListStackInstancesForProvisionedProduct'
      { $sel:acceptLanguage:ListStackInstancesForProvisionedProduct' :: Maybe Text
acceptLanguage =
          forall a. Maybe a
Prelude.Nothing,
        $sel:pageSize:ListStackInstancesForProvisionedProduct' :: Maybe Natural
pageSize = forall a. Maybe a
Prelude.Nothing,
        $sel:pageToken:ListStackInstancesForProvisionedProduct' :: Maybe Text
pageToken = forall a. Maybe a
Prelude.Nothing,
        $sel:provisionedProductId:ListStackInstancesForProvisionedProduct' :: Text
provisionedProductId =
          Text
pProvisionedProductId_
      }

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

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

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

-- | The identifier of the provisioned product.
listStackInstancesForProvisionedProduct_provisionedProductId :: Lens.Lens' ListStackInstancesForProvisionedProduct Prelude.Text
listStackInstancesForProvisionedProduct_provisionedProductId :: Lens' ListStackInstancesForProvisionedProduct Text
listStackInstancesForProvisionedProduct_provisionedProductId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackInstancesForProvisionedProduct' {Text
provisionedProductId :: Text
$sel:provisionedProductId:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Text
provisionedProductId} -> Text
provisionedProductId) (\s :: ListStackInstancesForProvisionedProduct
s@ListStackInstancesForProvisionedProduct' {} Text
a -> ListStackInstancesForProvisionedProduct
s {$sel:provisionedProductId:ListStackInstancesForProvisionedProduct' :: Text
provisionedProductId = Text
a} :: ListStackInstancesForProvisionedProduct)

instance
  Core.AWSRequest
    ListStackInstancesForProvisionedProduct
  where
  type
    AWSResponse
      ListStackInstancesForProvisionedProduct =
      ListStackInstancesForProvisionedProductResponse
  request :: (Service -> Service)
-> ListStackInstancesForProvisionedProduct
-> Request ListStackInstancesForProvisionedProduct
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 ListStackInstancesForProvisionedProduct
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListStackInstancesForProvisionedProduct)))
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 [StackInstance]
-> Int
-> ListStackInstancesForProvisionedProductResponse
ListStackInstancesForProvisionedProductResponse'
            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
"StackInstances" 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
    ListStackInstancesForProvisionedProduct
  where
  hashWithSalt :: Int -> ListStackInstancesForProvisionedProduct -> Int
hashWithSalt
    Int
_salt
    ListStackInstancesForProvisionedProduct' {Maybe Natural
Maybe Text
Text
provisionedProductId :: Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:provisionedProductId:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Text
$sel:pageToken:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Maybe Text
$sel:pageSize:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Maybe Natural
$sel:acceptLanguage:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> 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 Natural
pageSize
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pageToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
provisionedProductId

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

instance
  Data.ToHeaders
    ListStackInstancesForProvisionedProduct
  where
  toHeaders :: ListStackInstancesForProvisionedProduct -> 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.ListStackInstancesForProvisionedProduct" ::
                          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
    ListStackInstancesForProvisionedProduct
  where
  toJSON :: ListStackInstancesForProvisionedProduct -> Value
toJSON ListStackInstancesForProvisionedProduct' {Maybe Natural
Maybe Text
Text
provisionedProductId :: Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:provisionedProductId:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Text
$sel:pageToken:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Maybe Text
$sel:pageSize:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> Maybe Natural
$sel:acceptLanguage:ListStackInstancesForProvisionedProduct' :: ListStackInstancesForProvisionedProduct -> 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
"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,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"ProvisionedProductId"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
provisionedProductId
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'ListStackInstancesForProvisionedProductResponse' 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', 'listStackInstancesForProvisionedProductResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'stackInstances', 'listStackInstancesForProvisionedProductResponse_stackInstances' - List of stack instances.
--
-- 'httpStatus', 'listStackInstancesForProvisionedProductResponse_httpStatus' - The response's http status code.
newListStackInstancesForProvisionedProductResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListStackInstancesForProvisionedProductResponse
newListStackInstancesForProvisionedProductResponse :: Int -> ListStackInstancesForProvisionedProductResponse
newListStackInstancesForProvisionedProductResponse
  Int
pHttpStatus_ =
    ListStackInstancesForProvisionedProductResponse'
      { $sel:nextPageToken:ListStackInstancesForProvisionedProductResponse' :: Maybe Text
nextPageToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:stackInstances:ListStackInstancesForProvisionedProductResponse' :: Maybe [StackInstance]
stackInstances =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListStackInstancesForProvisionedProductResponse' :: 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.
listStackInstancesForProvisionedProductResponse_nextPageToken :: Lens.Lens' ListStackInstancesForProvisionedProductResponse (Prelude.Maybe Prelude.Text)
listStackInstancesForProvisionedProductResponse_nextPageToken :: Lens' ListStackInstancesForProvisionedProductResponse (Maybe Text)
listStackInstancesForProvisionedProductResponse_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackInstancesForProvisionedProductResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:ListStackInstancesForProvisionedProductResponse' :: ListStackInstancesForProvisionedProductResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: ListStackInstancesForProvisionedProductResponse
s@ListStackInstancesForProvisionedProductResponse' {} Maybe Text
a -> ListStackInstancesForProvisionedProductResponse
s {$sel:nextPageToken:ListStackInstancesForProvisionedProductResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: ListStackInstancesForProvisionedProductResponse)

-- | List of stack instances.
listStackInstancesForProvisionedProductResponse_stackInstances :: Lens.Lens' ListStackInstancesForProvisionedProductResponse (Prelude.Maybe [StackInstance])
listStackInstancesForProvisionedProductResponse_stackInstances :: Lens'
  ListStackInstancesForProvisionedProductResponse
  (Maybe [StackInstance])
listStackInstancesForProvisionedProductResponse_stackInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackInstancesForProvisionedProductResponse' {Maybe [StackInstance]
stackInstances :: Maybe [StackInstance]
$sel:stackInstances:ListStackInstancesForProvisionedProductResponse' :: ListStackInstancesForProvisionedProductResponse
-> Maybe [StackInstance]
stackInstances} -> Maybe [StackInstance]
stackInstances) (\s :: ListStackInstancesForProvisionedProductResponse
s@ListStackInstancesForProvisionedProductResponse' {} Maybe [StackInstance]
a -> ListStackInstancesForProvisionedProductResponse
s {$sel:stackInstances:ListStackInstancesForProvisionedProductResponse' :: Maybe [StackInstance]
stackInstances = Maybe [StackInstance]
a} :: ListStackInstancesForProvisionedProductResponse) 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.
listStackInstancesForProvisionedProductResponse_httpStatus :: Lens.Lens' ListStackInstancesForProvisionedProductResponse Prelude.Int
listStackInstancesForProvisionedProductResponse_httpStatus :: Lens' ListStackInstancesForProvisionedProductResponse Int
listStackInstancesForProvisionedProductResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackInstancesForProvisionedProductResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListStackInstancesForProvisionedProductResponse' :: ListStackInstancesForProvisionedProductResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListStackInstancesForProvisionedProductResponse
s@ListStackInstancesForProvisionedProductResponse' {} Int
a -> ListStackInstancesForProvisionedProductResponse
s {$sel:httpStatus:ListStackInstancesForProvisionedProductResponse' :: Int
httpStatus = Int
a} :: ListStackInstancesForProvisionedProductResponse)

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