{-# 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.CloudFormation.ListStackSetOperations
-- 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 operations performed on a stack set.
--
-- This operation returns paginated results.
module Amazonka.CloudFormation.ListStackSetOperations
  ( -- * Creating a Request
    ListStackSetOperations (..),
    newListStackSetOperations,

    -- * Request Lenses
    listStackSetOperations_callAs,
    listStackSetOperations_maxResults,
    listStackSetOperations_nextToken,
    listStackSetOperations_stackSetName,

    -- * Destructuring the Response
    ListStackSetOperationsResponse (..),
    newListStackSetOperationsResponse,

    -- * Response Lenses
    listStackSetOperationsResponse_nextToken,
    listStackSetOperationsResponse_summaries,
    listStackSetOperationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListStackSetOperations' smart constructor.
data ListStackSetOperations = ListStackSetOperations'
  { -- | [Service-managed permissions] Specifies whether you are acting as an
    -- account administrator in the organization\'s management account or as a
    -- delegated administrator in a member account.
    --
    -- By default, @SELF@ is specified. Use @SELF@ for stack sets with
    -- self-managed permissions.
    --
    -- -   If you are signed in to the management account, specify @SELF@.
    --
    -- -   If you are signed in to a delegated administrator account, specify
    --     @DELEGATED_ADMIN@.
    --
    --     Your Amazon Web Services account must be registered as a delegated
    --     administrator in the management account. For more information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
    --     in the /CloudFormation User Guide/.
    ListStackSetOperations -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
    -- | The maximum number of results to be returned with a single call. If the
    -- number of available results exceeds this maximum, the response includes
    -- a @NextToken@ value that you can assign to the @NextToken@ request
    -- parameter to get the next set of results.
    ListStackSetOperations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the previous paginated request didn\'t return all of the remaining
    -- results, the response object\'s @NextToken@ parameter value is set to a
    -- token. To retrieve the next set of results, call
    -- @ListStackSetOperations@ again and assign that token to the request
    -- object\'s @NextToken@ parameter. If there are no remaining results, the
    -- previous response object\'s @NextToken@ parameter is set to @null@.
    ListStackSetOperations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name or unique ID of the stack set that you want to get operation
    -- summaries for.
    ListStackSetOperations -> Text
stackSetName :: Prelude.Text
  }
  deriving (ListStackSetOperations -> ListStackSetOperations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStackSetOperations -> ListStackSetOperations -> Bool
$c/= :: ListStackSetOperations -> ListStackSetOperations -> Bool
== :: ListStackSetOperations -> ListStackSetOperations -> Bool
$c== :: ListStackSetOperations -> ListStackSetOperations -> Bool
Prelude.Eq, ReadPrec [ListStackSetOperations]
ReadPrec ListStackSetOperations
Int -> ReadS ListStackSetOperations
ReadS [ListStackSetOperations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStackSetOperations]
$creadListPrec :: ReadPrec [ListStackSetOperations]
readPrec :: ReadPrec ListStackSetOperations
$creadPrec :: ReadPrec ListStackSetOperations
readList :: ReadS [ListStackSetOperations]
$creadList :: ReadS [ListStackSetOperations]
readsPrec :: Int -> ReadS ListStackSetOperations
$creadsPrec :: Int -> ReadS ListStackSetOperations
Prelude.Read, Int -> ListStackSetOperations -> ShowS
[ListStackSetOperations] -> ShowS
ListStackSetOperations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStackSetOperations] -> ShowS
$cshowList :: [ListStackSetOperations] -> ShowS
show :: ListStackSetOperations -> String
$cshow :: ListStackSetOperations -> String
showsPrec :: Int -> ListStackSetOperations -> ShowS
$cshowsPrec :: Int -> ListStackSetOperations -> ShowS
Prelude.Show, forall x. Rep ListStackSetOperations x -> ListStackSetOperations
forall x. ListStackSetOperations -> Rep ListStackSetOperations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStackSetOperations x -> ListStackSetOperations
$cfrom :: forall x. ListStackSetOperations -> Rep ListStackSetOperations x
Prelude.Generic)

-- |
-- Create a value of 'ListStackSetOperations' 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:
--
-- 'callAs', 'listStackSetOperations_callAs' - [Service-managed permissions] Specifies whether you are acting as an
-- account administrator in the organization\'s management account or as a
-- delegated administrator in a member account.
--
-- By default, @SELF@ is specified. Use @SELF@ for stack sets with
-- self-managed permissions.
--
-- -   If you are signed in to the management account, specify @SELF@.
--
-- -   If you are signed in to a delegated administrator account, specify
--     @DELEGATED_ADMIN@.
--
--     Your Amazon Web Services account must be registered as a delegated
--     administrator in the management account. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
--     in the /CloudFormation User Guide/.
--
-- 'maxResults', 'listStackSetOperations_maxResults' - The maximum number of results to be returned with a single call. If the
-- number of available results exceeds this maximum, the response includes
-- a @NextToken@ value that you can assign to the @NextToken@ request
-- parameter to get the next set of results.
--
-- 'nextToken', 'listStackSetOperations_nextToken' - If the previous paginated request didn\'t return all of the remaining
-- results, the response object\'s @NextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call
-- @ListStackSetOperations@ again and assign that token to the request
-- object\'s @NextToken@ parameter. If there are no remaining results, the
-- previous response object\'s @NextToken@ parameter is set to @null@.
--
-- 'stackSetName', 'listStackSetOperations_stackSetName' - The name or unique ID of the stack set that you want to get operation
-- summaries for.
newListStackSetOperations ::
  -- | 'stackSetName'
  Prelude.Text ->
  ListStackSetOperations
newListStackSetOperations :: Text -> ListStackSetOperations
newListStackSetOperations Text
pStackSetName_ =
  ListStackSetOperations'
    { $sel:callAs:ListStackSetOperations' :: Maybe CallAs
callAs = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListStackSetOperations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListStackSetOperations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetName:ListStackSetOperations' :: Text
stackSetName = Text
pStackSetName_
    }

-- | [Service-managed permissions] Specifies whether you are acting as an
-- account administrator in the organization\'s management account or as a
-- delegated administrator in a member account.
--
-- By default, @SELF@ is specified. Use @SELF@ for stack sets with
-- self-managed permissions.
--
-- -   If you are signed in to the management account, specify @SELF@.
--
-- -   If you are signed in to a delegated administrator account, specify
--     @DELEGATED_ADMIN@.
--
--     Your Amazon Web Services account must be registered as a delegated
--     administrator in the management account. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
--     in the /CloudFormation User Guide/.
listStackSetOperations_callAs :: Lens.Lens' ListStackSetOperations (Prelude.Maybe CallAs)
listStackSetOperations_callAs :: Lens' ListStackSetOperations (Maybe CallAs)
listStackSetOperations_callAs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperations' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:ListStackSetOperations' :: ListStackSetOperations -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: ListStackSetOperations
s@ListStackSetOperations' {} Maybe CallAs
a -> ListStackSetOperations
s {$sel:callAs:ListStackSetOperations' :: Maybe CallAs
callAs = Maybe CallAs
a} :: ListStackSetOperations)

-- | The maximum number of results to be returned with a single call. If the
-- number of available results exceeds this maximum, the response includes
-- a @NextToken@ value that you can assign to the @NextToken@ request
-- parameter to get the next set of results.
listStackSetOperations_maxResults :: Lens.Lens' ListStackSetOperations (Prelude.Maybe Prelude.Natural)
listStackSetOperations_maxResults :: Lens' ListStackSetOperations (Maybe Natural)
listStackSetOperations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListStackSetOperations' :: ListStackSetOperations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListStackSetOperations
s@ListStackSetOperations' {} Maybe Natural
a -> ListStackSetOperations
s {$sel:maxResults:ListStackSetOperations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListStackSetOperations)

-- | If the previous paginated request didn\'t return all of the remaining
-- results, the response object\'s @NextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call
-- @ListStackSetOperations@ again and assign that token to the request
-- object\'s @NextToken@ parameter. If there are no remaining results, the
-- previous response object\'s @NextToken@ parameter is set to @null@.
listStackSetOperations_nextToken :: Lens.Lens' ListStackSetOperations (Prelude.Maybe Prelude.Text)
listStackSetOperations_nextToken :: Lens' ListStackSetOperations (Maybe Text)
listStackSetOperations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStackSetOperations' :: ListStackSetOperations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStackSetOperations
s@ListStackSetOperations' {} Maybe Text
a -> ListStackSetOperations
s {$sel:nextToken:ListStackSetOperations' :: Maybe Text
nextToken = Maybe Text
a} :: ListStackSetOperations)

-- | The name or unique ID of the stack set that you want to get operation
-- summaries for.
listStackSetOperations_stackSetName :: Lens.Lens' ListStackSetOperations Prelude.Text
listStackSetOperations_stackSetName :: Lens' ListStackSetOperations Text
listStackSetOperations_stackSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperations' {Text
stackSetName :: Text
$sel:stackSetName:ListStackSetOperations' :: ListStackSetOperations -> Text
stackSetName} -> Text
stackSetName) (\s :: ListStackSetOperations
s@ListStackSetOperations' {} Text
a -> ListStackSetOperations
s {$sel:stackSetName:ListStackSetOperations' :: Text
stackSetName = Text
a} :: ListStackSetOperations)

instance Core.AWSPager ListStackSetOperations where
  page :: ListStackSetOperations
-> AWSResponse ListStackSetOperations
-> Maybe ListStackSetOperations
page ListStackSetOperations
rq AWSResponse ListStackSetOperations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListStackSetOperations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStackSetOperationsResponse (Maybe Text)
listStackSetOperationsResponse_nextToken
            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 ListStackSetOperations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListStackSetOperationsResponse (Maybe [StackSetOperationSummary])
listStackSetOperationsResponse_summaries
            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.$ ListStackSetOperations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListStackSetOperations (Maybe Text)
listStackSetOperations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListStackSetOperations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStackSetOperationsResponse (Maybe Text)
listStackSetOperationsResponse_nextToken
          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 ListStackSetOperations where
  type
    AWSResponse ListStackSetOperations =
      ListStackSetOperationsResponse
  request :: (Service -> Service)
-> ListStackSetOperations -> Request ListStackSetOperations
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListStackSetOperations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListStackSetOperations)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListStackSetOperationsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [StackSetOperationSummary]
-> Int
-> ListStackSetOperationsResponse
ListStackSetOperationsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Summaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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 ListStackSetOperations where
  hashWithSalt :: Int -> ListStackSetOperations -> Int
hashWithSalt Int
_salt ListStackSetOperations' {Maybe Natural
Maybe Text
Maybe CallAs
Text
stackSetName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
callAs :: Maybe CallAs
$sel:stackSetName:ListStackSetOperations' :: ListStackSetOperations -> Text
$sel:nextToken:ListStackSetOperations' :: ListStackSetOperations -> Maybe Text
$sel:maxResults:ListStackSetOperations' :: ListStackSetOperations -> Maybe Natural
$sel:callAs:ListStackSetOperations' :: ListStackSetOperations -> Maybe CallAs
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CallAs
callAs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackSetName

instance Prelude.NFData ListStackSetOperations where
  rnf :: ListStackSetOperations -> ()
rnf ListStackSetOperations' {Maybe Natural
Maybe Text
Maybe CallAs
Text
stackSetName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
callAs :: Maybe CallAs
$sel:stackSetName:ListStackSetOperations' :: ListStackSetOperations -> Text
$sel:nextToken:ListStackSetOperations' :: ListStackSetOperations -> Maybe Text
$sel:maxResults:ListStackSetOperations' :: ListStackSetOperations -> Maybe Natural
$sel:callAs:ListStackSetOperations' :: ListStackSetOperations -> Maybe CallAs
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CallAs
callAs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackSetName

instance Data.ToHeaders ListStackSetOperations where
  toHeaders :: ListStackSetOperations -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery ListStackSetOperations where
  toQuery :: ListStackSetOperations -> QueryString
toQuery ListStackSetOperations' {Maybe Natural
Maybe Text
Maybe CallAs
Text
stackSetName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
callAs :: Maybe CallAs
$sel:stackSetName:ListStackSetOperations' :: ListStackSetOperations -> Text
$sel:nextToken:ListStackSetOperations' :: ListStackSetOperations -> Maybe Text
$sel:maxResults:ListStackSetOperations' :: ListStackSetOperations -> Maybe Natural
$sel:callAs:ListStackSetOperations' :: ListStackSetOperations -> Maybe CallAs
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListStackSetOperations" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"CallAs" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CallAs
callAs,
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"StackSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackSetName
      ]

-- | /See:/ 'newListStackSetOperationsResponse' smart constructor.
data ListStackSetOperationsResponse = ListStackSetOperationsResponse'
  { -- | If the request doesn\'t return all results, @NextToken@ is set to a
    -- token. To retrieve the next set of results, call @ListOperationResults@
    -- again and assign that token to the request object\'s @NextToken@
    -- parameter. If there are no remaining results, @NextToken@ is set to
    -- @null@.
    ListStackSetOperationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of @StackSetOperationSummary@ structures that contain summary
    -- information about operations for the specified stack set.
    ListStackSetOperationsResponse -> Maybe [StackSetOperationSummary]
summaries :: Prelude.Maybe [StackSetOperationSummary],
    -- | The response's http status code.
    ListStackSetOperationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListStackSetOperationsResponse
-> ListStackSetOperationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStackSetOperationsResponse
-> ListStackSetOperationsResponse -> Bool
$c/= :: ListStackSetOperationsResponse
-> ListStackSetOperationsResponse -> Bool
== :: ListStackSetOperationsResponse
-> ListStackSetOperationsResponse -> Bool
$c== :: ListStackSetOperationsResponse
-> ListStackSetOperationsResponse -> Bool
Prelude.Eq, ReadPrec [ListStackSetOperationsResponse]
ReadPrec ListStackSetOperationsResponse
Int -> ReadS ListStackSetOperationsResponse
ReadS [ListStackSetOperationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStackSetOperationsResponse]
$creadListPrec :: ReadPrec [ListStackSetOperationsResponse]
readPrec :: ReadPrec ListStackSetOperationsResponse
$creadPrec :: ReadPrec ListStackSetOperationsResponse
readList :: ReadS [ListStackSetOperationsResponse]
$creadList :: ReadS [ListStackSetOperationsResponse]
readsPrec :: Int -> ReadS ListStackSetOperationsResponse
$creadsPrec :: Int -> ReadS ListStackSetOperationsResponse
Prelude.Read, Int -> ListStackSetOperationsResponse -> ShowS
[ListStackSetOperationsResponse] -> ShowS
ListStackSetOperationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStackSetOperationsResponse] -> ShowS
$cshowList :: [ListStackSetOperationsResponse] -> ShowS
show :: ListStackSetOperationsResponse -> String
$cshow :: ListStackSetOperationsResponse -> String
showsPrec :: Int -> ListStackSetOperationsResponse -> ShowS
$cshowsPrec :: Int -> ListStackSetOperationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListStackSetOperationsResponse x
-> ListStackSetOperationsResponse
forall x.
ListStackSetOperationsResponse
-> Rep ListStackSetOperationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListStackSetOperationsResponse x
-> ListStackSetOperationsResponse
$cfrom :: forall x.
ListStackSetOperationsResponse
-> Rep ListStackSetOperationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListStackSetOperationsResponse' 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:
--
-- 'nextToken', 'listStackSetOperationsResponse_nextToken' - If the request doesn\'t return all results, @NextToken@ is set to a
-- token. To retrieve the next set of results, call @ListOperationResults@
-- again and assign that token to the request object\'s @NextToken@
-- parameter. If there are no remaining results, @NextToken@ is set to
-- @null@.
--
-- 'summaries', 'listStackSetOperationsResponse_summaries' - A list of @StackSetOperationSummary@ structures that contain summary
-- information about operations for the specified stack set.
--
-- 'httpStatus', 'listStackSetOperationsResponse_httpStatus' - The response's http status code.
newListStackSetOperationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListStackSetOperationsResponse
newListStackSetOperationsResponse :: Int -> ListStackSetOperationsResponse
newListStackSetOperationsResponse Int
pHttpStatus_ =
  ListStackSetOperationsResponse'
    { $sel:nextToken:ListStackSetOperationsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:summaries:ListStackSetOperationsResponse' :: Maybe [StackSetOperationSummary]
summaries = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListStackSetOperationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the request doesn\'t return all results, @NextToken@ is set to a
-- token. To retrieve the next set of results, call @ListOperationResults@
-- again and assign that token to the request object\'s @NextToken@
-- parameter. If there are no remaining results, @NextToken@ is set to
-- @null@.
listStackSetOperationsResponse_nextToken :: Lens.Lens' ListStackSetOperationsResponse (Prelude.Maybe Prelude.Text)
listStackSetOperationsResponse_nextToken :: Lens' ListStackSetOperationsResponse (Maybe Text)
listStackSetOperationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStackSetOperationsResponse' :: ListStackSetOperationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStackSetOperationsResponse
s@ListStackSetOperationsResponse' {} Maybe Text
a -> ListStackSetOperationsResponse
s {$sel:nextToken:ListStackSetOperationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListStackSetOperationsResponse)

-- | A list of @StackSetOperationSummary@ structures that contain summary
-- information about operations for the specified stack set.
listStackSetOperationsResponse_summaries :: Lens.Lens' ListStackSetOperationsResponse (Prelude.Maybe [StackSetOperationSummary])
listStackSetOperationsResponse_summaries :: Lens'
  ListStackSetOperationsResponse (Maybe [StackSetOperationSummary])
listStackSetOperationsResponse_summaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperationsResponse' {Maybe [StackSetOperationSummary]
summaries :: Maybe [StackSetOperationSummary]
$sel:summaries:ListStackSetOperationsResponse' :: ListStackSetOperationsResponse -> Maybe [StackSetOperationSummary]
summaries} -> Maybe [StackSetOperationSummary]
summaries) (\s :: ListStackSetOperationsResponse
s@ListStackSetOperationsResponse' {} Maybe [StackSetOperationSummary]
a -> ListStackSetOperationsResponse
s {$sel:summaries:ListStackSetOperationsResponse' :: Maybe [StackSetOperationSummary]
summaries = Maybe [StackSetOperationSummary]
a} :: ListStackSetOperationsResponse) 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.
listStackSetOperationsResponse_httpStatus :: Lens.Lens' ListStackSetOperationsResponse Prelude.Int
listStackSetOperationsResponse_httpStatus :: Lens' ListStackSetOperationsResponse Int
listStackSetOperationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStackSetOperationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListStackSetOperationsResponse' :: ListStackSetOperationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListStackSetOperationsResponse
s@ListStackSetOperationsResponse' {} Int
a -> ListStackSetOperationsResponse
s {$sel:httpStatus:ListStackSetOperationsResponse' :: Int
httpStatus = Int
a} :: ListStackSetOperationsResponse)

instance
  Prelude.NFData
    ListStackSetOperationsResponse
  where
  rnf :: ListStackSetOperationsResponse -> ()
rnf ListStackSetOperationsResponse' {Int
Maybe [StackSetOperationSummary]
Maybe Text
httpStatus :: Int
summaries :: Maybe [StackSetOperationSummary]
nextToken :: Maybe Text
$sel:httpStatus:ListStackSetOperationsResponse' :: ListStackSetOperationsResponse -> Int
$sel:summaries:ListStackSetOperationsResponse' :: ListStackSetOperationsResponse -> Maybe [StackSetOperationSummary]
$sel:nextToken:ListStackSetOperationsResponse' :: ListStackSetOperationsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StackSetOperationSummary]
summaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus