{-# 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.DescribeChangeSetHooks
-- 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 hook-related information for the change set and a list of
-- changes that CloudFormation makes when you run the change set.
module Amazonka.CloudFormation.DescribeChangeSetHooks
  ( -- * Creating a Request
    DescribeChangeSetHooks (..),
    newDescribeChangeSetHooks,

    -- * Request Lenses
    describeChangeSetHooks_logicalResourceId,
    describeChangeSetHooks_nextToken,
    describeChangeSetHooks_stackName,
    describeChangeSetHooks_changeSetName,

    -- * Destructuring the Response
    DescribeChangeSetHooksResponse (..),
    newDescribeChangeSetHooksResponse,

    -- * Response Lenses
    describeChangeSetHooksResponse_changeSetId,
    describeChangeSetHooksResponse_changeSetName,
    describeChangeSetHooksResponse_hooks,
    describeChangeSetHooksResponse_nextToken,
    describeChangeSetHooksResponse_stackId,
    describeChangeSetHooksResponse_stackName,
    describeChangeSetHooksResponse_status,
    describeChangeSetHooksResponse_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:/ 'newDescribeChangeSetHooks' smart constructor.
data DescribeChangeSetHooks = DescribeChangeSetHooks'
  { -- | If specified, lists only the hooks related to the specified
    -- @LogicalResourceId@.
    DescribeChangeSetHooks -> Maybe Text
logicalResourceId :: Prelude.Maybe Prelude.Text,
    -- | A string, provided by the @DescribeChangeSetHooks@ response output, that
    -- identifies the next page of information that you want to retrieve.
    DescribeChangeSetHooks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | If you specified the name of a change set, specify the stack name or
    -- stack ID (ARN) of the change set you want to describe.
    DescribeChangeSetHooks -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text,
    -- | The name or Amazon Resource Name (ARN) of the change set that you want
    -- to describe.
    DescribeChangeSetHooks -> Text
changeSetName :: Prelude.Text
  }
  deriving (DescribeChangeSetHooks -> DescribeChangeSetHooks -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChangeSetHooks -> DescribeChangeSetHooks -> Bool
$c/= :: DescribeChangeSetHooks -> DescribeChangeSetHooks -> Bool
== :: DescribeChangeSetHooks -> DescribeChangeSetHooks -> Bool
$c== :: DescribeChangeSetHooks -> DescribeChangeSetHooks -> Bool
Prelude.Eq, ReadPrec [DescribeChangeSetHooks]
ReadPrec DescribeChangeSetHooks
Int -> ReadS DescribeChangeSetHooks
ReadS [DescribeChangeSetHooks]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeChangeSetHooks]
$creadListPrec :: ReadPrec [DescribeChangeSetHooks]
readPrec :: ReadPrec DescribeChangeSetHooks
$creadPrec :: ReadPrec DescribeChangeSetHooks
readList :: ReadS [DescribeChangeSetHooks]
$creadList :: ReadS [DescribeChangeSetHooks]
readsPrec :: Int -> ReadS DescribeChangeSetHooks
$creadsPrec :: Int -> ReadS DescribeChangeSetHooks
Prelude.Read, Int -> DescribeChangeSetHooks -> ShowS
[DescribeChangeSetHooks] -> ShowS
DescribeChangeSetHooks -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChangeSetHooks] -> ShowS
$cshowList :: [DescribeChangeSetHooks] -> ShowS
show :: DescribeChangeSetHooks -> String
$cshow :: DescribeChangeSetHooks -> String
showsPrec :: Int -> DescribeChangeSetHooks -> ShowS
$cshowsPrec :: Int -> DescribeChangeSetHooks -> ShowS
Prelude.Show, forall x. Rep DescribeChangeSetHooks x -> DescribeChangeSetHooks
forall x. DescribeChangeSetHooks -> Rep DescribeChangeSetHooks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeChangeSetHooks x -> DescribeChangeSetHooks
$cfrom :: forall x. DescribeChangeSetHooks -> Rep DescribeChangeSetHooks x
Prelude.Generic)

-- |
-- Create a value of 'DescribeChangeSetHooks' 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:
--
-- 'logicalResourceId', 'describeChangeSetHooks_logicalResourceId' - If specified, lists only the hooks related to the specified
-- @LogicalResourceId@.
--
-- 'nextToken', 'describeChangeSetHooks_nextToken' - A string, provided by the @DescribeChangeSetHooks@ response output, that
-- identifies the next page of information that you want to retrieve.
--
-- 'stackName', 'describeChangeSetHooks_stackName' - If you specified the name of a change set, specify the stack name or
-- stack ID (ARN) of the change set you want to describe.
--
-- 'changeSetName', 'describeChangeSetHooks_changeSetName' - The name or Amazon Resource Name (ARN) of the change set that you want
-- to describe.
newDescribeChangeSetHooks ::
  -- | 'changeSetName'
  Prelude.Text ->
  DescribeChangeSetHooks
newDescribeChangeSetHooks :: Text -> DescribeChangeSetHooks
newDescribeChangeSetHooks Text
pChangeSetName_ =
  DescribeChangeSetHooks'
    { $sel:logicalResourceId:DescribeChangeSetHooks' :: Maybe Text
logicalResourceId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeChangeSetHooks' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:DescribeChangeSetHooks' :: Maybe Text
stackName = forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetName:DescribeChangeSetHooks' :: Text
changeSetName = Text
pChangeSetName_
    }

-- | If specified, lists only the hooks related to the specified
-- @LogicalResourceId@.
describeChangeSetHooks_logicalResourceId :: Lens.Lens' DescribeChangeSetHooks (Prelude.Maybe Prelude.Text)
describeChangeSetHooks_logicalResourceId :: Lens' DescribeChangeSetHooks (Maybe Text)
describeChangeSetHooks_logicalResourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooks' {Maybe Text
logicalResourceId :: Maybe Text
$sel:logicalResourceId:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
logicalResourceId} -> Maybe Text
logicalResourceId) (\s :: DescribeChangeSetHooks
s@DescribeChangeSetHooks' {} Maybe Text
a -> DescribeChangeSetHooks
s {$sel:logicalResourceId:DescribeChangeSetHooks' :: Maybe Text
logicalResourceId = Maybe Text
a} :: DescribeChangeSetHooks)

-- | A string, provided by the @DescribeChangeSetHooks@ response output, that
-- identifies the next page of information that you want to retrieve.
describeChangeSetHooks_nextToken :: Lens.Lens' DescribeChangeSetHooks (Prelude.Maybe Prelude.Text)
describeChangeSetHooks_nextToken :: Lens' DescribeChangeSetHooks (Maybe Text)
describeChangeSetHooks_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeChangeSetHooks
s@DescribeChangeSetHooks' {} Maybe Text
a -> DescribeChangeSetHooks
s {$sel:nextToken:DescribeChangeSetHooks' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeChangeSetHooks)

-- | If you specified the name of a change set, specify the stack name or
-- stack ID (ARN) of the change set you want to describe.
describeChangeSetHooks_stackName :: Lens.Lens' DescribeChangeSetHooks (Prelude.Maybe Prelude.Text)
describeChangeSetHooks_stackName :: Lens' DescribeChangeSetHooks (Maybe Text)
describeChangeSetHooks_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooks' {Maybe Text
stackName :: Maybe Text
$sel:stackName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: DescribeChangeSetHooks
s@DescribeChangeSetHooks' {} Maybe Text
a -> DescribeChangeSetHooks
s {$sel:stackName:DescribeChangeSetHooks' :: Maybe Text
stackName = Maybe Text
a} :: DescribeChangeSetHooks)

-- | The name or Amazon Resource Name (ARN) of the change set that you want
-- to describe.
describeChangeSetHooks_changeSetName :: Lens.Lens' DescribeChangeSetHooks Prelude.Text
describeChangeSetHooks_changeSetName :: Lens' DescribeChangeSetHooks Text
describeChangeSetHooks_changeSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooks' {Text
changeSetName :: Text
$sel:changeSetName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Text
changeSetName} -> Text
changeSetName) (\s :: DescribeChangeSetHooks
s@DescribeChangeSetHooks' {} Text
a -> DescribeChangeSetHooks
s {$sel:changeSetName:DescribeChangeSetHooks' :: Text
changeSetName = Text
a} :: DescribeChangeSetHooks)

instance Core.AWSRequest DescribeChangeSetHooks where
  type
    AWSResponse DescribeChangeSetHooks =
      DescribeChangeSetHooksResponse
  request :: (Service -> Service)
-> DescribeChangeSetHooks -> Request DescribeChangeSetHooks
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 DescribeChangeSetHooks
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeChangeSetHooks)))
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
"DescribeChangeSetHooksResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Text
-> Maybe [ChangeSetHook]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeSetHooksStatus
-> Int
-> DescribeChangeSetHooksResponse
DescribeChangeSetHooksResponse'
            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
"ChangeSetId")
            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
"ChangeSetName")
            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
"Hooks"
                            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.<*> ([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
"StackId")
            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
"StackName")
            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
"Status")
            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 DescribeChangeSetHooks where
  hashWithSalt :: Int -> DescribeChangeSetHooks -> Int
hashWithSalt Int
_salt DescribeChangeSetHooks' {Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
nextToken :: Maybe Text
logicalResourceId :: Maybe Text
$sel:changeSetName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Text
$sel:stackName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
$sel:nextToken:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
$sel:logicalResourceId:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logicalResourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
changeSetName

instance Prelude.NFData DescribeChangeSetHooks where
  rnf :: DescribeChangeSetHooks -> ()
rnf DescribeChangeSetHooks' {Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
nextToken :: Maybe Text
logicalResourceId :: Maybe Text
$sel:changeSetName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Text
$sel:stackName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
$sel:nextToken:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
$sel:logicalResourceId:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logicalResourceId
      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 Maybe Text
stackName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
changeSetName

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

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

instance Data.ToQuery DescribeChangeSetHooks where
  toQuery :: DescribeChangeSetHooks -> QueryString
toQuery DescribeChangeSetHooks' {Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
nextToken :: Maybe Text
logicalResourceId :: Maybe Text
$sel:changeSetName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Text
$sel:stackName:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
$sel:nextToken:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
$sel:logicalResourceId:DescribeChangeSetHooks' :: DescribeChangeSetHooks -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeChangeSetHooks" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"LogicalResourceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logicalResourceId,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackName,
        ByteString
"ChangeSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
changeSetName
      ]

-- | /See:/ 'newDescribeChangeSetHooksResponse' smart constructor.
data DescribeChangeSetHooksResponse = DescribeChangeSetHooksResponse'
  { -- | The change set identifier (stack ID).
    DescribeChangeSetHooksResponse -> Maybe Text
changeSetId :: Prelude.Maybe Prelude.Text,
    -- | The change set name.
    DescribeChangeSetHooksResponse -> Maybe Text
changeSetName :: Prelude.Maybe Prelude.Text,
    -- | List of hook objects.
    DescribeChangeSetHooksResponse -> Maybe [ChangeSetHook]
hooks :: Prelude.Maybe [ChangeSetHook],
    -- | Pagination token, @null@ or empty if no more results.
    DescribeChangeSetHooksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The stack identifier (stack ID).
    DescribeChangeSetHooksResponse -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The stack name.
    DescribeChangeSetHooksResponse -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text,
    -- | Provides the status of the change set hook.
    DescribeChangeSetHooksResponse -> Maybe ChangeSetHooksStatus
status :: Prelude.Maybe ChangeSetHooksStatus,
    -- | The response's http status code.
    DescribeChangeSetHooksResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeChangeSetHooksResponse
-> DescribeChangeSetHooksResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChangeSetHooksResponse
-> DescribeChangeSetHooksResponse -> Bool
$c/= :: DescribeChangeSetHooksResponse
-> DescribeChangeSetHooksResponse -> Bool
== :: DescribeChangeSetHooksResponse
-> DescribeChangeSetHooksResponse -> Bool
$c== :: DescribeChangeSetHooksResponse
-> DescribeChangeSetHooksResponse -> Bool
Prelude.Eq, ReadPrec [DescribeChangeSetHooksResponse]
ReadPrec DescribeChangeSetHooksResponse
Int -> ReadS DescribeChangeSetHooksResponse
ReadS [DescribeChangeSetHooksResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeChangeSetHooksResponse]
$creadListPrec :: ReadPrec [DescribeChangeSetHooksResponse]
readPrec :: ReadPrec DescribeChangeSetHooksResponse
$creadPrec :: ReadPrec DescribeChangeSetHooksResponse
readList :: ReadS [DescribeChangeSetHooksResponse]
$creadList :: ReadS [DescribeChangeSetHooksResponse]
readsPrec :: Int -> ReadS DescribeChangeSetHooksResponse
$creadsPrec :: Int -> ReadS DescribeChangeSetHooksResponse
Prelude.Read, Int -> DescribeChangeSetHooksResponse -> ShowS
[DescribeChangeSetHooksResponse] -> ShowS
DescribeChangeSetHooksResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChangeSetHooksResponse] -> ShowS
$cshowList :: [DescribeChangeSetHooksResponse] -> ShowS
show :: DescribeChangeSetHooksResponse -> String
$cshow :: DescribeChangeSetHooksResponse -> String
showsPrec :: Int -> DescribeChangeSetHooksResponse -> ShowS
$cshowsPrec :: Int -> DescribeChangeSetHooksResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeChangeSetHooksResponse x
-> DescribeChangeSetHooksResponse
forall x.
DescribeChangeSetHooksResponse
-> Rep DescribeChangeSetHooksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeChangeSetHooksResponse x
-> DescribeChangeSetHooksResponse
$cfrom :: forall x.
DescribeChangeSetHooksResponse
-> Rep DescribeChangeSetHooksResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeChangeSetHooksResponse' 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:
--
-- 'changeSetId', 'describeChangeSetHooksResponse_changeSetId' - The change set identifier (stack ID).
--
-- 'changeSetName', 'describeChangeSetHooksResponse_changeSetName' - The change set name.
--
-- 'hooks', 'describeChangeSetHooksResponse_hooks' - List of hook objects.
--
-- 'nextToken', 'describeChangeSetHooksResponse_nextToken' - Pagination token, @null@ or empty if no more results.
--
-- 'stackId', 'describeChangeSetHooksResponse_stackId' - The stack identifier (stack ID).
--
-- 'stackName', 'describeChangeSetHooksResponse_stackName' - The stack name.
--
-- 'status', 'describeChangeSetHooksResponse_status' - Provides the status of the change set hook.
--
-- 'httpStatus', 'describeChangeSetHooksResponse_httpStatus' - The response's http status code.
newDescribeChangeSetHooksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeChangeSetHooksResponse
newDescribeChangeSetHooksResponse :: Int -> DescribeChangeSetHooksResponse
newDescribeChangeSetHooksResponse Int
pHttpStatus_ =
  DescribeChangeSetHooksResponse'
    { $sel:changeSetId:DescribeChangeSetHooksResponse' :: Maybe Text
changeSetId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetName:DescribeChangeSetHooksResponse' :: Maybe Text
changeSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:hooks:DescribeChangeSetHooksResponse' :: Maybe [ChangeSetHook]
hooks = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeChangeSetHooksResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeChangeSetHooksResponse' :: Maybe Text
stackId = forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:DescribeChangeSetHooksResponse' :: Maybe Text
stackName = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeChangeSetHooksResponse' :: Maybe ChangeSetHooksStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeChangeSetHooksResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The change set identifier (stack ID).
describeChangeSetHooksResponse_changeSetId :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe Prelude.Text)
describeChangeSetHooksResponse_changeSetId :: Lens' DescribeChangeSetHooksResponse (Maybe Text)
describeChangeSetHooksResponse_changeSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe Text
changeSetId :: Maybe Text
$sel:changeSetId:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
changeSetId} -> Maybe Text
changeSetId) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe Text
a -> DescribeChangeSetHooksResponse
s {$sel:changeSetId:DescribeChangeSetHooksResponse' :: Maybe Text
changeSetId = Maybe Text
a} :: DescribeChangeSetHooksResponse)

-- | The change set name.
describeChangeSetHooksResponse_changeSetName :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe Prelude.Text)
describeChangeSetHooksResponse_changeSetName :: Lens' DescribeChangeSetHooksResponse (Maybe Text)
describeChangeSetHooksResponse_changeSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe Text
changeSetName :: Maybe Text
$sel:changeSetName:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
changeSetName} -> Maybe Text
changeSetName) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe Text
a -> DescribeChangeSetHooksResponse
s {$sel:changeSetName:DescribeChangeSetHooksResponse' :: Maybe Text
changeSetName = Maybe Text
a} :: DescribeChangeSetHooksResponse)

-- | List of hook objects.
describeChangeSetHooksResponse_hooks :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe [ChangeSetHook])
describeChangeSetHooksResponse_hooks :: Lens' DescribeChangeSetHooksResponse (Maybe [ChangeSetHook])
describeChangeSetHooksResponse_hooks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe [ChangeSetHook]
hooks :: Maybe [ChangeSetHook]
$sel:hooks:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe [ChangeSetHook]
hooks} -> Maybe [ChangeSetHook]
hooks) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe [ChangeSetHook]
a -> DescribeChangeSetHooksResponse
s {$sel:hooks:DescribeChangeSetHooksResponse' :: Maybe [ChangeSetHook]
hooks = Maybe [ChangeSetHook]
a} :: DescribeChangeSetHooksResponse) 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

-- | Pagination token, @null@ or empty if no more results.
describeChangeSetHooksResponse_nextToken :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe Prelude.Text)
describeChangeSetHooksResponse_nextToken :: Lens' DescribeChangeSetHooksResponse (Maybe Text)
describeChangeSetHooksResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe Text
a -> DescribeChangeSetHooksResponse
s {$sel:nextToken:DescribeChangeSetHooksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeChangeSetHooksResponse)

-- | The stack identifier (stack ID).
describeChangeSetHooksResponse_stackId :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe Prelude.Text)
describeChangeSetHooksResponse_stackId :: Lens' DescribeChangeSetHooksResponse (Maybe Text)
describeChangeSetHooksResponse_stackId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe Text
stackId :: Maybe Text
$sel:stackId:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe Text
a -> DescribeChangeSetHooksResponse
s {$sel:stackId:DescribeChangeSetHooksResponse' :: Maybe Text
stackId = Maybe Text
a} :: DescribeChangeSetHooksResponse)

-- | The stack name.
describeChangeSetHooksResponse_stackName :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe Prelude.Text)
describeChangeSetHooksResponse_stackName :: Lens' DescribeChangeSetHooksResponse (Maybe Text)
describeChangeSetHooksResponse_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe Text
stackName :: Maybe Text
$sel:stackName:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe Text
a -> DescribeChangeSetHooksResponse
s {$sel:stackName:DescribeChangeSetHooksResponse' :: Maybe Text
stackName = Maybe Text
a} :: DescribeChangeSetHooksResponse)

-- | Provides the status of the change set hook.
describeChangeSetHooksResponse_status :: Lens.Lens' DescribeChangeSetHooksResponse (Prelude.Maybe ChangeSetHooksStatus)
describeChangeSetHooksResponse_status :: Lens' DescribeChangeSetHooksResponse (Maybe ChangeSetHooksStatus)
describeChangeSetHooksResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetHooksResponse' {Maybe ChangeSetHooksStatus
status :: Maybe ChangeSetHooksStatus
$sel:status:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe ChangeSetHooksStatus
status} -> Maybe ChangeSetHooksStatus
status) (\s :: DescribeChangeSetHooksResponse
s@DescribeChangeSetHooksResponse' {} Maybe ChangeSetHooksStatus
a -> DescribeChangeSetHooksResponse
s {$sel:status:DescribeChangeSetHooksResponse' :: Maybe ChangeSetHooksStatus
status = Maybe ChangeSetHooksStatus
a} :: DescribeChangeSetHooksResponse)

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

instance
  Prelude.NFData
    DescribeChangeSetHooksResponse
  where
  rnf :: DescribeChangeSetHooksResponse -> ()
rnf DescribeChangeSetHooksResponse' {Int
Maybe [ChangeSetHook]
Maybe Text
Maybe ChangeSetHooksStatus
httpStatus :: Int
status :: Maybe ChangeSetHooksStatus
stackName :: Maybe Text
stackId :: Maybe Text
nextToken :: Maybe Text
hooks :: Maybe [ChangeSetHook]
changeSetName :: Maybe Text
changeSetId :: Maybe Text
$sel:httpStatus:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Int
$sel:status:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe ChangeSetHooksStatus
$sel:stackName:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
$sel:stackId:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
$sel:nextToken:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
$sel:hooks:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe [ChangeSetHook]
$sel:changeSetName:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
$sel:changeSetId:DescribeChangeSetHooksResponse' :: DescribeChangeSetHooksResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ChangeSetHook]
hooks
      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 Maybe Text
stackId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChangeSetHooksStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus