{-# 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.ImportStacksToStackSet
-- 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)
--
-- Import existing stacks into a new stack sets. Use the stack import
-- operation to import up to 10 stacks into a new stack set in the same
-- account as the source stack or in a different administrator account and
-- Region, by specifying the stack ID of the stack you intend to import.
--
-- @ImportStacksToStackSet@ is only supported by self-managed permissions.
module Amazonka.CloudFormation.ImportStacksToStackSet
  ( -- * Creating a Request
    ImportStacksToStackSet (..),
    newImportStacksToStackSet,

    -- * Request Lenses
    importStacksToStackSet_callAs,
    importStacksToStackSet_operationPreferences,
    importStacksToStackSet_operationId,
    importStacksToStackSet_stackSetName,
    importStacksToStackSet_stackIds,

    -- * Destructuring the Response
    ImportStacksToStackSetResponse (..),
    newImportStacksToStackSetResponse,

    -- * Response Lenses
    importStacksToStackSetResponse_operationId,
    importStacksToStackSetResponse_httpStatus,
  )
where

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

-- | /See:/ 'newImportStacksToStackSet' smart constructor.
data ImportStacksToStackSet = ImportStacksToStackSet'
  { -- | 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@.
    --
    -- -   For service managed stack sets, specify @DELEGATED_ADMIN@.
    ImportStacksToStackSet -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
    ImportStacksToStackSet -> Maybe StackSetOperationPreferences
operationPreferences :: Prelude.Maybe StackSetOperationPreferences,
    -- | A unique, user defined, identifier for the stack set operation.
    ImportStacksToStackSet -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
    -- | The name of the stack set. The name must be unique in the Region where
    -- you create your stack set.
    ImportStacksToStackSet -> Text
stackSetName :: Prelude.Text,
    -- | The IDs of the stacks you are importing into a stack set. You import up
    -- to 10 stacks per stack set at a time.
    ImportStacksToStackSet -> [Text]
stackIds :: [Prelude.Text]
  }
  deriving (ImportStacksToStackSet -> ImportStacksToStackSet -> Bool
(ImportStacksToStackSet -> ImportStacksToStackSet -> Bool)
-> (ImportStacksToStackSet -> ImportStacksToStackSet -> Bool)
-> Eq ImportStacksToStackSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportStacksToStackSet -> ImportStacksToStackSet -> Bool
$c/= :: ImportStacksToStackSet -> ImportStacksToStackSet -> Bool
== :: ImportStacksToStackSet -> ImportStacksToStackSet -> Bool
$c== :: ImportStacksToStackSet -> ImportStacksToStackSet -> Bool
Prelude.Eq, ReadPrec [ImportStacksToStackSet]
ReadPrec ImportStacksToStackSet
Int -> ReadS ImportStacksToStackSet
ReadS [ImportStacksToStackSet]
(Int -> ReadS ImportStacksToStackSet)
-> ReadS [ImportStacksToStackSet]
-> ReadPrec ImportStacksToStackSet
-> ReadPrec [ImportStacksToStackSet]
-> Read ImportStacksToStackSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportStacksToStackSet]
$creadListPrec :: ReadPrec [ImportStacksToStackSet]
readPrec :: ReadPrec ImportStacksToStackSet
$creadPrec :: ReadPrec ImportStacksToStackSet
readList :: ReadS [ImportStacksToStackSet]
$creadList :: ReadS [ImportStacksToStackSet]
readsPrec :: Int -> ReadS ImportStacksToStackSet
$creadsPrec :: Int -> ReadS ImportStacksToStackSet
Prelude.Read, Int -> ImportStacksToStackSet -> ShowS
[ImportStacksToStackSet] -> ShowS
ImportStacksToStackSet -> String
(Int -> ImportStacksToStackSet -> ShowS)
-> (ImportStacksToStackSet -> String)
-> ([ImportStacksToStackSet] -> ShowS)
-> Show ImportStacksToStackSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportStacksToStackSet] -> ShowS
$cshowList :: [ImportStacksToStackSet] -> ShowS
show :: ImportStacksToStackSet -> String
$cshow :: ImportStacksToStackSet -> String
showsPrec :: Int -> ImportStacksToStackSet -> ShowS
$cshowsPrec :: Int -> ImportStacksToStackSet -> ShowS
Prelude.Show, (forall x. ImportStacksToStackSet -> Rep ImportStacksToStackSet x)
-> (forall x.
    Rep ImportStacksToStackSet x -> ImportStacksToStackSet)
-> Generic ImportStacksToStackSet
forall x. Rep ImportStacksToStackSet x -> ImportStacksToStackSet
forall x. ImportStacksToStackSet -> Rep ImportStacksToStackSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportStacksToStackSet x -> ImportStacksToStackSet
$cfrom :: forall x. ImportStacksToStackSet -> Rep ImportStacksToStackSet x
Prelude.Generic)

-- |
-- Create a value of 'ImportStacksToStackSet' 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', 'importStacksToStackSet_callAs' - 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@.
--
-- -   For service managed stack sets, specify @DELEGATED_ADMIN@.
--
-- 'operationPreferences', 'importStacksToStackSet_operationPreferences' - Undocumented member.
--
-- 'operationId', 'importStacksToStackSet_operationId' - A unique, user defined, identifier for the stack set operation.
--
-- 'stackSetName', 'importStacksToStackSet_stackSetName' - The name of the stack set. The name must be unique in the Region where
-- you create your stack set.
--
-- 'stackIds', 'importStacksToStackSet_stackIds' - The IDs of the stacks you are importing into a stack set. You import up
-- to 10 stacks per stack set at a time.
newImportStacksToStackSet ::
  -- | 'stackSetName'
  Prelude.Text ->
  ImportStacksToStackSet
newImportStacksToStackSet :: Text -> ImportStacksToStackSet
newImportStacksToStackSet Text
pStackSetName_ =
  ImportStacksToStackSet' :: Maybe CallAs
-> Maybe StackSetOperationPreferences
-> Maybe Text
-> Text
-> [Text]
-> ImportStacksToStackSet
ImportStacksToStackSet'
    { $sel:callAs:ImportStacksToStackSet' :: Maybe CallAs
callAs = Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
      $sel:operationPreferences:ImportStacksToStackSet' :: Maybe StackSetOperationPreferences
operationPreferences = Maybe StackSetOperationPreferences
forall a. Maybe a
Prelude.Nothing,
      $sel:operationId:ImportStacksToStackSet' :: Maybe Text
operationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetName:ImportStacksToStackSet' :: Text
stackSetName = Text
pStackSetName_,
      $sel:stackIds:ImportStacksToStackSet' :: [Text]
stackIds = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | 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@.
--
-- -   For service managed stack sets, specify @DELEGATED_ADMIN@.
importStacksToStackSet_callAs :: Lens.Lens' ImportStacksToStackSet (Prelude.Maybe CallAs)
importStacksToStackSet_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> ImportStacksToStackSet -> f ImportStacksToStackSet
importStacksToStackSet_callAs = (ImportStacksToStackSet -> Maybe CallAs)
-> (ImportStacksToStackSet
    -> Maybe CallAs -> ImportStacksToStackSet)
-> Lens
     ImportStacksToStackSet
     ImportStacksToStackSet
     (Maybe CallAs)
     (Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportStacksToStackSet' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:ImportStacksToStackSet' :: ImportStacksToStackSet -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: ImportStacksToStackSet
s@ImportStacksToStackSet' {} Maybe CallAs
a -> ImportStacksToStackSet
s {$sel:callAs:ImportStacksToStackSet' :: Maybe CallAs
callAs = Maybe CallAs
a} :: ImportStacksToStackSet)

-- | Undocumented member.
importStacksToStackSet_operationPreferences :: Lens.Lens' ImportStacksToStackSet (Prelude.Maybe StackSetOperationPreferences)
importStacksToStackSet_operationPreferences :: (Maybe StackSetOperationPreferences
 -> f (Maybe StackSetOperationPreferences))
-> ImportStacksToStackSet -> f ImportStacksToStackSet
importStacksToStackSet_operationPreferences = (ImportStacksToStackSet -> Maybe StackSetOperationPreferences)
-> (ImportStacksToStackSet
    -> Maybe StackSetOperationPreferences -> ImportStacksToStackSet)
-> Lens
     ImportStacksToStackSet
     ImportStacksToStackSet
     (Maybe StackSetOperationPreferences)
     (Maybe StackSetOperationPreferences)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportStacksToStackSet' {Maybe StackSetOperationPreferences
operationPreferences :: Maybe StackSetOperationPreferences
$sel:operationPreferences:ImportStacksToStackSet' :: ImportStacksToStackSet -> Maybe StackSetOperationPreferences
operationPreferences} -> Maybe StackSetOperationPreferences
operationPreferences) (\s :: ImportStacksToStackSet
s@ImportStacksToStackSet' {} Maybe StackSetOperationPreferences
a -> ImportStacksToStackSet
s {$sel:operationPreferences:ImportStacksToStackSet' :: Maybe StackSetOperationPreferences
operationPreferences = Maybe StackSetOperationPreferences
a} :: ImportStacksToStackSet)

-- | A unique, user defined, identifier for the stack set operation.
importStacksToStackSet_operationId :: Lens.Lens' ImportStacksToStackSet (Prelude.Maybe Prelude.Text)
importStacksToStackSet_operationId :: (Maybe Text -> f (Maybe Text))
-> ImportStacksToStackSet -> f ImportStacksToStackSet
importStacksToStackSet_operationId = (ImportStacksToStackSet -> Maybe Text)
-> (ImportStacksToStackSet -> Maybe Text -> ImportStacksToStackSet)
-> Lens
     ImportStacksToStackSet
     ImportStacksToStackSet
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportStacksToStackSet' {Maybe Text
operationId :: Maybe Text
$sel:operationId:ImportStacksToStackSet' :: ImportStacksToStackSet -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: ImportStacksToStackSet
s@ImportStacksToStackSet' {} Maybe Text
a -> ImportStacksToStackSet
s {$sel:operationId:ImportStacksToStackSet' :: Maybe Text
operationId = Maybe Text
a} :: ImportStacksToStackSet)

-- | The name of the stack set. The name must be unique in the Region where
-- you create your stack set.
importStacksToStackSet_stackSetName :: Lens.Lens' ImportStacksToStackSet Prelude.Text
importStacksToStackSet_stackSetName :: (Text -> f Text)
-> ImportStacksToStackSet -> f ImportStacksToStackSet
importStacksToStackSet_stackSetName = (ImportStacksToStackSet -> Text)
-> (ImportStacksToStackSet -> Text -> ImportStacksToStackSet)
-> Lens ImportStacksToStackSet ImportStacksToStackSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportStacksToStackSet' {Text
stackSetName :: Text
$sel:stackSetName:ImportStacksToStackSet' :: ImportStacksToStackSet -> Text
stackSetName} -> Text
stackSetName) (\s :: ImportStacksToStackSet
s@ImportStacksToStackSet' {} Text
a -> ImportStacksToStackSet
s {$sel:stackSetName:ImportStacksToStackSet' :: Text
stackSetName = Text
a} :: ImportStacksToStackSet)

-- | The IDs of the stacks you are importing into a stack set. You import up
-- to 10 stacks per stack set at a time.
importStacksToStackSet_stackIds :: Lens.Lens' ImportStacksToStackSet [Prelude.Text]
importStacksToStackSet_stackIds :: ([Text] -> f [Text])
-> ImportStacksToStackSet -> f ImportStacksToStackSet
importStacksToStackSet_stackIds = (ImportStacksToStackSet -> [Text])
-> (ImportStacksToStackSet -> [Text] -> ImportStacksToStackSet)
-> Lens ImportStacksToStackSet ImportStacksToStackSet [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportStacksToStackSet' {[Text]
stackIds :: [Text]
$sel:stackIds:ImportStacksToStackSet' :: ImportStacksToStackSet -> [Text]
stackIds} -> [Text]
stackIds) (\s :: ImportStacksToStackSet
s@ImportStacksToStackSet' {} [Text]
a -> ImportStacksToStackSet
s {$sel:stackIds:ImportStacksToStackSet' :: [Text]
stackIds = [Text]
a} :: ImportStacksToStackSet) (([Text] -> f [Text])
 -> ImportStacksToStackSet -> f ImportStacksToStackSet)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ImportStacksToStackSet
-> f ImportStacksToStackSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest ImportStacksToStackSet where
  type
    AWSResponse ImportStacksToStackSet =
      ImportStacksToStackSetResponse
  request :: ImportStacksToStackSet -> Request ImportStacksToStackSet
request = Service -> ImportStacksToStackSet -> Request ImportStacksToStackSet
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ImportStacksToStackSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ImportStacksToStackSet)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ImportStacksToStackSet))
-> Logger
-> Service
-> Proxy ImportStacksToStackSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ImportStacksToStackSet)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ImportStacksToStackSetResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> ImportStacksToStackSetResponse
ImportStacksToStackSetResponse'
            (Maybe Text -> Int -> ImportStacksToStackSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ImportStacksToStackSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OperationId")
            Either String (Int -> ImportStacksToStackSetResponse)
-> Either String Int
-> Either String ImportStacksToStackSetResponse
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 ImportStacksToStackSet

instance Prelude.NFData ImportStacksToStackSet

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

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

instance Core.ToQuery ImportStacksToStackSet where
  toQuery :: ImportStacksToStackSet -> QueryString
toQuery ImportStacksToStackSet' {[Text]
Maybe Text
Maybe CallAs
Maybe StackSetOperationPreferences
Text
stackIds :: [Text]
stackSetName :: Text
operationId :: Maybe Text
operationPreferences :: Maybe StackSetOperationPreferences
callAs :: Maybe CallAs
$sel:stackIds:ImportStacksToStackSet' :: ImportStacksToStackSet -> [Text]
$sel:stackSetName:ImportStacksToStackSet' :: ImportStacksToStackSet -> Text
$sel:operationId:ImportStacksToStackSet' :: ImportStacksToStackSet -> Maybe Text
$sel:operationPreferences:ImportStacksToStackSet' :: ImportStacksToStackSet -> Maybe StackSetOperationPreferences
$sel:callAs:ImportStacksToStackSet' :: ImportStacksToStackSet -> Maybe CallAs
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ImportStacksToStackSet" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"CallAs" ByteString -> Maybe CallAs -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe CallAs
callAs,
        ByteString
"OperationPreferences" ByteString -> Maybe StackSetOperationPreferences -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe StackSetOperationPreferences
operationPreferences,
        ByteString
"OperationId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
operationId,
        ByteString
"StackSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackSetName,
        ByteString
"StackIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Text]
stackIds
      ]

-- | /See:/ 'newImportStacksToStackSetResponse' smart constructor.
data ImportStacksToStackSetResponse = ImportStacksToStackSetResponse'
  { -- | The unique identifier for the stack set operation.
    ImportStacksToStackSetResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ImportStacksToStackSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ImportStacksToStackSetResponse
-> ImportStacksToStackSetResponse -> Bool
(ImportStacksToStackSetResponse
 -> ImportStacksToStackSetResponse -> Bool)
-> (ImportStacksToStackSetResponse
    -> ImportStacksToStackSetResponse -> Bool)
-> Eq ImportStacksToStackSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportStacksToStackSetResponse
-> ImportStacksToStackSetResponse -> Bool
$c/= :: ImportStacksToStackSetResponse
-> ImportStacksToStackSetResponse -> Bool
== :: ImportStacksToStackSetResponse
-> ImportStacksToStackSetResponse -> Bool
$c== :: ImportStacksToStackSetResponse
-> ImportStacksToStackSetResponse -> Bool
Prelude.Eq, ReadPrec [ImportStacksToStackSetResponse]
ReadPrec ImportStacksToStackSetResponse
Int -> ReadS ImportStacksToStackSetResponse
ReadS [ImportStacksToStackSetResponse]
(Int -> ReadS ImportStacksToStackSetResponse)
-> ReadS [ImportStacksToStackSetResponse]
-> ReadPrec ImportStacksToStackSetResponse
-> ReadPrec [ImportStacksToStackSetResponse]
-> Read ImportStacksToStackSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportStacksToStackSetResponse]
$creadListPrec :: ReadPrec [ImportStacksToStackSetResponse]
readPrec :: ReadPrec ImportStacksToStackSetResponse
$creadPrec :: ReadPrec ImportStacksToStackSetResponse
readList :: ReadS [ImportStacksToStackSetResponse]
$creadList :: ReadS [ImportStacksToStackSetResponse]
readsPrec :: Int -> ReadS ImportStacksToStackSetResponse
$creadsPrec :: Int -> ReadS ImportStacksToStackSetResponse
Prelude.Read, Int -> ImportStacksToStackSetResponse -> ShowS
[ImportStacksToStackSetResponse] -> ShowS
ImportStacksToStackSetResponse -> String
(Int -> ImportStacksToStackSetResponse -> ShowS)
-> (ImportStacksToStackSetResponse -> String)
-> ([ImportStacksToStackSetResponse] -> ShowS)
-> Show ImportStacksToStackSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportStacksToStackSetResponse] -> ShowS
$cshowList :: [ImportStacksToStackSetResponse] -> ShowS
show :: ImportStacksToStackSetResponse -> String
$cshow :: ImportStacksToStackSetResponse -> String
showsPrec :: Int -> ImportStacksToStackSetResponse -> ShowS
$cshowsPrec :: Int -> ImportStacksToStackSetResponse -> ShowS
Prelude.Show, (forall x.
 ImportStacksToStackSetResponse
 -> Rep ImportStacksToStackSetResponse x)
-> (forall x.
    Rep ImportStacksToStackSetResponse x
    -> ImportStacksToStackSetResponse)
-> Generic ImportStacksToStackSetResponse
forall x.
Rep ImportStacksToStackSetResponse x
-> ImportStacksToStackSetResponse
forall x.
ImportStacksToStackSetResponse
-> Rep ImportStacksToStackSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportStacksToStackSetResponse x
-> ImportStacksToStackSetResponse
$cfrom :: forall x.
ImportStacksToStackSetResponse
-> Rep ImportStacksToStackSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'ImportStacksToStackSetResponse' 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:
--
-- 'operationId', 'importStacksToStackSetResponse_operationId' - The unique identifier for the stack set operation.
--
-- 'httpStatus', 'importStacksToStackSetResponse_httpStatus' - The response's http status code.
newImportStacksToStackSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ImportStacksToStackSetResponse
newImportStacksToStackSetResponse :: Int -> ImportStacksToStackSetResponse
newImportStacksToStackSetResponse Int
pHttpStatus_ =
  ImportStacksToStackSetResponse' :: Maybe Text -> Int -> ImportStacksToStackSetResponse
ImportStacksToStackSetResponse'
    { $sel:operationId:ImportStacksToStackSetResponse' :: Maybe Text
operationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ImportStacksToStackSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique identifier for the stack set operation.
importStacksToStackSetResponse_operationId :: Lens.Lens' ImportStacksToStackSetResponse (Prelude.Maybe Prelude.Text)
importStacksToStackSetResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> ImportStacksToStackSetResponse
-> f ImportStacksToStackSetResponse
importStacksToStackSetResponse_operationId = (ImportStacksToStackSetResponse -> Maybe Text)
-> (ImportStacksToStackSetResponse
    -> Maybe Text -> ImportStacksToStackSetResponse)
-> Lens
     ImportStacksToStackSetResponse
     ImportStacksToStackSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportStacksToStackSetResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:ImportStacksToStackSetResponse' :: ImportStacksToStackSetResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: ImportStacksToStackSetResponse
s@ImportStacksToStackSetResponse' {} Maybe Text
a -> ImportStacksToStackSetResponse
s {$sel:operationId:ImportStacksToStackSetResponse' :: Maybe Text
operationId = Maybe Text
a} :: ImportStacksToStackSetResponse)

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

instance
  Prelude.NFData
    ImportStacksToStackSetResponse