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

    -- * Request Lenses
    describeMitigationAction_actionName,

    -- * Destructuring the Response
    DescribeMitigationActionResponse (..),
    newDescribeMitigationActionResponse,

    -- * Response Lenses
    describeMitigationActionResponse_lastModifiedDate,
    describeMitigationActionResponse_actionParams,
    describeMitigationActionResponse_actionId,
    describeMitigationActionResponse_actionName,
    describeMitigationActionResponse_creationDate,
    describeMitigationActionResponse_actionArn,
    describeMitigationActionResponse_actionType,
    describeMitigationActionResponse_roleArn,
    describeMitigationActionResponse_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:/ 'newDescribeMitigationAction' smart constructor.
data DescribeMitigationAction = DescribeMitigationAction'
  { -- | The friendly name that uniquely identifies the mitigation action.
    DescribeMitigationAction -> Text
actionName :: Prelude.Text
  }
  deriving (DescribeMitigationAction -> DescribeMitigationAction -> Bool
(DescribeMitigationAction -> DescribeMitigationAction -> Bool)
-> (DescribeMitigationAction -> DescribeMitigationAction -> Bool)
-> Eq DescribeMitigationAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMitigationAction -> DescribeMitigationAction -> Bool
$c/= :: DescribeMitigationAction -> DescribeMitigationAction -> Bool
== :: DescribeMitigationAction -> DescribeMitigationAction -> Bool
$c== :: DescribeMitigationAction -> DescribeMitigationAction -> Bool
Prelude.Eq, ReadPrec [DescribeMitigationAction]
ReadPrec DescribeMitigationAction
Int -> ReadS DescribeMitigationAction
ReadS [DescribeMitigationAction]
(Int -> ReadS DescribeMitigationAction)
-> ReadS [DescribeMitigationAction]
-> ReadPrec DescribeMitigationAction
-> ReadPrec [DescribeMitigationAction]
-> Read DescribeMitigationAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMitigationAction]
$creadListPrec :: ReadPrec [DescribeMitigationAction]
readPrec :: ReadPrec DescribeMitigationAction
$creadPrec :: ReadPrec DescribeMitigationAction
readList :: ReadS [DescribeMitigationAction]
$creadList :: ReadS [DescribeMitigationAction]
readsPrec :: Int -> ReadS DescribeMitigationAction
$creadsPrec :: Int -> ReadS DescribeMitigationAction
Prelude.Read, Int -> DescribeMitigationAction -> ShowS
[DescribeMitigationAction] -> ShowS
DescribeMitigationAction -> String
(Int -> DescribeMitigationAction -> ShowS)
-> (DescribeMitigationAction -> String)
-> ([DescribeMitigationAction] -> ShowS)
-> Show DescribeMitigationAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMitigationAction] -> ShowS
$cshowList :: [DescribeMitigationAction] -> ShowS
show :: DescribeMitigationAction -> String
$cshow :: DescribeMitigationAction -> String
showsPrec :: Int -> DescribeMitigationAction -> ShowS
$cshowsPrec :: Int -> DescribeMitigationAction -> ShowS
Prelude.Show, (forall x.
 DescribeMitigationAction -> Rep DescribeMitigationAction x)
-> (forall x.
    Rep DescribeMitigationAction x -> DescribeMitigationAction)
-> Generic DescribeMitigationAction
forall x.
Rep DescribeMitigationAction x -> DescribeMitigationAction
forall x.
DescribeMitigationAction -> Rep DescribeMitigationAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMitigationAction x -> DescribeMitigationAction
$cfrom :: forall x.
DescribeMitigationAction -> Rep DescribeMitigationAction x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMitigationAction' 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:
--
-- 'actionName', 'describeMitigationAction_actionName' - The friendly name that uniquely identifies the mitigation action.
newDescribeMitigationAction ::
  -- | 'actionName'
  Prelude.Text ->
  DescribeMitigationAction
newDescribeMitigationAction :: Text -> DescribeMitigationAction
newDescribeMitigationAction Text
pActionName_ =
  DescribeMitigationAction' :: Text -> DescribeMitigationAction
DescribeMitigationAction'
    { $sel:actionName:DescribeMitigationAction' :: Text
actionName =
        Text
pActionName_
    }

-- | The friendly name that uniquely identifies the mitigation action.
describeMitigationAction_actionName :: Lens.Lens' DescribeMitigationAction Prelude.Text
describeMitigationAction_actionName :: (Text -> f Text)
-> DescribeMitigationAction -> f DescribeMitigationAction
describeMitigationAction_actionName = (DescribeMitigationAction -> Text)
-> (DescribeMitigationAction -> Text -> DescribeMitigationAction)
-> Lens DescribeMitigationAction DescribeMitigationAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationAction' {Text
actionName :: Text
$sel:actionName:DescribeMitigationAction' :: DescribeMitigationAction -> Text
actionName} -> Text
actionName) (\s :: DescribeMitigationAction
s@DescribeMitigationAction' {} Text
a -> DescribeMitigationAction
s {$sel:actionName:DescribeMitigationAction' :: Text
actionName = Text
a} :: DescribeMitigationAction)

instance Core.AWSRequest DescribeMitigationAction where
  type
    AWSResponse DescribeMitigationAction =
      DescribeMitigationActionResponse
  request :: DescribeMitigationAction -> Request DescribeMitigationAction
request = Service
-> DescribeMitigationAction -> Request DescribeMitigationAction
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeMitigationAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMitigationAction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeMitigationAction))
-> Logger
-> Service
-> Proxy DescribeMitigationAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMitigationAction)))
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 POSIX
-> Maybe MitigationActionParams
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe MitigationActionType
-> Maybe Text
-> Int
-> DescribeMitigationActionResponse
DescribeMitigationActionResponse'
            (Maybe POSIX
 -> Maybe MitigationActionParams
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe MitigationActionType
 -> Maybe Text
 -> Int
 -> DescribeMitigationActionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe MitigationActionParams
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe MitigationActionType
      -> Maybe Text
      -> Int
      -> DescribeMitigationActionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastModifiedDate")
            Either
  String
  (Maybe MitigationActionParams
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe MitigationActionType
   -> Maybe Text
   -> Int
   -> DescribeMitigationActionResponse)
-> Either String (Maybe MitigationActionParams)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe MitigationActionType
      -> Maybe Text
      -> Int
      -> DescribeMitigationActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MitigationActionParams)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"actionParams")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe MitigationActionType
   -> Maybe Text
   -> Int
   -> DescribeMitigationActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe MitigationActionType
      -> Maybe Text
      -> Int
      -> DescribeMitigationActionResponse)
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
"actionId")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe MitigationActionType
   -> Maybe Text
   -> Int
   -> DescribeMitigationActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe MitigationActionType
      -> Maybe Text
      -> Int
      -> DescribeMitigationActionResponse)
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
"actionName")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe MitigationActionType
   -> Maybe Text
   -> Int
   -> DescribeMitigationActionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe MitigationActionType
      -> Maybe Text
      -> Int
      -> DescribeMitigationActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationDate")
            Either
  String
  (Maybe Text
   -> Maybe MitigationActionType
   -> Maybe Text
   -> Int
   -> DescribeMitigationActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MitigationActionType
      -> Maybe Text -> Int -> DescribeMitigationActionResponse)
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
  (Maybe MitigationActionType
   -> Maybe Text -> Int -> DescribeMitigationActionResponse)
-> Either String (Maybe MitigationActionType)
-> Either
     String (Maybe Text -> Int -> DescribeMitigationActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MitigationActionType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"actionType")
            Either
  String (Maybe Text -> Int -> DescribeMitigationActionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeMitigationActionResponse)
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
"roleArn")
            Either String (Int -> DescribeMitigationActionResponse)
-> Either String Int
-> Either String DescribeMitigationActionResponse
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 DescribeMitigationAction

instance Prelude.NFData DescribeMitigationAction

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

instance Core.ToPath DescribeMitigationAction where
  toPath :: DescribeMitigationAction -> ByteString
toPath DescribeMitigationAction' {Text
actionName :: Text
$sel:actionName:DescribeMitigationAction' :: DescribeMitigationAction -> Text
..} =
    [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 DescribeMitigationAction where
  toQuery :: DescribeMitigationAction -> QueryString
toQuery = QueryString -> DescribeMitigationAction -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeMitigationActionResponse' smart constructor.
data DescribeMitigationActionResponse = DescribeMitigationActionResponse'
  { -- | The date and time when the mitigation action was last changed.
    DescribeMitigationActionResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | Parameters that control how the mitigation action is applied, specific
    -- to the type of mitigation action.
    DescribeMitigationActionResponse -> Maybe MitigationActionParams
actionParams :: Prelude.Maybe MitigationActionParams,
    -- | A unique identifier for this action.
    DescribeMitigationActionResponse -> Maybe Text
actionId :: Prelude.Maybe Prelude.Text,
    -- | The friendly name that uniquely identifies the mitigation action.
    DescribeMitigationActionResponse -> Maybe Text
actionName :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the mitigation action was added to your Amazon
    -- Web Services accounts.
    DescribeMitigationActionResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The ARN that identifies this migration action.
    DescribeMitigationActionResponse -> Maybe Text
actionArn :: Prelude.Maybe Prelude.Text,
    -- | The type of mitigation action.
    DescribeMitigationActionResponse -> Maybe MitigationActionType
actionType :: Prelude.Maybe MitigationActionType,
    -- | The ARN of the IAM role used to apply this action.
    DescribeMitigationActionResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeMitigationActionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeMitigationActionResponse
-> DescribeMitigationActionResponse -> Bool
(DescribeMitigationActionResponse
 -> DescribeMitigationActionResponse -> Bool)
-> (DescribeMitigationActionResponse
    -> DescribeMitigationActionResponse -> Bool)
-> Eq DescribeMitigationActionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMitigationActionResponse
-> DescribeMitigationActionResponse -> Bool
$c/= :: DescribeMitigationActionResponse
-> DescribeMitigationActionResponse -> Bool
== :: DescribeMitigationActionResponse
-> DescribeMitigationActionResponse -> Bool
$c== :: DescribeMitigationActionResponse
-> DescribeMitigationActionResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMitigationActionResponse]
ReadPrec DescribeMitigationActionResponse
Int -> ReadS DescribeMitigationActionResponse
ReadS [DescribeMitigationActionResponse]
(Int -> ReadS DescribeMitigationActionResponse)
-> ReadS [DescribeMitigationActionResponse]
-> ReadPrec DescribeMitigationActionResponse
-> ReadPrec [DescribeMitigationActionResponse]
-> Read DescribeMitigationActionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMitigationActionResponse]
$creadListPrec :: ReadPrec [DescribeMitigationActionResponse]
readPrec :: ReadPrec DescribeMitigationActionResponse
$creadPrec :: ReadPrec DescribeMitigationActionResponse
readList :: ReadS [DescribeMitigationActionResponse]
$creadList :: ReadS [DescribeMitigationActionResponse]
readsPrec :: Int -> ReadS DescribeMitigationActionResponse
$creadsPrec :: Int -> ReadS DescribeMitigationActionResponse
Prelude.Read, Int -> DescribeMitigationActionResponse -> ShowS
[DescribeMitigationActionResponse] -> ShowS
DescribeMitigationActionResponse -> String
(Int -> DescribeMitigationActionResponse -> ShowS)
-> (DescribeMitigationActionResponse -> String)
-> ([DescribeMitigationActionResponse] -> ShowS)
-> Show DescribeMitigationActionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMitigationActionResponse] -> ShowS
$cshowList :: [DescribeMitigationActionResponse] -> ShowS
show :: DescribeMitigationActionResponse -> String
$cshow :: DescribeMitigationActionResponse -> String
showsPrec :: Int -> DescribeMitigationActionResponse -> ShowS
$cshowsPrec :: Int -> DescribeMitigationActionResponse -> ShowS
Prelude.Show, (forall x.
 DescribeMitigationActionResponse
 -> Rep DescribeMitigationActionResponse x)
-> (forall x.
    Rep DescribeMitigationActionResponse x
    -> DescribeMitigationActionResponse)
-> Generic DescribeMitigationActionResponse
forall x.
Rep DescribeMitigationActionResponse x
-> DescribeMitigationActionResponse
forall x.
DescribeMitigationActionResponse
-> Rep DescribeMitigationActionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMitigationActionResponse x
-> DescribeMitigationActionResponse
$cfrom :: forall x.
DescribeMitigationActionResponse
-> Rep DescribeMitigationActionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMitigationActionResponse' 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:
--
-- 'lastModifiedDate', 'describeMitigationActionResponse_lastModifiedDate' - The date and time when the mitigation action was last changed.
--
-- 'actionParams', 'describeMitigationActionResponse_actionParams' - Parameters that control how the mitigation action is applied, specific
-- to the type of mitigation action.
--
-- 'actionId', 'describeMitigationActionResponse_actionId' - A unique identifier for this action.
--
-- 'actionName', 'describeMitigationActionResponse_actionName' - The friendly name that uniquely identifies the mitigation action.
--
-- 'creationDate', 'describeMitigationActionResponse_creationDate' - The date and time when the mitigation action was added to your Amazon
-- Web Services accounts.
--
-- 'actionArn', 'describeMitigationActionResponse_actionArn' - The ARN that identifies this migration action.
--
-- 'actionType', 'describeMitigationActionResponse_actionType' - The type of mitigation action.
--
-- 'roleArn', 'describeMitigationActionResponse_roleArn' - The ARN of the IAM role used to apply this action.
--
-- 'httpStatus', 'describeMitigationActionResponse_httpStatus' - The response's http status code.
newDescribeMitigationActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeMitigationActionResponse
newDescribeMitigationActionResponse :: Int -> DescribeMitigationActionResponse
newDescribeMitigationActionResponse Int
pHttpStatus_ =
  DescribeMitigationActionResponse' :: Maybe POSIX
-> Maybe MitigationActionParams
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe MitigationActionType
-> Maybe Text
-> Int
-> DescribeMitigationActionResponse
DescribeMitigationActionResponse'
    { $sel:lastModifiedDate:DescribeMitigationActionResponse' :: Maybe POSIX
lastModifiedDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:actionParams:DescribeMitigationActionResponse' :: Maybe MitigationActionParams
actionParams = Maybe MitigationActionParams
forall a. Maybe a
Prelude.Nothing,
      $sel:actionId:DescribeMitigationActionResponse' :: Maybe Text
actionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionName:DescribeMitigationActionResponse' :: Maybe Text
actionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeMitigationActionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:actionArn:DescribeMitigationActionResponse' :: Maybe Text
actionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionType:DescribeMitigationActionResponse' :: Maybe MitigationActionType
actionType = Maybe MitigationActionType
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DescribeMitigationActionResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeMitigationActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time when the mitigation action was last changed.
describeMitigationActionResponse_lastModifiedDate :: Lens.Lens' DescribeMitigationActionResponse (Prelude.Maybe Prelude.UTCTime)
describeMitigationActionResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
describeMitigationActionResponse_lastModifiedDate = (DescribeMitigationActionResponse -> Maybe POSIX)
-> (DescribeMitigationActionResponse
    -> Maybe POSIX -> DescribeMitigationActionResponse)
-> Lens
     DescribeMitigationActionResponse
     DescribeMitigationActionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationActionResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeMitigationActionResponse' :: DescribeMitigationActionResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeMitigationActionResponse
s@DescribeMitigationActionResponse' {} Maybe POSIX
a -> DescribeMitigationActionResponse
s {$sel:lastModifiedDate:DescribeMitigationActionResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeMitigationActionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeMitigationActionResponse
 -> f DescribeMitigationActionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Parameters that control how the mitigation action is applied, specific
-- to the type of mitigation action.
describeMitigationActionResponse_actionParams :: Lens.Lens' DescribeMitigationActionResponse (Prelude.Maybe MitigationActionParams)
describeMitigationActionResponse_actionParams :: (Maybe MitigationActionParams -> f (Maybe MitigationActionParams))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
describeMitigationActionResponse_actionParams = (DescribeMitigationActionResponse -> Maybe MitigationActionParams)
-> (DescribeMitigationActionResponse
    -> Maybe MitigationActionParams
    -> DescribeMitigationActionResponse)
-> Lens
     DescribeMitigationActionResponse
     DescribeMitigationActionResponse
     (Maybe MitigationActionParams)
     (Maybe MitigationActionParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationActionResponse' {Maybe MitigationActionParams
actionParams :: Maybe MitigationActionParams
$sel:actionParams:DescribeMitigationActionResponse' :: DescribeMitigationActionResponse -> Maybe MitigationActionParams
actionParams} -> Maybe MitigationActionParams
actionParams) (\s :: DescribeMitigationActionResponse
s@DescribeMitigationActionResponse' {} Maybe MitigationActionParams
a -> DescribeMitigationActionResponse
s {$sel:actionParams:DescribeMitigationActionResponse' :: Maybe MitigationActionParams
actionParams = Maybe MitigationActionParams
a} :: DescribeMitigationActionResponse)

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

-- | The friendly name that uniquely identifies the mitigation action.
describeMitigationActionResponse_actionName :: Lens.Lens' DescribeMitigationActionResponse (Prelude.Maybe Prelude.Text)
describeMitigationActionResponse_actionName :: (Maybe Text -> f (Maybe Text))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
describeMitigationActionResponse_actionName = (DescribeMitigationActionResponse -> Maybe Text)
-> (DescribeMitigationActionResponse
    -> Maybe Text -> DescribeMitigationActionResponse)
-> Lens
     DescribeMitigationActionResponse
     DescribeMitigationActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationActionResponse' {Maybe Text
actionName :: Maybe Text
$sel:actionName:DescribeMitigationActionResponse' :: DescribeMitigationActionResponse -> Maybe Text
actionName} -> Maybe Text
actionName) (\s :: DescribeMitigationActionResponse
s@DescribeMitigationActionResponse' {} Maybe Text
a -> DescribeMitigationActionResponse
s {$sel:actionName:DescribeMitigationActionResponse' :: Maybe Text
actionName = Maybe Text
a} :: DescribeMitigationActionResponse)

-- | The date and time when the mitigation action was added to your Amazon
-- Web Services accounts.
describeMitigationActionResponse_creationDate :: Lens.Lens' DescribeMitigationActionResponse (Prelude.Maybe Prelude.UTCTime)
describeMitigationActionResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
describeMitigationActionResponse_creationDate = (DescribeMitigationActionResponse -> Maybe POSIX)
-> (DescribeMitigationActionResponse
    -> Maybe POSIX -> DescribeMitigationActionResponse)
-> Lens
     DescribeMitigationActionResponse
     DescribeMitigationActionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationActionResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeMitigationActionResponse' :: DescribeMitigationActionResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeMitigationActionResponse
s@DescribeMitigationActionResponse' {} Maybe POSIX
a -> DescribeMitigationActionResponse
s {$sel:creationDate:DescribeMitigationActionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeMitigationActionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeMitigationActionResponse
 -> f DescribeMitigationActionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ARN that identifies this migration action.
describeMitigationActionResponse_actionArn :: Lens.Lens' DescribeMitigationActionResponse (Prelude.Maybe Prelude.Text)
describeMitigationActionResponse_actionArn :: (Maybe Text -> f (Maybe Text))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
describeMitigationActionResponse_actionArn = (DescribeMitigationActionResponse -> Maybe Text)
-> (DescribeMitigationActionResponse
    -> Maybe Text -> DescribeMitigationActionResponse)
-> Lens
     DescribeMitigationActionResponse
     DescribeMitigationActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationActionResponse' {Maybe Text
actionArn :: Maybe Text
$sel:actionArn:DescribeMitigationActionResponse' :: DescribeMitigationActionResponse -> Maybe Text
actionArn} -> Maybe Text
actionArn) (\s :: DescribeMitigationActionResponse
s@DescribeMitigationActionResponse' {} Maybe Text
a -> DescribeMitigationActionResponse
s {$sel:actionArn:DescribeMitigationActionResponse' :: Maybe Text
actionArn = Maybe Text
a} :: DescribeMitigationActionResponse)

-- | The type of mitigation action.
describeMitigationActionResponse_actionType :: Lens.Lens' DescribeMitigationActionResponse (Prelude.Maybe MitigationActionType)
describeMitigationActionResponse_actionType :: (Maybe MitigationActionType -> f (Maybe MitigationActionType))
-> DescribeMitigationActionResponse
-> f DescribeMitigationActionResponse
describeMitigationActionResponse_actionType = (DescribeMitigationActionResponse -> Maybe MitigationActionType)
-> (DescribeMitigationActionResponse
    -> Maybe MitigationActionType -> DescribeMitigationActionResponse)
-> Lens
     DescribeMitigationActionResponse
     DescribeMitigationActionResponse
     (Maybe MitigationActionType)
     (Maybe MitigationActionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMitigationActionResponse' {Maybe MitigationActionType
actionType :: Maybe MitigationActionType
$sel:actionType:DescribeMitigationActionResponse' :: DescribeMitigationActionResponse -> Maybe MitigationActionType
actionType} -> Maybe MitigationActionType
actionType) (\s :: DescribeMitigationActionResponse
s@DescribeMitigationActionResponse' {} Maybe MitigationActionType
a -> DescribeMitigationActionResponse
s {$sel:actionType:DescribeMitigationActionResponse' :: Maybe MitigationActionType
actionType = Maybe MitigationActionType
a} :: DescribeMitigationActionResponse)

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

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

instance
  Prelude.NFData
    DescribeMitigationActionResponse