{-# 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.IoT.UpdateMitigationAction
-- 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)
--
-- Updates the definition for the specified mitigation action.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateMitigationAction>
-- action.
module Amazonka.IoT.UpdateMitigationAction
  ( -- * Creating a Request
    UpdateMitigationAction (..),
    newUpdateMitigationAction,

    -- * Request Lenses
    updateMitigationAction_actionParams,
    updateMitigationAction_roleArn,
    updateMitigationAction_actionName,

    -- * Destructuring the Response
    UpdateMitigationActionResponse (..),
    newUpdateMitigationActionResponse,

    -- * Response Lenses
    updateMitigationActionResponse_actionId,
    updateMitigationActionResponse_actionArn,
    updateMitigationActionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
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:/ 'newUpdateMitigationAction' smart constructor.
data UpdateMitigationAction = UpdateMitigationAction'
  { -- | Defines the type of action and the parameters for that action.
    UpdateMitigationAction -> Maybe MitigationActionParams
actionParams :: Prelude.Maybe MitigationActionParams,
    -- | The ARN of the IAM role that is used to apply the mitigation action.
    UpdateMitigationAction -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The friendly name for the mitigation action. You cannot change the name
    -- by using @UpdateMitigationAction@. Instead, you must delete and recreate
    -- the mitigation action with the new name.
    UpdateMitigationAction -> Text
actionName :: Prelude.Text
  }
  deriving (UpdateMitigationAction -> UpdateMitigationAction -> Bool
(UpdateMitigationAction -> UpdateMitigationAction -> Bool)
-> (UpdateMitigationAction -> UpdateMitigationAction -> Bool)
-> Eq UpdateMitigationAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMitigationAction -> UpdateMitigationAction -> Bool
$c/= :: UpdateMitigationAction -> UpdateMitigationAction -> Bool
== :: UpdateMitigationAction -> UpdateMitigationAction -> Bool
$c== :: UpdateMitigationAction -> UpdateMitigationAction -> Bool
Prelude.Eq, ReadPrec [UpdateMitigationAction]
ReadPrec UpdateMitigationAction
Int -> ReadS UpdateMitigationAction
ReadS [UpdateMitigationAction]
(Int -> ReadS UpdateMitigationAction)
-> ReadS [UpdateMitigationAction]
-> ReadPrec UpdateMitigationAction
-> ReadPrec [UpdateMitigationAction]
-> Read UpdateMitigationAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMitigationAction]
$creadListPrec :: ReadPrec [UpdateMitigationAction]
readPrec :: ReadPrec UpdateMitigationAction
$creadPrec :: ReadPrec UpdateMitigationAction
readList :: ReadS [UpdateMitigationAction]
$creadList :: ReadS [UpdateMitigationAction]
readsPrec :: Int -> ReadS UpdateMitigationAction
$creadsPrec :: Int -> ReadS UpdateMitigationAction
Prelude.Read, Int -> UpdateMitigationAction -> ShowS
[UpdateMitigationAction] -> ShowS
UpdateMitigationAction -> String
(Int -> UpdateMitigationAction -> ShowS)
-> (UpdateMitigationAction -> String)
-> ([UpdateMitigationAction] -> ShowS)
-> Show UpdateMitigationAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMitigationAction] -> ShowS
$cshowList :: [UpdateMitigationAction] -> ShowS
show :: UpdateMitigationAction -> String
$cshow :: UpdateMitigationAction -> String
showsPrec :: Int -> UpdateMitigationAction -> ShowS
$cshowsPrec :: Int -> UpdateMitigationAction -> ShowS
Prelude.Show, (forall x. UpdateMitigationAction -> Rep UpdateMitigationAction x)
-> (forall x.
    Rep UpdateMitigationAction x -> UpdateMitigationAction)
-> Generic UpdateMitigationAction
forall x. Rep UpdateMitigationAction x -> UpdateMitigationAction
forall x. UpdateMitigationAction -> Rep UpdateMitigationAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateMitigationAction x -> UpdateMitigationAction
$cfrom :: forall x. UpdateMitigationAction -> Rep UpdateMitigationAction x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMitigationAction' 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:
--
-- 'actionParams', 'updateMitigationAction_actionParams' - Defines the type of action and the parameters for that action.
--
-- 'roleArn', 'updateMitigationAction_roleArn' - The ARN of the IAM role that is used to apply the mitigation action.
--
-- 'actionName', 'updateMitigationAction_actionName' - The friendly name for the mitigation action. You cannot change the name
-- by using @UpdateMitigationAction@. Instead, you must delete and recreate
-- the mitigation action with the new name.
newUpdateMitigationAction ::
  -- | 'actionName'
  Prelude.Text ->
  UpdateMitigationAction
newUpdateMitigationAction :: Text -> UpdateMitigationAction
newUpdateMitigationAction Text
pActionName_ =
  UpdateMitigationAction' :: Maybe MitigationActionParams
-> Maybe Text -> Text -> UpdateMitigationAction
UpdateMitigationAction'
    { $sel:actionParams:UpdateMitigationAction' :: Maybe MitigationActionParams
actionParams =
        Maybe MitigationActionParams
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateMitigationAction' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionName:UpdateMitigationAction' :: Text
actionName = Text
pActionName_
    }

-- | Defines the type of action and the parameters for that action.
updateMitigationAction_actionParams :: Lens.Lens' UpdateMitigationAction (Prelude.Maybe MitigationActionParams)
updateMitigationAction_actionParams :: (Maybe MitigationActionParams -> f (Maybe MitigationActionParams))
-> UpdateMitigationAction -> f UpdateMitigationAction
updateMitigationAction_actionParams = (UpdateMitigationAction -> Maybe MitigationActionParams)
-> (UpdateMitigationAction
    -> Maybe MitigationActionParams -> UpdateMitigationAction)
-> Lens
     UpdateMitigationAction
     UpdateMitigationAction
     (Maybe MitigationActionParams)
     (Maybe MitigationActionParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMitigationAction' {Maybe MitigationActionParams
actionParams :: Maybe MitigationActionParams
$sel:actionParams:UpdateMitigationAction' :: UpdateMitigationAction -> Maybe MitigationActionParams
actionParams} -> Maybe MitigationActionParams
actionParams) (\s :: UpdateMitigationAction
s@UpdateMitigationAction' {} Maybe MitigationActionParams
a -> UpdateMitigationAction
s {$sel:actionParams:UpdateMitigationAction' :: Maybe MitigationActionParams
actionParams = Maybe MitigationActionParams
a} :: UpdateMitigationAction)

-- | The ARN of the IAM role that is used to apply the mitigation action.
updateMitigationAction_roleArn :: Lens.Lens' UpdateMitigationAction (Prelude.Maybe Prelude.Text)
updateMitigationAction_roleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMitigationAction -> f UpdateMitigationAction
updateMitigationAction_roleArn = (UpdateMitigationAction -> Maybe Text)
-> (UpdateMitigationAction -> Maybe Text -> UpdateMitigationAction)
-> Lens
     UpdateMitigationAction
     UpdateMitigationAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMitigationAction' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateMitigationAction' :: UpdateMitigationAction -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateMitigationAction
s@UpdateMitigationAction' {} Maybe Text
a -> UpdateMitigationAction
s {$sel:roleArn:UpdateMitigationAction' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateMitigationAction)

-- | The friendly name for the mitigation action. You cannot change the name
-- by using @UpdateMitigationAction@. Instead, you must delete and recreate
-- the mitigation action with the new name.
updateMitigationAction_actionName :: Lens.Lens' UpdateMitigationAction Prelude.Text
updateMitigationAction_actionName :: (Text -> f Text)
-> UpdateMitigationAction -> f UpdateMitigationAction
updateMitigationAction_actionName = (UpdateMitigationAction -> Text)
-> (UpdateMitigationAction -> Text -> UpdateMitigationAction)
-> Lens UpdateMitigationAction UpdateMitigationAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMitigationAction' {Text
actionName :: Text
$sel:actionName:UpdateMitigationAction' :: UpdateMitigationAction -> Text
actionName} -> Text
actionName) (\s :: UpdateMitigationAction
s@UpdateMitigationAction' {} Text
a -> UpdateMitigationAction
s {$sel:actionName:UpdateMitigationAction' :: Text
actionName = Text
a} :: UpdateMitigationAction)

instance Core.AWSRequest UpdateMitigationAction where
  type
    AWSResponse UpdateMitigationAction =
      UpdateMitigationActionResponse
  request :: UpdateMitigationAction -> Request UpdateMitigationAction
request = Service -> UpdateMitigationAction -> Request UpdateMitigationAction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateMitigationAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMitigationAction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateMitigationAction))
-> Logger
-> Service
-> Proxy UpdateMitigationAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMitigationAction)))
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 -> Maybe Text -> Int -> UpdateMitigationActionResponse
UpdateMitigationActionResponse'
            (Maybe Text -> Maybe Text -> Int -> UpdateMitigationActionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateMitigationActionResponse)
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
"actionId")
            Either String (Maybe Text -> Int -> UpdateMitigationActionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateMitigationActionResponse)
forall (f :: * -> *) a b. Applicative f => 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
"actionArn")
            Either String (Int -> UpdateMitigationActionResponse)
-> Either String Int
-> Either String UpdateMitigationActionResponse
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 UpdateMitigationAction

instance Prelude.NFData UpdateMitigationAction

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

instance Core.ToJSON UpdateMitigationAction where
  toJSON :: UpdateMitigationAction -> Value
toJSON UpdateMitigationAction' {Maybe Text
Maybe MitigationActionParams
Text
actionName :: Text
roleArn :: Maybe Text
actionParams :: Maybe MitigationActionParams
$sel:actionName:UpdateMitigationAction' :: UpdateMitigationAction -> Text
$sel:roleArn:UpdateMitigationAction' :: UpdateMitigationAction -> Maybe Text
$sel:actionParams:UpdateMitigationAction' :: UpdateMitigationAction -> Maybe MitigationActionParams
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"actionParams" Text -> MitigationActionParams -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MitigationActionParams -> Pair)
-> Maybe MitigationActionParams -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MitigationActionParams
actionParams,
            (Text
"roleArn" 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
roleArn
          ]
      )

instance Core.ToPath UpdateMitigationAction where
  toPath :: UpdateMitigationAction -> ByteString
toPath UpdateMitigationAction' {Maybe Text
Maybe MitigationActionParams
Text
actionName :: Text
roleArn :: Maybe Text
actionParams :: Maybe MitigationActionParams
$sel:actionName:UpdateMitigationAction' :: UpdateMitigationAction -> Text
$sel:roleArn:UpdateMitigationAction' :: UpdateMitigationAction -> Maybe Text
$sel:actionParams:UpdateMitigationAction' :: UpdateMitigationAction -> Maybe MitigationActionParams
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/mitigationactions/actions/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
actionName]

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

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

-- |
-- Create a value of 'UpdateMitigationActionResponse' 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:
--
-- 'actionId', 'updateMitigationActionResponse_actionId' - A unique identifier for the mitigation action.
--
-- 'actionArn', 'updateMitigationActionResponse_actionArn' - The ARN for the new mitigation action.
--
-- 'httpStatus', 'updateMitigationActionResponse_httpStatus' - The response's http status code.
newUpdateMitigationActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateMitigationActionResponse
newUpdateMitigationActionResponse :: Int -> UpdateMitigationActionResponse
newUpdateMitigationActionResponse Int
pHttpStatus_ =
  UpdateMitigationActionResponse' :: Maybe Text -> Maybe Text -> Int -> UpdateMitigationActionResponse
UpdateMitigationActionResponse'
    { $sel:actionId:UpdateMitigationActionResponse' :: Maybe Text
actionId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionArn:UpdateMitigationActionResponse' :: Maybe Text
actionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateMitigationActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A unique identifier for the mitigation action.
updateMitigationActionResponse_actionId :: Lens.Lens' UpdateMitigationActionResponse (Prelude.Maybe Prelude.Text)
updateMitigationActionResponse_actionId :: (Maybe Text -> f (Maybe Text))
-> UpdateMitigationActionResponse
-> f UpdateMitigationActionResponse
updateMitigationActionResponse_actionId = (UpdateMitigationActionResponse -> Maybe Text)
-> (UpdateMitigationActionResponse
    -> Maybe Text -> UpdateMitigationActionResponse)
-> Lens
     UpdateMitigationActionResponse
     UpdateMitigationActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMitigationActionResponse' {Maybe Text
actionId :: Maybe Text
$sel:actionId:UpdateMitigationActionResponse' :: UpdateMitigationActionResponse -> Maybe Text
actionId} -> Maybe Text
actionId) (\s :: UpdateMitigationActionResponse
s@UpdateMitigationActionResponse' {} Maybe Text
a -> UpdateMitigationActionResponse
s {$sel:actionId:UpdateMitigationActionResponse' :: Maybe Text
actionId = Maybe Text
a} :: UpdateMitigationActionResponse)

-- | The ARN for the new mitigation action.
updateMitigationActionResponse_actionArn :: Lens.Lens' UpdateMitigationActionResponse (Prelude.Maybe Prelude.Text)
updateMitigationActionResponse_actionArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMitigationActionResponse
-> f UpdateMitigationActionResponse
updateMitigationActionResponse_actionArn = (UpdateMitigationActionResponse -> Maybe Text)
-> (UpdateMitigationActionResponse
    -> Maybe Text -> UpdateMitigationActionResponse)
-> Lens
     UpdateMitigationActionResponse
     UpdateMitigationActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMitigationActionResponse' {Maybe Text
actionArn :: Maybe Text
$sel:actionArn:UpdateMitigationActionResponse' :: UpdateMitigationActionResponse -> Maybe Text
actionArn} -> Maybe Text
actionArn) (\s :: UpdateMitigationActionResponse
s@UpdateMitigationActionResponse' {} Maybe Text
a -> UpdateMitigationActionResponse
s {$sel:actionArn:UpdateMitigationActionResponse' :: Maybe Text
actionArn = Maybe Text
a} :: UpdateMitigationActionResponse)

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

instance
  Prelude.NFData
    UpdateMitigationActionResponse