{-# 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-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)
--
-- 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 AWS
-- account name or region.
module Amazonka.ServiceCatalog.ListStackInstancesForProvisionedProduct
  ( -- * Creating a Request
    ListStackInstancesForProvisionedProduct (..),
    newListStackInstancesForProvisionedProduct,

    -- * Request Lenses
    listStackInstancesForProvisionedProduct_acceptLanguage,
    listStackInstancesForProvisionedProduct_pageToken,
    listStackInstancesForProvisionedProduct_pageSize,
    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.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:/ '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 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 maximum number of items to return with this call.
    ListStackInstancesForProvisionedProduct -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the provisioned product.
    ListStackInstancesForProvisionedProduct -> Text
provisionedProductId :: Prelude.Text
  }
  deriving (ListStackInstancesForProvisionedProduct
-> ListStackInstancesForProvisionedProduct -> Bool
(ListStackInstancesForProvisionedProduct
 -> ListStackInstancesForProvisionedProduct -> Bool)
-> (ListStackInstancesForProvisionedProduct
    -> ListStackInstancesForProvisionedProduct -> Bool)
-> Eq ListStackInstancesForProvisionedProduct
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]
(Int -> ReadS ListStackInstancesForProvisionedProduct)
-> ReadS [ListStackInstancesForProvisionedProduct]
-> ReadPrec ListStackInstancesForProvisionedProduct
-> ReadPrec [ListStackInstancesForProvisionedProduct]
-> Read 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
(Int -> ListStackInstancesForProvisionedProduct -> ShowS)
-> (ListStackInstancesForProvisionedProduct -> String)
-> ([ListStackInstancesForProvisionedProduct] -> ShowS)
-> Show ListStackInstancesForProvisionedProduct
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.
 ListStackInstancesForProvisionedProduct
 -> Rep ListStackInstancesForProvisionedProduct x)
-> (forall x.
    Rep ListStackInstancesForProvisionedProduct x
    -> ListStackInstancesForProvisionedProduct)
-> Generic ListStackInstancesForProvisionedProduct
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
--
-- 'pageToken', 'listStackInstancesForProvisionedProduct_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'pageSize', 'listStackInstancesForProvisionedProduct_pageSize' - The maximum number of items to return with this call.
--
-- 'provisionedProductId', 'listStackInstancesForProvisionedProduct_provisionedProductId' - The identifier of the provisioned product.
newListStackInstancesForProvisionedProduct ::
  -- | 'provisionedProductId'
  Prelude.Text ->
  ListStackInstancesForProvisionedProduct
newListStackInstancesForProvisionedProduct :: Text -> ListStackInstancesForProvisionedProduct
newListStackInstancesForProvisionedProduct
  Text
pProvisionedProductId_ =
    ListStackInstancesForProvisionedProduct' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> ListStackInstancesForProvisionedProduct
ListStackInstancesForProvisionedProduct'
      { $sel:acceptLanguage:ListStackInstancesForProvisionedProduct' :: Maybe Text
acceptLanguage =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pageToken:ListStackInstancesForProvisionedProduct' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pageSize:ListStackInstancesForProvisionedProduct' :: Maybe Natural
pageSize = Maybe Natural
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 :: (Maybe Text -> f (Maybe Text))
-> ListStackInstancesForProvisionedProduct
-> f ListStackInstancesForProvisionedProduct
listStackInstancesForProvisionedProduct_acceptLanguage = (ListStackInstancesForProvisionedProduct -> Maybe Text)
-> (ListStackInstancesForProvisionedProduct
    -> Maybe Text -> ListStackInstancesForProvisionedProduct)
-> Lens
     ListStackInstancesForProvisionedProduct
     ListStackInstancesForProvisionedProduct
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> ListStackInstancesForProvisionedProduct
-> f ListStackInstancesForProvisionedProduct
listStackInstancesForProvisionedProduct_pageToken = (ListStackInstancesForProvisionedProduct -> Maybe Text)
-> (ListStackInstancesForProvisionedProduct
    -> Maybe Text -> ListStackInstancesForProvisionedProduct)
-> Lens
     ListStackInstancesForProvisionedProduct
     ListStackInstancesForProvisionedProduct
     (Maybe Text)
     (Maybe Text)
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 maximum number of items to return with this call.
listStackInstancesForProvisionedProduct_pageSize :: Lens.Lens' ListStackInstancesForProvisionedProduct (Prelude.Maybe Prelude.Natural)
listStackInstancesForProvisionedProduct_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListStackInstancesForProvisionedProduct
-> f ListStackInstancesForProvisionedProduct
listStackInstancesForProvisionedProduct_pageSize = (ListStackInstancesForProvisionedProduct -> Maybe Natural)
-> (ListStackInstancesForProvisionedProduct
    -> Maybe Natural -> ListStackInstancesForProvisionedProduct)
-> Lens
     ListStackInstancesForProvisionedProduct
     ListStackInstancesForProvisionedProduct
     (Maybe Natural)
     (Maybe Natural)
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 identifier of the provisioned product.
listStackInstancesForProvisionedProduct_provisionedProductId :: Lens.Lens' ListStackInstancesForProvisionedProduct Prelude.Text
listStackInstancesForProvisionedProduct_provisionedProductId :: (Text -> f Text)
-> ListStackInstancesForProvisionedProduct
-> f ListStackInstancesForProvisionedProduct
listStackInstancesForProvisionedProduct_provisionedProductId = (ListStackInstancesForProvisionedProduct -> Text)
-> (ListStackInstancesForProvisionedProduct
    -> Text -> ListStackInstancesForProvisionedProduct)
-> Lens
     ListStackInstancesForProvisionedProduct
     ListStackInstancesForProvisionedProduct
     Text
     Text
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 :: ListStackInstancesForProvisionedProduct
-> Request ListStackInstancesForProvisionedProduct
request = Service
-> ListStackInstancesForProvisionedProduct
-> Request ListStackInstancesForProvisionedProduct
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListStackInstancesForProvisionedProduct
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListStackInstancesForProvisionedProduct)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse ListStackInstancesForProvisionedProduct))
-> Logger
-> Service
-> Proxy ListStackInstancesForProvisionedProduct
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListStackInstancesForProvisionedProduct)))
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 [StackInstance]
-> Int
-> ListStackInstancesForProvisionedProductResponse
ListStackInstancesForProvisionedProductResponse'
            (Maybe Text
 -> Maybe [StackInstance]
 -> Int
 -> ListStackInstancesForProvisionedProductResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [StackInstance]
      -> Int -> ListStackInstancesForProvisionedProductResponse)
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 [StackInstance]
   -> Int -> ListStackInstancesForProvisionedProductResponse)
-> Either String (Maybe [StackInstance])
-> Either
     String (Int -> ListStackInstancesForProvisionedProductResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [StackInstance]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StackInstances" Either String (Maybe (Maybe [StackInstance]))
-> Maybe [StackInstance] -> Either String (Maybe [StackInstance])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [StackInstance]
forall a. Monoid a => a
Prelude.mempty)
              Either
  String (Int -> ListStackInstancesForProvisionedProductResponse)
-> Either String Int
-> Either String ListStackInstancesForProvisionedProductResponse
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
    ListStackInstancesForProvisionedProduct

instance
  Prelude.NFData
    ListStackInstancesForProvisionedProduct

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

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

instance
  Core.ToQuery
    ListStackInstancesForProvisionedProduct
  where
  toQuery :: ListStackInstancesForProvisionedProduct -> QueryString
toQuery = QueryString
-> ListStackInstancesForProvisionedProduct -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(ListStackInstancesForProvisionedProductResponse
 -> ListStackInstancesForProvisionedProductResponse -> Bool)
-> (ListStackInstancesForProvisionedProductResponse
    -> ListStackInstancesForProvisionedProductResponse -> Bool)
-> Eq ListStackInstancesForProvisionedProductResponse
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]
(Int -> ReadS ListStackInstancesForProvisionedProductResponse)
-> ReadS [ListStackInstancesForProvisionedProductResponse]
-> ReadPrec ListStackInstancesForProvisionedProductResponse
-> ReadPrec [ListStackInstancesForProvisionedProductResponse]
-> Read 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
(Int -> ListStackInstancesForProvisionedProductResponse -> ShowS)
-> (ListStackInstancesForProvisionedProductResponse -> String)
-> ([ListStackInstancesForProvisionedProductResponse] -> ShowS)
-> Show ListStackInstancesForProvisionedProductResponse
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.
 ListStackInstancesForProvisionedProductResponse
 -> Rep ListStackInstancesForProvisionedProductResponse x)
-> (forall x.
    Rep ListStackInstancesForProvisionedProductResponse x
    -> ListStackInstancesForProvisionedProductResponse)
-> Generic ListStackInstancesForProvisionedProductResponse
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' :: Maybe Text
-> Maybe [StackInstance]
-> Int
-> ListStackInstancesForProvisionedProductResponse
ListStackInstancesForProvisionedProductResponse'
      { $sel:nextPageToken:ListStackInstancesForProvisionedProductResponse' :: Maybe Text
nextPageToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:stackInstances:ListStackInstancesForProvisionedProductResponse' :: Maybe [StackInstance]
stackInstances =
          Maybe [StackInstance]
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 :: (Maybe Text -> f (Maybe Text))
-> ListStackInstancesForProvisionedProductResponse
-> f ListStackInstancesForProvisionedProductResponse
listStackInstancesForProvisionedProductResponse_nextPageToken = (ListStackInstancesForProvisionedProductResponse -> Maybe Text)
-> (ListStackInstancesForProvisionedProductResponse
    -> Maybe Text -> ListStackInstancesForProvisionedProductResponse)
-> Lens
     ListStackInstancesForProvisionedProductResponse
     ListStackInstancesForProvisionedProductResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe [StackInstance] -> f (Maybe [StackInstance]))
-> ListStackInstancesForProvisionedProductResponse
-> f ListStackInstancesForProvisionedProductResponse
listStackInstancesForProvisionedProductResponse_stackInstances = (ListStackInstancesForProvisionedProductResponse
 -> Maybe [StackInstance])
-> (ListStackInstancesForProvisionedProductResponse
    -> Maybe [StackInstance]
    -> ListStackInstancesForProvisionedProductResponse)
-> Lens
     ListStackInstancesForProvisionedProductResponse
     ListStackInstancesForProvisionedProductResponse
     (Maybe [StackInstance])
     (Maybe [StackInstance])
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) ((Maybe [StackInstance] -> f (Maybe [StackInstance]))
 -> ListStackInstancesForProvisionedProductResponse
 -> f ListStackInstancesForProvisionedProductResponse)
-> ((Maybe [StackInstance] -> f (Maybe [StackInstance]))
    -> Maybe [StackInstance] -> f (Maybe [StackInstance]))
-> (Maybe [StackInstance] -> f (Maybe [StackInstance]))
-> ListStackInstancesForProvisionedProductResponse
-> f ListStackInstancesForProvisionedProductResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StackInstance] [StackInstance] [StackInstance] [StackInstance]
-> Iso
     (Maybe [StackInstance])
     (Maybe [StackInstance])
     (Maybe [StackInstance])
     (Maybe [StackInstance])
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
  [StackInstance] [StackInstance] [StackInstance] [StackInstance]
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 :: (Int -> f Int)
-> ListStackInstancesForProvisionedProductResponse
-> f ListStackInstancesForProvisionedProductResponse
listStackInstancesForProvisionedProductResponse_httpStatus = (ListStackInstancesForProvisionedProductResponse -> Int)
-> (ListStackInstancesForProvisionedProductResponse
    -> Int -> ListStackInstancesForProvisionedProductResponse)
-> Lens
     ListStackInstancesForProvisionedProductResponse
     ListStackInstancesForProvisionedProductResponse
     Int
     Int
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