{-# 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.GetTemplateSummary
-- 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 information about a new or existing template. The
-- @GetTemplateSummary@ action is useful for viewing parameter information,
-- such as default parameter values and parameter types, before you create
-- or update a stack or stack set.
--
-- You can use the @GetTemplateSummary@ action when you submit a template,
-- or you can get template information for a stack set, or a running or
-- deleted stack.
--
-- For deleted stacks, @GetTemplateSummary@ returns the template
-- information for up to 90 days after the stack has been deleted. If the
-- template does not exist, a @ValidationError@ is returned.
module Amazonka.CloudFormation.GetTemplateSummary
  ( -- * Creating a Request
    GetTemplateSummary (..),
    newGetTemplateSummary,

    -- * Request Lenses
    getTemplateSummary_callAs,
    getTemplateSummary_templateBody,
    getTemplateSummary_templateURL,
    getTemplateSummary_stackSetName,
    getTemplateSummary_stackName,

    -- * Destructuring the Response
    GetTemplateSummaryResponse (..),
    newGetTemplateSummaryResponse,

    -- * Response Lenses
    getTemplateSummaryResponse_declaredTransforms,
    getTemplateSummaryResponse_version,
    getTemplateSummaryResponse_capabilitiesReason,
    getTemplateSummaryResponse_parameters,
    getTemplateSummaryResponse_metadata,
    getTemplateSummaryResponse_resourceIdentifierSummaries,
    getTemplateSummaryResponse_description,
    getTemplateSummaryResponse_capabilities,
    getTemplateSummaryResponse_resourceTypes,
    getTemplateSummaryResponse_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

-- | The input for the GetTemplateSummary action.
--
-- /See:/ 'newGetTemplateSummary' smart constructor.
data GetTemplateSummary = GetTemplateSummary'
  { -- | [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/.
    GetTemplateSummary -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
    -- | Structure containing the template body with a minimum length of 1 byte
    -- and a maximum length of 51,200 bytes. For more information about
    -- templates, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
    GetTemplateSummary -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | Location of file containing the template body. The URL must point to a
    -- template (max size: 460,800 bytes) that is located in an Amazon S3
    -- bucket or a Systems Manager document. For more information about
    -- templates, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
    GetTemplateSummary -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text,
    -- | The name or unique ID of the stack set from which the stack was created.
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
    GetTemplateSummary -> Maybe Text
stackSetName :: Prelude.Maybe Prelude.Text,
    -- | The name or the stack ID that is associated with the stack, which are
    -- not always interchangeable. For running stacks, you can specify either
    -- the stack\'s name or its unique stack ID. For deleted stack, you must
    -- specify the unique stack ID.
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
    GetTemplateSummary -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text
  }
  deriving (GetTemplateSummary -> GetTemplateSummary -> Bool
(GetTemplateSummary -> GetTemplateSummary -> Bool)
-> (GetTemplateSummary -> GetTemplateSummary -> Bool)
-> Eq GetTemplateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTemplateSummary -> GetTemplateSummary -> Bool
$c/= :: GetTemplateSummary -> GetTemplateSummary -> Bool
== :: GetTemplateSummary -> GetTemplateSummary -> Bool
$c== :: GetTemplateSummary -> GetTemplateSummary -> Bool
Prelude.Eq, ReadPrec [GetTemplateSummary]
ReadPrec GetTemplateSummary
Int -> ReadS GetTemplateSummary
ReadS [GetTemplateSummary]
(Int -> ReadS GetTemplateSummary)
-> ReadS [GetTemplateSummary]
-> ReadPrec GetTemplateSummary
-> ReadPrec [GetTemplateSummary]
-> Read GetTemplateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTemplateSummary]
$creadListPrec :: ReadPrec [GetTemplateSummary]
readPrec :: ReadPrec GetTemplateSummary
$creadPrec :: ReadPrec GetTemplateSummary
readList :: ReadS [GetTemplateSummary]
$creadList :: ReadS [GetTemplateSummary]
readsPrec :: Int -> ReadS GetTemplateSummary
$creadsPrec :: Int -> ReadS GetTemplateSummary
Prelude.Read, Int -> GetTemplateSummary -> ShowS
[GetTemplateSummary] -> ShowS
GetTemplateSummary -> String
(Int -> GetTemplateSummary -> ShowS)
-> (GetTemplateSummary -> String)
-> ([GetTemplateSummary] -> ShowS)
-> Show GetTemplateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTemplateSummary] -> ShowS
$cshowList :: [GetTemplateSummary] -> ShowS
show :: GetTemplateSummary -> String
$cshow :: GetTemplateSummary -> String
showsPrec :: Int -> GetTemplateSummary -> ShowS
$cshowsPrec :: Int -> GetTemplateSummary -> ShowS
Prelude.Show, (forall x. GetTemplateSummary -> Rep GetTemplateSummary x)
-> (forall x. Rep GetTemplateSummary x -> GetTemplateSummary)
-> Generic GetTemplateSummary
forall x. Rep GetTemplateSummary x -> GetTemplateSummary
forall x. GetTemplateSummary -> Rep GetTemplateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetTemplateSummary x -> GetTemplateSummary
$cfrom :: forall x. GetTemplateSummary -> Rep GetTemplateSummary x
Prelude.Generic)

-- |
-- Create a value of 'GetTemplateSummary' 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', 'getTemplateSummary_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/.
--
-- 'templateBody', 'getTemplateSummary_templateBody' - Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. For more information about
-- templates, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
--
-- 'templateURL', 'getTemplateSummary_templateURL' - Location of file containing the template body. The URL must point to a
-- template (max size: 460,800 bytes) that is located in an Amazon S3
-- bucket or a Systems Manager document. For more information about
-- templates, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
--
-- 'stackSetName', 'getTemplateSummary_stackSetName' - The name or unique ID of the stack set from which the stack was created.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
--
-- 'stackName', 'getTemplateSummary_stackName' - The name or the stack ID that is associated with the stack, which are
-- not always interchangeable. For running stacks, you can specify either
-- the stack\'s name or its unique stack ID. For deleted stack, you must
-- specify the unique stack ID.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
newGetTemplateSummary ::
  GetTemplateSummary
newGetTemplateSummary :: GetTemplateSummary
newGetTemplateSummary =
  GetTemplateSummary' :: Maybe CallAs
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GetTemplateSummary
GetTemplateSummary'
    { $sel:callAs:GetTemplateSummary' :: Maybe CallAs
callAs = Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:GetTemplateSummary' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:GetTemplateSummary' :: Maybe Text
templateURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetName:GetTemplateSummary' :: Maybe Text
stackSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:GetTemplateSummary' :: Maybe Text
stackName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | [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/.
getTemplateSummary_callAs :: Lens.Lens' GetTemplateSummary (Prelude.Maybe CallAs)
getTemplateSummary_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> GetTemplateSummary -> f GetTemplateSummary
getTemplateSummary_callAs = (GetTemplateSummary -> Maybe CallAs)
-> (GetTemplateSummary -> Maybe CallAs -> GetTemplateSummary)
-> Lens
     GetTemplateSummary GetTemplateSummary (Maybe CallAs) (Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummary' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:GetTemplateSummary' :: GetTemplateSummary -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: GetTemplateSummary
s@GetTemplateSummary' {} Maybe CallAs
a -> GetTemplateSummary
s {$sel:callAs:GetTemplateSummary' :: Maybe CallAs
callAs = Maybe CallAs
a} :: GetTemplateSummary)

-- | Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. For more information about
-- templates, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
getTemplateSummary_templateBody :: Lens.Lens' GetTemplateSummary (Prelude.Maybe Prelude.Text)
getTemplateSummary_templateBody :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummary -> f GetTemplateSummary
getTemplateSummary_templateBody = (GetTemplateSummary -> Maybe Text)
-> (GetTemplateSummary -> Maybe Text -> GetTemplateSummary)
-> Lens
     GetTemplateSummary GetTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummary' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: GetTemplateSummary
s@GetTemplateSummary' {} Maybe Text
a -> GetTemplateSummary
s {$sel:templateBody:GetTemplateSummary' :: Maybe Text
templateBody = Maybe Text
a} :: GetTemplateSummary)

-- | Location of file containing the template body. The URL must point to a
-- template (max size: 460,800 bytes) that is located in an Amazon S3
-- bucket or a Systems Manager document. For more information about
-- templates, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
getTemplateSummary_templateURL :: Lens.Lens' GetTemplateSummary (Prelude.Maybe Prelude.Text)
getTemplateSummary_templateURL :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummary -> f GetTemplateSummary
getTemplateSummary_templateURL = (GetTemplateSummary -> Maybe Text)
-> (GetTemplateSummary -> Maybe Text -> GetTemplateSummary)
-> Lens
     GetTemplateSummary GetTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummary' {Maybe Text
templateURL :: Maybe Text
$sel:templateURL:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
templateURL} -> Maybe Text
templateURL) (\s :: GetTemplateSummary
s@GetTemplateSummary' {} Maybe Text
a -> GetTemplateSummary
s {$sel:templateURL:GetTemplateSummary' :: Maybe Text
templateURL = Maybe Text
a} :: GetTemplateSummary)

-- | The name or unique ID of the stack set from which the stack was created.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
getTemplateSummary_stackSetName :: Lens.Lens' GetTemplateSummary (Prelude.Maybe Prelude.Text)
getTemplateSummary_stackSetName :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummary -> f GetTemplateSummary
getTemplateSummary_stackSetName = (GetTemplateSummary -> Maybe Text)
-> (GetTemplateSummary -> Maybe Text -> GetTemplateSummary)
-> Lens
     GetTemplateSummary GetTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummary' {Maybe Text
stackSetName :: Maybe Text
$sel:stackSetName:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
stackSetName} -> Maybe Text
stackSetName) (\s :: GetTemplateSummary
s@GetTemplateSummary' {} Maybe Text
a -> GetTemplateSummary
s {$sel:stackSetName:GetTemplateSummary' :: Maybe Text
stackSetName = Maybe Text
a} :: GetTemplateSummary)

-- | The name or the stack ID that is associated with the stack, which are
-- not always interchangeable. For running stacks, you can specify either
-- the stack\'s name or its unique stack ID. For deleted stack, you must
-- specify the unique stack ID.
--
-- Conditional: You must specify only one of the following parameters:
-- @StackName@, @StackSetName@, @TemplateBody@, or @TemplateURL@.
getTemplateSummary_stackName :: Lens.Lens' GetTemplateSummary (Prelude.Maybe Prelude.Text)
getTemplateSummary_stackName :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummary -> f GetTemplateSummary
getTemplateSummary_stackName = (GetTemplateSummary -> Maybe Text)
-> (GetTemplateSummary -> Maybe Text -> GetTemplateSummary)
-> Lens
     GetTemplateSummary GetTemplateSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummary' {Maybe Text
stackName :: Maybe Text
$sel:stackName:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: GetTemplateSummary
s@GetTemplateSummary' {} Maybe Text
a -> GetTemplateSummary
s {$sel:stackName:GetTemplateSummary' :: Maybe Text
stackName = Maybe Text
a} :: GetTemplateSummary)

instance Core.AWSRequest GetTemplateSummary where
  type
    AWSResponse GetTemplateSummary =
      GetTemplateSummaryResponse
  request :: GetTemplateSummary -> Request GetTemplateSummary
request = Service -> GetTemplateSummary -> Request GetTemplateSummary
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy GetTemplateSummary
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetTemplateSummary)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse GetTemplateSummary))
-> Logger
-> Service
-> Proxy GetTemplateSummary
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetTemplateSummary)))
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
"GetTemplateSummaryResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [ParameterDeclaration]
-> Maybe Text
-> Maybe [ResourceIdentifierSummary]
-> Maybe Text
-> Maybe [Capability]
-> Maybe [Text]
-> Int
-> GetTemplateSummaryResponse
GetTemplateSummaryResponse'
            (Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ParameterDeclaration]
 -> Maybe Text
 -> Maybe [ResourceIdentifierSummary]
 -> Maybe Text
 -> Maybe [Capability]
 -> Maybe [Text]
 -> Int
 -> GetTemplateSummaryResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [ParameterDeclaration]
      -> Maybe Text
      -> Maybe [ResourceIdentifierSummary]
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Text]
      -> Int
      -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DeclaredTransforms"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [ParameterDeclaration]
   -> Maybe Text
   -> Maybe [ResourceIdentifierSummary]
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Text]
   -> Int
   -> GetTemplateSummaryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [ParameterDeclaration]
      -> Maybe Text
      -> Maybe [ResourceIdentifierSummary]
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Text]
      -> Int
      -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Version")
            Either
  String
  (Maybe Text
   -> Maybe [ParameterDeclaration]
   -> Maybe Text
   -> Maybe [ResourceIdentifierSummary]
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Text]
   -> Int
   -> GetTemplateSummaryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ParameterDeclaration]
      -> Maybe Text
      -> Maybe [ResourceIdentifierSummary]
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Text]
      -> Int
      -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => 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
"CapabilitiesReason")
            Either
  String
  (Maybe [ParameterDeclaration]
   -> Maybe Text
   -> Maybe [ResourceIdentifierSummary]
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Text]
   -> Int
   -> GetTemplateSummaryResponse)
-> Either String (Maybe [ParameterDeclaration])
-> Either
     String
     (Maybe Text
      -> Maybe [ResourceIdentifierSummary]
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Text]
      -> Int
      -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Parameters" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [ParameterDeclaration]))
-> Either String (Maybe [ParameterDeclaration])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ParameterDeclaration])
-> [Node] -> Either String (Maybe [ParameterDeclaration])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ParameterDeclaration]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe Text
   -> Maybe [ResourceIdentifierSummary]
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Text]
   -> Int
   -> GetTemplateSummaryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ResourceIdentifierSummary]
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Text]
      -> Int
      -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Metadata")
            Either
  String
  (Maybe [ResourceIdentifierSummary]
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Text]
   -> Int
   -> GetTemplateSummaryResponse)
-> Either String (Maybe [ResourceIdentifierSummary])
-> Either
     String
     (Maybe Text
      -> Maybe [Capability]
      -> Maybe [Text]
      -> Int
      -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceIdentifierSummaries"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [ResourceIdentifierSummary]))
-> Either String (Maybe [ResourceIdentifierSummary])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ResourceIdentifierSummary])
-> [Node] -> Either String (Maybe [ResourceIdentifierSummary])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ResourceIdentifierSummary]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe Text
   -> Maybe [Capability]
   -> Maybe [Text]
   -> Int
   -> GetTemplateSummaryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Capability]
      -> Maybe [Text] -> Int -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Description")
            Either
  String
  (Maybe [Capability]
   -> Maybe [Text] -> Int -> GetTemplateSummaryResponse)
-> Either String (Maybe [Capability])
-> Either
     String (Maybe [Text] -> Int -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Capabilities" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Capability]))
-> Either String (Maybe [Capability])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Capability])
-> [Node] -> Either String (Maybe [Capability])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Capability]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Maybe [Text] -> Int -> GetTemplateSummaryResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> GetTemplateSummaryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceTypes" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> GetTemplateSummaryResponse)
-> Either String Int -> Either String GetTemplateSummaryResponse
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 GetTemplateSummary

instance Prelude.NFData GetTemplateSummary

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

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

instance Core.ToQuery GetTemplateSummary where
  toQuery :: GetTemplateSummary -> QueryString
toQuery GetTemplateSummary' {Maybe Text
Maybe CallAs
stackName :: Maybe Text
stackSetName :: Maybe Text
templateURL :: Maybe Text
templateBody :: Maybe Text
callAs :: Maybe CallAs
$sel:stackName:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
$sel:stackSetName:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
$sel:templateURL:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
$sel:templateBody:GetTemplateSummary' :: GetTemplateSummary -> Maybe Text
$sel:callAs:GetTemplateSummary' :: GetTemplateSummary -> 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
"GetTemplateSummary" :: 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
"TemplateBody" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateBody,
        ByteString
"TemplateURL" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateURL,
        ByteString
"StackSetName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
stackSetName,
        ByteString
"StackName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
stackName
      ]

-- | The output for the GetTemplateSummary action.
--
-- /See:/ 'newGetTemplateSummaryResponse' smart constructor.
data GetTemplateSummaryResponse = GetTemplateSummaryResponse'
  { -- | A list of the transforms that are declared in the template.
    GetTemplateSummaryResponse -> Maybe [Text]
declaredTransforms :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Web Services template format version, which identifies the
    -- capabilities of the template.
    GetTemplateSummaryResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The list of resources that generated the values in the @Capabilities@
    -- response element.
    GetTemplateSummaryResponse -> Maybe Text
capabilitiesReason :: Prelude.Maybe Prelude.Text,
    -- | A list of parameter declarations that describe various properties for
    -- each parameter.
    GetTemplateSummaryResponse -> Maybe [ParameterDeclaration]
parameters :: Prelude.Maybe [ParameterDeclaration],
    -- | The value that is defined for the @Metadata@ property of the template.
    GetTemplateSummaryResponse -> Maybe Text
metadata :: Prelude.Maybe Prelude.Text,
    -- | A list of resource identifier summaries that describe the target
    -- resources of an import operation and the properties you can provide
    -- during the import to identify the target resources. For example,
    -- @BucketName@ is a possible identifier property for an @AWS::S3::Bucket@
    -- resource.
    GetTemplateSummaryResponse -> Maybe [ResourceIdentifierSummary]
resourceIdentifierSummaries :: Prelude.Maybe [ResourceIdentifierSummary],
    -- | The value that is defined in the @Description@ property of the template.
    GetTemplateSummaryResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The capabilities found within the template. If your template contains
    -- IAM resources, you must specify the @CAPABILITY_IAM@ or
    -- @CAPABILITY_NAMED_IAM@ value for this parameter when you use the
    -- CreateStack or UpdateStack actions with your template; otherwise, those
    -- actions return an @InsufficientCapabilities@ error.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
    GetTemplateSummaryResponse -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | A list of all the template resource types that are defined in the
    -- template, such as @AWS::EC2::Instance@, @AWS::Dynamo::Table@, and
    -- @Custom::MyCustomInstance@.
    GetTemplateSummaryResponse -> Maybe [Text]
resourceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    GetTemplateSummaryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetTemplateSummaryResponse -> GetTemplateSummaryResponse -> Bool
(GetTemplateSummaryResponse -> GetTemplateSummaryResponse -> Bool)
-> (GetTemplateSummaryResponse
    -> GetTemplateSummaryResponse -> Bool)
-> Eq GetTemplateSummaryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTemplateSummaryResponse -> GetTemplateSummaryResponse -> Bool
$c/= :: GetTemplateSummaryResponse -> GetTemplateSummaryResponse -> Bool
== :: GetTemplateSummaryResponse -> GetTemplateSummaryResponse -> Bool
$c== :: GetTemplateSummaryResponse -> GetTemplateSummaryResponse -> Bool
Prelude.Eq, ReadPrec [GetTemplateSummaryResponse]
ReadPrec GetTemplateSummaryResponse
Int -> ReadS GetTemplateSummaryResponse
ReadS [GetTemplateSummaryResponse]
(Int -> ReadS GetTemplateSummaryResponse)
-> ReadS [GetTemplateSummaryResponse]
-> ReadPrec GetTemplateSummaryResponse
-> ReadPrec [GetTemplateSummaryResponse]
-> Read GetTemplateSummaryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTemplateSummaryResponse]
$creadListPrec :: ReadPrec [GetTemplateSummaryResponse]
readPrec :: ReadPrec GetTemplateSummaryResponse
$creadPrec :: ReadPrec GetTemplateSummaryResponse
readList :: ReadS [GetTemplateSummaryResponse]
$creadList :: ReadS [GetTemplateSummaryResponse]
readsPrec :: Int -> ReadS GetTemplateSummaryResponse
$creadsPrec :: Int -> ReadS GetTemplateSummaryResponse
Prelude.Read, Int -> GetTemplateSummaryResponse -> ShowS
[GetTemplateSummaryResponse] -> ShowS
GetTemplateSummaryResponse -> String
(Int -> GetTemplateSummaryResponse -> ShowS)
-> (GetTemplateSummaryResponse -> String)
-> ([GetTemplateSummaryResponse] -> ShowS)
-> Show GetTemplateSummaryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTemplateSummaryResponse] -> ShowS
$cshowList :: [GetTemplateSummaryResponse] -> ShowS
show :: GetTemplateSummaryResponse -> String
$cshow :: GetTemplateSummaryResponse -> String
showsPrec :: Int -> GetTemplateSummaryResponse -> ShowS
$cshowsPrec :: Int -> GetTemplateSummaryResponse -> ShowS
Prelude.Show, (forall x.
 GetTemplateSummaryResponse -> Rep GetTemplateSummaryResponse x)
-> (forall x.
    Rep GetTemplateSummaryResponse x -> GetTemplateSummaryResponse)
-> Generic GetTemplateSummaryResponse
forall x.
Rep GetTemplateSummaryResponse x -> GetTemplateSummaryResponse
forall x.
GetTemplateSummaryResponse -> Rep GetTemplateSummaryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetTemplateSummaryResponse x -> GetTemplateSummaryResponse
$cfrom :: forall x.
GetTemplateSummaryResponse -> Rep GetTemplateSummaryResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetTemplateSummaryResponse' 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:
--
-- 'declaredTransforms', 'getTemplateSummaryResponse_declaredTransforms' - A list of the transforms that are declared in the template.
--
-- 'version', 'getTemplateSummaryResponse_version' - The Amazon Web Services template format version, which identifies the
-- capabilities of the template.
--
-- 'capabilitiesReason', 'getTemplateSummaryResponse_capabilitiesReason' - The list of resources that generated the values in the @Capabilities@
-- response element.
--
-- 'parameters', 'getTemplateSummaryResponse_parameters' - A list of parameter declarations that describe various properties for
-- each parameter.
--
-- 'metadata', 'getTemplateSummaryResponse_metadata' - The value that is defined for the @Metadata@ property of the template.
--
-- 'resourceIdentifierSummaries', 'getTemplateSummaryResponse_resourceIdentifierSummaries' - A list of resource identifier summaries that describe the target
-- resources of an import operation and the properties you can provide
-- during the import to identify the target resources. For example,
-- @BucketName@ is a possible identifier property for an @AWS::S3::Bucket@
-- resource.
--
-- 'description', 'getTemplateSummaryResponse_description' - The value that is defined in the @Description@ property of the template.
--
-- 'capabilities', 'getTemplateSummaryResponse_capabilities' - The capabilities found within the template. If your template contains
-- IAM resources, you must specify the @CAPABILITY_IAM@ or
-- @CAPABILITY_NAMED_IAM@ value for this parameter when you use the
-- CreateStack or UpdateStack actions with your template; otherwise, those
-- actions return an @InsufficientCapabilities@ error.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
--
-- 'resourceTypes', 'getTemplateSummaryResponse_resourceTypes' - A list of all the template resource types that are defined in the
-- template, such as @AWS::EC2::Instance@, @AWS::Dynamo::Table@, and
-- @Custom::MyCustomInstance@.
--
-- 'httpStatus', 'getTemplateSummaryResponse_httpStatus' - The response's http status code.
newGetTemplateSummaryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetTemplateSummaryResponse
newGetTemplateSummaryResponse :: Int -> GetTemplateSummaryResponse
newGetTemplateSummaryResponse Int
pHttpStatus_ =
  GetTemplateSummaryResponse' :: Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [ParameterDeclaration]
-> Maybe Text
-> Maybe [ResourceIdentifierSummary]
-> Maybe Text
-> Maybe [Capability]
-> Maybe [Text]
-> Int
-> GetTemplateSummaryResponse
GetTemplateSummaryResponse'
    { $sel:declaredTransforms:GetTemplateSummaryResponse' :: Maybe [Text]
declaredTransforms =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetTemplateSummaryResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilitiesReason:GetTemplateSummaryResponse' :: Maybe Text
capabilitiesReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:GetTemplateSummaryResponse' :: Maybe [ParameterDeclaration]
parameters = Maybe [ParameterDeclaration]
forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:GetTemplateSummaryResponse' :: Maybe Text
metadata = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceIdentifierSummaries:GetTemplateSummaryResponse' :: Maybe [ResourceIdentifierSummary]
resourceIdentifierSummaries = Maybe [ResourceIdentifierSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetTemplateSummaryResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:GetTemplateSummaryResponse' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypes:GetTemplateSummaryResponse' :: Maybe [Text]
resourceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetTemplateSummaryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of the transforms that are declared in the template.
getTemplateSummaryResponse_declaredTransforms :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe [Prelude.Text])
getTemplateSummaryResponse_declaredTransforms :: (Maybe [Text] -> f (Maybe [Text]))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_declaredTransforms = (GetTemplateSummaryResponse -> Maybe [Text])
-> (GetTemplateSummaryResponse
    -> Maybe [Text] -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe [Text]
declaredTransforms :: Maybe [Text]
$sel:declaredTransforms:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe [Text]
declaredTransforms} -> Maybe [Text]
declaredTransforms) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe [Text]
a -> GetTemplateSummaryResponse
s {$sel:declaredTransforms:GetTemplateSummaryResponse' :: Maybe [Text]
declaredTransforms = Maybe [Text]
a} :: GetTemplateSummaryResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetTemplateSummaryResponse
-> f GetTemplateSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Web Services template format version, which identifies the
-- capabilities of the template.
getTemplateSummaryResponse_version :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe Prelude.Text)
getTemplateSummaryResponse_version :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_version = (GetTemplateSummaryResponse -> Maybe Text)
-> (GetTemplateSummaryResponse
    -> Maybe Text -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe Text
version :: Maybe Text
$sel:version:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe Text
a -> GetTemplateSummaryResponse
s {$sel:version:GetTemplateSummaryResponse' :: Maybe Text
version = Maybe Text
a} :: GetTemplateSummaryResponse)

-- | The list of resources that generated the values in the @Capabilities@
-- response element.
getTemplateSummaryResponse_capabilitiesReason :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe Prelude.Text)
getTemplateSummaryResponse_capabilitiesReason :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_capabilitiesReason = (GetTemplateSummaryResponse -> Maybe Text)
-> (GetTemplateSummaryResponse
    -> Maybe Text -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe Text
capabilitiesReason :: Maybe Text
$sel:capabilitiesReason:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe Text
capabilitiesReason} -> Maybe Text
capabilitiesReason) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe Text
a -> GetTemplateSummaryResponse
s {$sel:capabilitiesReason:GetTemplateSummaryResponse' :: Maybe Text
capabilitiesReason = Maybe Text
a} :: GetTemplateSummaryResponse)

-- | A list of parameter declarations that describe various properties for
-- each parameter.
getTemplateSummaryResponse_parameters :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe [ParameterDeclaration])
getTemplateSummaryResponse_parameters :: (Maybe [ParameterDeclaration] -> f (Maybe [ParameterDeclaration]))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_parameters = (GetTemplateSummaryResponse -> Maybe [ParameterDeclaration])
-> (GetTemplateSummaryResponse
    -> Maybe [ParameterDeclaration] -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe [ParameterDeclaration])
     (Maybe [ParameterDeclaration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe [ParameterDeclaration]
parameters :: Maybe [ParameterDeclaration]
$sel:parameters:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe [ParameterDeclaration]
parameters} -> Maybe [ParameterDeclaration]
parameters) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe [ParameterDeclaration]
a -> GetTemplateSummaryResponse
s {$sel:parameters:GetTemplateSummaryResponse' :: Maybe [ParameterDeclaration]
parameters = Maybe [ParameterDeclaration]
a} :: GetTemplateSummaryResponse) ((Maybe [ParameterDeclaration] -> f (Maybe [ParameterDeclaration]))
 -> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse)
-> ((Maybe [ParameterDeclaration]
     -> f (Maybe [ParameterDeclaration]))
    -> Maybe [ParameterDeclaration]
    -> f (Maybe [ParameterDeclaration]))
-> (Maybe [ParameterDeclaration]
    -> f (Maybe [ParameterDeclaration]))
-> GetTemplateSummaryResponse
-> f GetTemplateSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ParameterDeclaration]
  [ParameterDeclaration]
  [ParameterDeclaration]
  [ParameterDeclaration]
-> Iso
     (Maybe [ParameterDeclaration])
     (Maybe [ParameterDeclaration])
     (Maybe [ParameterDeclaration])
     (Maybe [ParameterDeclaration])
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
  [ParameterDeclaration]
  [ParameterDeclaration]
  [ParameterDeclaration]
  [ParameterDeclaration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The value that is defined for the @Metadata@ property of the template.
getTemplateSummaryResponse_metadata :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe Prelude.Text)
getTemplateSummaryResponse_metadata :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_metadata = (GetTemplateSummaryResponse -> Maybe Text)
-> (GetTemplateSummaryResponse
    -> Maybe Text -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe Text
metadata :: Maybe Text
$sel:metadata:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe Text
metadata} -> Maybe Text
metadata) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe Text
a -> GetTemplateSummaryResponse
s {$sel:metadata:GetTemplateSummaryResponse' :: Maybe Text
metadata = Maybe Text
a} :: GetTemplateSummaryResponse)

-- | A list of resource identifier summaries that describe the target
-- resources of an import operation and the properties you can provide
-- during the import to identify the target resources. For example,
-- @BucketName@ is a possible identifier property for an @AWS::S3::Bucket@
-- resource.
getTemplateSummaryResponse_resourceIdentifierSummaries :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe [ResourceIdentifierSummary])
getTemplateSummaryResponse_resourceIdentifierSummaries :: (Maybe [ResourceIdentifierSummary]
 -> f (Maybe [ResourceIdentifierSummary]))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_resourceIdentifierSummaries = (GetTemplateSummaryResponse -> Maybe [ResourceIdentifierSummary])
-> (GetTemplateSummaryResponse
    -> Maybe [ResourceIdentifierSummary] -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe [ResourceIdentifierSummary])
     (Maybe [ResourceIdentifierSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe [ResourceIdentifierSummary]
resourceIdentifierSummaries :: Maybe [ResourceIdentifierSummary]
$sel:resourceIdentifierSummaries:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe [ResourceIdentifierSummary]
resourceIdentifierSummaries} -> Maybe [ResourceIdentifierSummary]
resourceIdentifierSummaries) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe [ResourceIdentifierSummary]
a -> GetTemplateSummaryResponse
s {$sel:resourceIdentifierSummaries:GetTemplateSummaryResponse' :: Maybe [ResourceIdentifierSummary]
resourceIdentifierSummaries = Maybe [ResourceIdentifierSummary]
a} :: GetTemplateSummaryResponse) ((Maybe [ResourceIdentifierSummary]
  -> f (Maybe [ResourceIdentifierSummary]))
 -> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse)
-> ((Maybe [ResourceIdentifierSummary]
     -> f (Maybe [ResourceIdentifierSummary]))
    -> Maybe [ResourceIdentifierSummary]
    -> f (Maybe [ResourceIdentifierSummary]))
-> (Maybe [ResourceIdentifierSummary]
    -> f (Maybe [ResourceIdentifierSummary]))
-> GetTemplateSummaryResponse
-> f GetTemplateSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceIdentifierSummary]
  [ResourceIdentifierSummary]
  [ResourceIdentifierSummary]
  [ResourceIdentifierSummary]
-> Iso
     (Maybe [ResourceIdentifierSummary])
     (Maybe [ResourceIdentifierSummary])
     (Maybe [ResourceIdentifierSummary])
     (Maybe [ResourceIdentifierSummary])
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
  [ResourceIdentifierSummary]
  [ResourceIdentifierSummary]
  [ResourceIdentifierSummary]
  [ResourceIdentifierSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The value that is defined in the @Description@ property of the template.
getTemplateSummaryResponse_description :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe Prelude.Text)
getTemplateSummaryResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_description = (GetTemplateSummaryResponse -> Maybe Text)
-> (GetTemplateSummaryResponse
    -> Maybe Text -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe Text
a -> GetTemplateSummaryResponse
s {$sel:description:GetTemplateSummaryResponse' :: Maybe Text
description = Maybe Text
a} :: GetTemplateSummaryResponse)

-- | The capabilities found within the template. If your template contains
-- IAM resources, you must specify the @CAPABILITY_IAM@ or
-- @CAPABILITY_NAMED_IAM@ value for this parameter when you use the
-- CreateStack or UpdateStack actions with your template; otherwise, those
-- actions return an @InsufficientCapabilities@ error.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
getTemplateSummaryResponse_capabilities :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe [Capability])
getTemplateSummaryResponse_capabilities :: (Maybe [Capability] -> f (Maybe [Capability]))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_capabilities = (GetTemplateSummaryResponse -> Maybe [Capability])
-> (GetTemplateSummaryResponse
    -> Maybe [Capability] -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe [Capability])
     (Maybe [Capability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe [Capability]
a -> GetTemplateSummaryResponse
s {$sel:capabilities:GetTemplateSummaryResponse' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: GetTemplateSummaryResponse) ((Maybe [Capability] -> f (Maybe [Capability]))
 -> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
    -> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> GetTemplateSummaryResponse
-> f GetTemplateSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Capability] [Capability] [Capability] [Capability]
-> Iso
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
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 [Capability] [Capability] [Capability] [Capability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of all the template resource types that are defined in the
-- template, such as @AWS::EC2::Instance@, @AWS::Dynamo::Table@, and
-- @Custom::MyCustomInstance@.
getTemplateSummaryResponse_resourceTypes :: Lens.Lens' GetTemplateSummaryResponse (Prelude.Maybe [Prelude.Text])
getTemplateSummaryResponse_resourceTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse
getTemplateSummaryResponse_resourceTypes = (GetTemplateSummaryResponse -> Maybe [Text])
-> (GetTemplateSummaryResponse
    -> Maybe [Text] -> GetTemplateSummaryResponse)
-> Lens
     GetTemplateSummaryResponse
     GetTemplateSummaryResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateSummaryResponse' {Maybe [Text]
resourceTypes :: Maybe [Text]
$sel:resourceTypes:GetTemplateSummaryResponse' :: GetTemplateSummaryResponse -> Maybe [Text]
resourceTypes} -> Maybe [Text]
resourceTypes) (\s :: GetTemplateSummaryResponse
s@GetTemplateSummaryResponse' {} Maybe [Text]
a -> GetTemplateSummaryResponse
s {$sel:resourceTypes:GetTemplateSummaryResponse' :: Maybe [Text]
resourceTypes = Maybe [Text]
a} :: GetTemplateSummaryResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetTemplateSummaryResponse -> f GetTemplateSummaryResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetTemplateSummaryResponse
-> f GetTemplateSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetTemplateSummaryResponse