{-# 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.CodeDeploy.PutLifecycleEventHookExecutionStatus
-- 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)
--
-- Sets the result of a Lambda validation function. The function validates
-- lifecycle hooks during a deployment that uses the AWS Lambda or Amazon
-- ECS compute platform. For AWS Lambda deployments, the available
-- lifecycle hooks are @BeforeAllowTraffic@ and @AfterAllowTraffic@. For
-- Amazon ECS deployments, the available lifecycle hooks are
-- @BeforeInstall@, @AfterInstall@, @AfterAllowTestTraffic@,
-- @BeforeAllowTraffic@, and @AfterAllowTraffic@. Lambda validation
-- functions return @Succeeded@ or @Failed@. For more information, see
-- <https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda AppSpec \'hooks\' Section for an AWS Lambda Deployment>
-- and
-- <https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs AppSpec \'hooks\' Section for an Amazon ECS Deployment>.
module Amazonka.CodeDeploy.PutLifecycleEventHookExecutionStatus
  ( -- * Creating a Request
    PutLifecycleEventHookExecutionStatus (..),
    newPutLifecycleEventHookExecutionStatus,

    -- * Request Lenses
    putLifecycleEventHookExecutionStatus_status,
    putLifecycleEventHookExecutionStatus_deploymentId,
    putLifecycleEventHookExecutionStatus_lifecycleEventHookExecutionId,

    -- * Destructuring the Response
    PutLifecycleEventHookExecutionStatusResponse (..),
    newPutLifecycleEventHookExecutionStatusResponse,

    -- * Response Lenses
    putLifecycleEventHookExecutionStatusResponse_lifecycleEventHookExecutionId,
    putLifecycleEventHookExecutionStatusResponse_httpStatus,
  )
where

import Amazonka.CodeDeploy.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:/ 'newPutLifecycleEventHookExecutionStatus' smart constructor.
data PutLifecycleEventHookExecutionStatus = PutLifecycleEventHookExecutionStatus'
  { -- | The result of a Lambda function that validates a deployment lifecycle
    -- event. @Succeeded@ and @Failed@ are the only valid values for @status@.
    PutLifecycleEventHookExecutionStatus -> Maybe LifecycleEventStatus
status :: Prelude.Maybe LifecycleEventStatus,
    -- | The unique ID of a deployment. Pass this ID to a Lambda function that
    -- validates a deployment lifecycle event.
    PutLifecycleEventHookExecutionStatus -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | The execution ID of a deployment\'s lifecycle hook. A deployment
    -- lifecycle hook is specified in the @hooks@ section of the AppSpec file.
    PutLifecycleEventHookExecutionStatus -> Maybe Text
lifecycleEventHookExecutionId :: Prelude.Maybe Prelude.Text
  }
  deriving (PutLifecycleEventHookExecutionStatus
-> PutLifecycleEventHookExecutionStatus -> Bool
(PutLifecycleEventHookExecutionStatus
 -> PutLifecycleEventHookExecutionStatus -> Bool)
-> (PutLifecycleEventHookExecutionStatus
    -> PutLifecycleEventHookExecutionStatus -> Bool)
-> Eq PutLifecycleEventHookExecutionStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutLifecycleEventHookExecutionStatus
-> PutLifecycleEventHookExecutionStatus -> Bool
$c/= :: PutLifecycleEventHookExecutionStatus
-> PutLifecycleEventHookExecutionStatus -> Bool
== :: PutLifecycleEventHookExecutionStatus
-> PutLifecycleEventHookExecutionStatus -> Bool
$c== :: PutLifecycleEventHookExecutionStatus
-> PutLifecycleEventHookExecutionStatus -> Bool
Prelude.Eq, ReadPrec [PutLifecycleEventHookExecutionStatus]
ReadPrec PutLifecycleEventHookExecutionStatus
Int -> ReadS PutLifecycleEventHookExecutionStatus
ReadS [PutLifecycleEventHookExecutionStatus]
(Int -> ReadS PutLifecycleEventHookExecutionStatus)
-> ReadS [PutLifecycleEventHookExecutionStatus]
-> ReadPrec PutLifecycleEventHookExecutionStatus
-> ReadPrec [PutLifecycleEventHookExecutionStatus]
-> Read PutLifecycleEventHookExecutionStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutLifecycleEventHookExecutionStatus]
$creadListPrec :: ReadPrec [PutLifecycleEventHookExecutionStatus]
readPrec :: ReadPrec PutLifecycleEventHookExecutionStatus
$creadPrec :: ReadPrec PutLifecycleEventHookExecutionStatus
readList :: ReadS [PutLifecycleEventHookExecutionStatus]
$creadList :: ReadS [PutLifecycleEventHookExecutionStatus]
readsPrec :: Int -> ReadS PutLifecycleEventHookExecutionStatus
$creadsPrec :: Int -> ReadS PutLifecycleEventHookExecutionStatus
Prelude.Read, Int -> PutLifecycleEventHookExecutionStatus -> ShowS
[PutLifecycleEventHookExecutionStatus] -> ShowS
PutLifecycleEventHookExecutionStatus -> String
(Int -> PutLifecycleEventHookExecutionStatus -> ShowS)
-> (PutLifecycleEventHookExecutionStatus -> String)
-> ([PutLifecycleEventHookExecutionStatus] -> ShowS)
-> Show PutLifecycleEventHookExecutionStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutLifecycleEventHookExecutionStatus] -> ShowS
$cshowList :: [PutLifecycleEventHookExecutionStatus] -> ShowS
show :: PutLifecycleEventHookExecutionStatus -> String
$cshow :: PutLifecycleEventHookExecutionStatus -> String
showsPrec :: Int -> PutLifecycleEventHookExecutionStatus -> ShowS
$cshowsPrec :: Int -> PutLifecycleEventHookExecutionStatus -> ShowS
Prelude.Show, (forall x.
 PutLifecycleEventHookExecutionStatus
 -> Rep PutLifecycleEventHookExecutionStatus x)
-> (forall x.
    Rep PutLifecycleEventHookExecutionStatus x
    -> PutLifecycleEventHookExecutionStatus)
-> Generic PutLifecycleEventHookExecutionStatus
forall x.
Rep PutLifecycleEventHookExecutionStatus x
-> PutLifecycleEventHookExecutionStatus
forall x.
PutLifecycleEventHookExecutionStatus
-> Rep PutLifecycleEventHookExecutionStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutLifecycleEventHookExecutionStatus x
-> PutLifecycleEventHookExecutionStatus
$cfrom :: forall x.
PutLifecycleEventHookExecutionStatus
-> Rep PutLifecycleEventHookExecutionStatus x
Prelude.Generic)

-- |
-- Create a value of 'PutLifecycleEventHookExecutionStatus' 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:
--
-- 'status', 'putLifecycleEventHookExecutionStatus_status' - The result of a Lambda function that validates a deployment lifecycle
-- event. @Succeeded@ and @Failed@ are the only valid values for @status@.
--
-- 'deploymentId', 'putLifecycleEventHookExecutionStatus_deploymentId' - The unique ID of a deployment. Pass this ID to a Lambda function that
-- validates a deployment lifecycle event.
--
-- 'lifecycleEventHookExecutionId', 'putLifecycleEventHookExecutionStatus_lifecycleEventHookExecutionId' - The execution ID of a deployment\'s lifecycle hook. A deployment
-- lifecycle hook is specified in the @hooks@ section of the AppSpec file.
newPutLifecycleEventHookExecutionStatus ::
  PutLifecycleEventHookExecutionStatus
newPutLifecycleEventHookExecutionStatus :: PutLifecycleEventHookExecutionStatus
newPutLifecycleEventHookExecutionStatus =
  PutLifecycleEventHookExecutionStatus' :: Maybe LifecycleEventStatus
-> Maybe Text -> Maybe Text -> PutLifecycleEventHookExecutionStatus
PutLifecycleEventHookExecutionStatus'
    { $sel:status:PutLifecycleEventHookExecutionStatus' :: Maybe LifecycleEventStatus
status =
        Maybe LifecycleEventStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:PutLifecycleEventHookExecutionStatus' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatus' :: Maybe Text
lifecycleEventHookExecutionId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The result of a Lambda function that validates a deployment lifecycle
-- event. @Succeeded@ and @Failed@ are the only valid values for @status@.
putLifecycleEventHookExecutionStatus_status :: Lens.Lens' PutLifecycleEventHookExecutionStatus (Prelude.Maybe LifecycleEventStatus)
putLifecycleEventHookExecutionStatus_status :: (Maybe LifecycleEventStatus -> f (Maybe LifecycleEventStatus))
-> PutLifecycleEventHookExecutionStatus
-> f PutLifecycleEventHookExecutionStatus
putLifecycleEventHookExecutionStatus_status = (PutLifecycleEventHookExecutionStatus
 -> Maybe LifecycleEventStatus)
-> (PutLifecycleEventHookExecutionStatus
    -> Maybe LifecycleEventStatus
    -> PutLifecycleEventHookExecutionStatus)
-> Lens
     PutLifecycleEventHookExecutionStatus
     PutLifecycleEventHookExecutionStatus
     (Maybe LifecycleEventStatus)
     (Maybe LifecycleEventStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecycleEventHookExecutionStatus' {Maybe LifecycleEventStatus
status :: Maybe LifecycleEventStatus
$sel:status:PutLifecycleEventHookExecutionStatus' :: PutLifecycleEventHookExecutionStatus -> Maybe LifecycleEventStatus
status} -> Maybe LifecycleEventStatus
status) (\s :: PutLifecycleEventHookExecutionStatus
s@PutLifecycleEventHookExecutionStatus' {} Maybe LifecycleEventStatus
a -> PutLifecycleEventHookExecutionStatus
s {$sel:status:PutLifecycleEventHookExecutionStatus' :: Maybe LifecycleEventStatus
status = Maybe LifecycleEventStatus
a} :: PutLifecycleEventHookExecutionStatus)

-- | The unique ID of a deployment. Pass this ID to a Lambda function that
-- validates a deployment lifecycle event.
putLifecycleEventHookExecutionStatus_deploymentId :: Lens.Lens' PutLifecycleEventHookExecutionStatus (Prelude.Maybe Prelude.Text)
putLifecycleEventHookExecutionStatus_deploymentId :: (Maybe Text -> f (Maybe Text))
-> PutLifecycleEventHookExecutionStatus
-> f PutLifecycleEventHookExecutionStatus
putLifecycleEventHookExecutionStatus_deploymentId = (PutLifecycleEventHookExecutionStatus -> Maybe Text)
-> (PutLifecycleEventHookExecutionStatus
    -> Maybe Text -> PutLifecycleEventHookExecutionStatus)
-> Lens
     PutLifecycleEventHookExecutionStatus
     PutLifecycleEventHookExecutionStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecycleEventHookExecutionStatus' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:PutLifecycleEventHookExecutionStatus' :: PutLifecycleEventHookExecutionStatus -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: PutLifecycleEventHookExecutionStatus
s@PutLifecycleEventHookExecutionStatus' {} Maybe Text
a -> PutLifecycleEventHookExecutionStatus
s {$sel:deploymentId:PutLifecycleEventHookExecutionStatus' :: Maybe Text
deploymentId = Maybe Text
a} :: PutLifecycleEventHookExecutionStatus)

-- | The execution ID of a deployment\'s lifecycle hook. A deployment
-- lifecycle hook is specified in the @hooks@ section of the AppSpec file.
putLifecycleEventHookExecutionStatus_lifecycleEventHookExecutionId :: Lens.Lens' PutLifecycleEventHookExecutionStatus (Prelude.Maybe Prelude.Text)
putLifecycleEventHookExecutionStatus_lifecycleEventHookExecutionId :: (Maybe Text -> f (Maybe Text))
-> PutLifecycleEventHookExecutionStatus
-> f PutLifecycleEventHookExecutionStatus
putLifecycleEventHookExecutionStatus_lifecycleEventHookExecutionId = (PutLifecycleEventHookExecutionStatus -> Maybe Text)
-> (PutLifecycleEventHookExecutionStatus
    -> Maybe Text -> PutLifecycleEventHookExecutionStatus)
-> Lens
     PutLifecycleEventHookExecutionStatus
     PutLifecycleEventHookExecutionStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecycleEventHookExecutionStatus' {Maybe Text
lifecycleEventHookExecutionId :: Maybe Text
$sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatus' :: PutLifecycleEventHookExecutionStatus -> Maybe Text
lifecycleEventHookExecutionId} -> Maybe Text
lifecycleEventHookExecutionId) (\s :: PutLifecycleEventHookExecutionStatus
s@PutLifecycleEventHookExecutionStatus' {} Maybe Text
a -> PutLifecycleEventHookExecutionStatus
s {$sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatus' :: Maybe Text
lifecycleEventHookExecutionId = Maybe Text
a} :: PutLifecycleEventHookExecutionStatus)

instance
  Core.AWSRequest
    PutLifecycleEventHookExecutionStatus
  where
  type
    AWSResponse PutLifecycleEventHookExecutionStatus =
      PutLifecycleEventHookExecutionStatusResponse
  request :: PutLifecycleEventHookExecutionStatus
-> Request PutLifecycleEventHookExecutionStatus
request = Service
-> PutLifecycleEventHookExecutionStatus
-> Request PutLifecycleEventHookExecutionStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutLifecycleEventHookExecutionStatus
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse PutLifecycleEventHookExecutionStatus)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse PutLifecycleEventHookExecutionStatus))
-> Logger
-> Service
-> Proxy PutLifecycleEventHookExecutionStatus
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse PutLifecycleEventHookExecutionStatus)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> PutLifecycleEventHookExecutionStatusResponse
PutLifecycleEventHookExecutionStatusResponse'
            (Maybe Text -> Int -> PutLifecycleEventHookExecutionStatusResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> PutLifecycleEventHookExecutionStatusResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lifecycleEventHookExecutionId")
              Either String (Int -> PutLifecycleEventHookExecutionStatusResponse)
-> Either String Int
-> Either String PutLifecycleEventHookExecutionStatusResponse
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
    PutLifecycleEventHookExecutionStatus

instance
  Prelude.NFData
    PutLifecycleEventHookExecutionStatus

instance
  Core.ToHeaders
    PutLifecycleEventHookExecutionStatus
  where
  toHeaders :: PutLifecycleEventHookExecutionStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> PutLifecycleEventHookExecutionStatus -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    PutLifecycleEventHookExecutionStatus
  where
  toJSON :: PutLifecycleEventHookExecutionStatus -> Value
toJSON PutLifecycleEventHookExecutionStatus' {Maybe Text
Maybe LifecycleEventStatus
lifecycleEventHookExecutionId :: Maybe Text
deploymentId :: Maybe Text
status :: Maybe LifecycleEventStatus
$sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatus' :: PutLifecycleEventHookExecutionStatus -> Maybe Text
$sel:deploymentId:PutLifecycleEventHookExecutionStatus' :: PutLifecycleEventHookExecutionStatus -> Maybe Text
$sel:status:PutLifecycleEventHookExecutionStatus' :: PutLifecycleEventHookExecutionStatus -> Maybe LifecycleEventStatus
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"status" Text -> LifecycleEventStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LifecycleEventStatus -> Pair)
-> Maybe LifecycleEventStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LifecycleEventStatus
status,
            (Text
"deploymentId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deploymentId,
            (Text
"lifecycleEventHookExecutionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lifecycleEventHookExecutionId
          ]
      )

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

instance
  Core.ToQuery
    PutLifecycleEventHookExecutionStatus
  where
  toQuery :: PutLifecycleEventHookExecutionStatus -> QueryString
toQuery = QueryString -> PutLifecycleEventHookExecutionStatus -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newPutLifecycleEventHookExecutionStatusResponse' smart constructor.
data PutLifecycleEventHookExecutionStatusResponse = PutLifecycleEventHookExecutionStatusResponse'
  { -- | The execution ID of the lifecycle event hook. A hook is specified in the
    -- @hooks@ section of the deployment\'s AppSpec file.
    PutLifecycleEventHookExecutionStatusResponse -> Maybe Text
lifecycleEventHookExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    PutLifecycleEventHookExecutionStatusResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutLifecycleEventHookExecutionStatusResponse
-> PutLifecycleEventHookExecutionStatusResponse -> Bool
(PutLifecycleEventHookExecutionStatusResponse
 -> PutLifecycleEventHookExecutionStatusResponse -> Bool)
-> (PutLifecycleEventHookExecutionStatusResponse
    -> PutLifecycleEventHookExecutionStatusResponse -> Bool)
-> Eq PutLifecycleEventHookExecutionStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutLifecycleEventHookExecutionStatusResponse
-> PutLifecycleEventHookExecutionStatusResponse -> Bool
$c/= :: PutLifecycleEventHookExecutionStatusResponse
-> PutLifecycleEventHookExecutionStatusResponse -> Bool
== :: PutLifecycleEventHookExecutionStatusResponse
-> PutLifecycleEventHookExecutionStatusResponse -> Bool
$c== :: PutLifecycleEventHookExecutionStatusResponse
-> PutLifecycleEventHookExecutionStatusResponse -> Bool
Prelude.Eq, ReadPrec [PutLifecycleEventHookExecutionStatusResponse]
ReadPrec PutLifecycleEventHookExecutionStatusResponse
Int -> ReadS PutLifecycleEventHookExecutionStatusResponse
ReadS [PutLifecycleEventHookExecutionStatusResponse]
(Int -> ReadS PutLifecycleEventHookExecutionStatusResponse)
-> ReadS [PutLifecycleEventHookExecutionStatusResponse]
-> ReadPrec PutLifecycleEventHookExecutionStatusResponse
-> ReadPrec [PutLifecycleEventHookExecutionStatusResponse]
-> Read PutLifecycleEventHookExecutionStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutLifecycleEventHookExecutionStatusResponse]
$creadListPrec :: ReadPrec [PutLifecycleEventHookExecutionStatusResponse]
readPrec :: ReadPrec PutLifecycleEventHookExecutionStatusResponse
$creadPrec :: ReadPrec PutLifecycleEventHookExecutionStatusResponse
readList :: ReadS [PutLifecycleEventHookExecutionStatusResponse]
$creadList :: ReadS [PutLifecycleEventHookExecutionStatusResponse]
readsPrec :: Int -> ReadS PutLifecycleEventHookExecutionStatusResponse
$creadsPrec :: Int -> ReadS PutLifecycleEventHookExecutionStatusResponse
Prelude.Read, Int -> PutLifecycleEventHookExecutionStatusResponse -> ShowS
[PutLifecycleEventHookExecutionStatusResponse] -> ShowS
PutLifecycleEventHookExecutionStatusResponse -> String
(Int -> PutLifecycleEventHookExecutionStatusResponse -> ShowS)
-> (PutLifecycleEventHookExecutionStatusResponse -> String)
-> ([PutLifecycleEventHookExecutionStatusResponse] -> ShowS)
-> Show PutLifecycleEventHookExecutionStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutLifecycleEventHookExecutionStatusResponse] -> ShowS
$cshowList :: [PutLifecycleEventHookExecutionStatusResponse] -> ShowS
show :: PutLifecycleEventHookExecutionStatusResponse -> String
$cshow :: PutLifecycleEventHookExecutionStatusResponse -> String
showsPrec :: Int -> PutLifecycleEventHookExecutionStatusResponse -> ShowS
$cshowsPrec :: Int -> PutLifecycleEventHookExecutionStatusResponse -> ShowS
Prelude.Show, (forall x.
 PutLifecycleEventHookExecutionStatusResponse
 -> Rep PutLifecycleEventHookExecutionStatusResponse x)
-> (forall x.
    Rep PutLifecycleEventHookExecutionStatusResponse x
    -> PutLifecycleEventHookExecutionStatusResponse)
-> Generic PutLifecycleEventHookExecutionStatusResponse
forall x.
Rep PutLifecycleEventHookExecutionStatusResponse x
-> PutLifecycleEventHookExecutionStatusResponse
forall x.
PutLifecycleEventHookExecutionStatusResponse
-> Rep PutLifecycleEventHookExecutionStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutLifecycleEventHookExecutionStatusResponse x
-> PutLifecycleEventHookExecutionStatusResponse
$cfrom :: forall x.
PutLifecycleEventHookExecutionStatusResponse
-> Rep PutLifecycleEventHookExecutionStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutLifecycleEventHookExecutionStatusResponse' 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:
--
-- 'lifecycleEventHookExecutionId', 'putLifecycleEventHookExecutionStatusResponse_lifecycleEventHookExecutionId' - The execution ID of the lifecycle event hook. A hook is specified in the
-- @hooks@ section of the deployment\'s AppSpec file.
--
-- 'httpStatus', 'putLifecycleEventHookExecutionStatusResponse_httpStatus' - The response's http status code.
newPutLifecycleEventHookExecutionStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutLifecycleEventHookExecutionStatusResponse
newPutLifecycleEventHookExecutionStatusResponse :: Int -> PutLifecycleEventHookExecutionStatusResponse
newPutLifecycleEventHookExecutionStatusResponse
  Int
pHttpStatus_ =
    PutLifecycleEventHookExecutionStatusResponse' :: Maybe Text -> Int -> PutLifecycleEventHookExecutionStatusResponse
PutLifecycleEventHookExecutionStatusResponse'
      { $sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatusResponse' :: Maybe Text
lifecycleEventHookExecutionId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:PutLifecycleEventHookExecutionStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The execution ID of the lifecycle event hook. A hook is specified in the
-- @hooks@ section of the deployment\'s AppSpec file.
putLifecycleEventHookExecutionStatusResponse_lifecycleEventHookExecutionId :: Lens.Lens' PutLifecycleEventHookExecutionStatusResponse (Prelude.Maybe Prelude.Text)
putLifecycleEventHookExecutionStatusResponse_lifecycleEventHookExecutionId :: (Maybe Text -> f (Maybe Text))
-> PutLifecycleEventHookExecutionStatusResponse
-> f PutLifecycleEventHookExecutionStatusResponse
putLifecycleEventHookExecutionStatusResponse_lifecycleEventHookExecutionId = (PutLifecycleEventHookExecutionStatusResponse -> Maybe Text)
-> (PutLifecycleEventHookExecutionStatusResponse
    -> Maybe Text -> PutLifecycleEventHookExecutionStatusResponse)
-> Lens
     PutLifecycleEventHookExecutionStatusResponse
     PutLifecycleEventHookExecutionStatusResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecycleEventHookExecutionStatusResponse' {Maybe Text
lifecycleEventHookExecutionId :: Maybe Text
$sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatusResponse' :: PutLifecycleEventHookExecutionStatusResponse -> Maybe Text
lifecycleEventHookExecutionId} -> Maybe Text
lifecycleEventHookExecutionId) (\s :: PutLifecycleEventHookExecutionStatusResponse
s@PutLifecycleEventHookExecutionStatusResponse' {} Maybe Text
a -> PutLifecycleEventHookExecutionStatusResponse
s {$sel:lifecycleEventHookExecutionId:PutLifecycleEventHookExecutionStatusResponse' :: Maybe Text
lifecycleEventHookExecutionId = Maybe Text
a} :: PutLifecycleEventHookExecutionStatusResponse)

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

instance
  Prelude.NFData
    PutLifecycleEventHookExecutionStatusResponse