{-# 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.StartAuditMitigationActionsTask
-- 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)
--
-- Starts a task that applies a set of mitigation actions to the specified
-- target.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions StartAuditMitigationActionsTask>
-- action.
module Amazonka.IoT.StartAuditMitigationActionsTask
  ( -- * Creating a Request
    StartAuditMitigationActionsTask (..),
    newStartAuditMitigationActionsTask,

    -- * Request Lenses
    startAuditMitigationActionsTask_taskId,
    startAuditMitigationActionsTask_target,
    startAuditMitigationActionsTask_auditCheckToActionsMapping,
    startAuditMitigationActionsTask_clientRequestToken,

    -- * Destructuring the Response
    StartAuditMitigationActionsTaskResponse (..),
    newStartAuditMitigationActionsTaskResponse,

    -- * Response Lenses
    startAuditMitigationActionsTaskResponse_taskId,
    startAuditMitigationActionsTaskResponse_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:/ 'newStartAuditMitigationActionsTask' smart constructor.
data StartAuditMitigationActionsTask = StartAuditMitigationActionsTask'
  { -- | A unique identifier for the task. You can use this identifier to check
    -- the status of the task or to cancel it.
    StartAuditMitigationActionsTask -> Text
taskId :: Prelude.Text,
    -- | Specifies the audit findings to which the mitigation actions are
    -- applied. You can apply them to a type of audit check, to all findings
    -- from an audit, or to a specific set of findings.
    StartAuditMitigationActionsTask -> AuditMitigationActionsTaskTarget
target :: AuditMitigationActionsTaskTarget,
    -- | For an audit check, specifies which mitigation actions to apply. Those
    -- actions must be defined in your Amazon Web Services accounts.
    StartAuditMitigationActionsTask -> HashMap Text (NonEmpty Text)
auditCheckToActionsMapping :: Prelude.HashMap Prelude.Text (Prelude.NonEmpty Prelude.Text),
    -- | Each audit mitigation task must have a unique client request token. If
    -- you try to start a new task with the same token as a task that already
    -- exists, an exception occurs. If you omit this value, a unique client
    -- request token is generated automatically.
    StartAuditMitigationActionsTask -> Text
clientRequestToken :: Prelude.Text
  }
  deriving (StartAuditMitigationActionsTask
-> StartAuditMitigationActionsTask -> Bool
(StartAuditMitigationActionsTask
 -> StartAuditMitigationActionsTask -> Bool)
-> (StartAuditMitigationActionsTask
    -> StartAuditMitigationActionsTask -> Bool)
-> Eq StartAuditMitigationActionsTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartAuditMitigationActionsTask
-> StartAuditMitigationActionsTask -> Bool
$c/= :: StartAuditMitigationActionsTask
-> StartAuditMitigationActionsTask -> Bool
== :: StartAuditMitigationActionsTask
-> StartAuditMitigationActionsTask -> Bool
$c== :: StartAuditMitigationActionsTask
-> StartAuditMitigationActionsTask -> Bool
Prelude.Eq, ReadPrec [StartAuditMitigationActionsTask]
ReadPrec StartAuditMitigationActionsTask
Int -> ReadS StartAuditMitigationActionsTask
ReadS [StartAuditMitigationActionsTask]
(Int -> ReadS StartAuditMitigationActionsTask)
-> ReadS [StartAuditMitigationActionsTask]
-> ReadPrec StartAuditMitigationActionsTask
-> ReadPrec [StartAuditMitigationActionsTask]
-> Read StartAuditMitigationActionsTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartAuditMitigationActionsTask]
$creadListPrec :: ReadPrec [StartAuditMitigationActionsTask]
readPrec :: ReadPrec StartAuditMitigationActionsTask
$creadPrec :: ReadPrec StartAuditMitigationActionsTask
readList :: ReadS [StartAuditMitigationActionsTask]
$creadList :: ReadS [StartAuditMitigationActionsTask]
readsPrec :: Int -> ReadS StartAuditMitigationActionsTask
$creadsPrec :: Int -> ReadS StartAuditMitigationActionsTask
Prelude.Read, Int -> StartAuditMitigationActionsTask -> ShowS
[StartAuditMitigationActionsTask] -> ShowS
StartAuditMitigationActionsTask -> String
(Int -> StartAuditMitigationActionsTask -> ShowS)
-> (StartAuditMitigationActionsTask -> String)
-> ([StartAuditMitigationActionsTask] -> ShowS)
-> Show StartAuditMitigationActionsTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartAuditMitigationActionsTask] -> ShowS
$cshowList :: [StartAuditMitigationActionsTask] -> ShowS
show :: StartAuditMitigationActionsTask -> String
$cshow :: StartAuditMitigationActionsTask -> String
showsPrec :: Int -> StartAuditMitigationActionsTask -> ShowS
$cshowsPrec :: Int -> StartAuditMitigationActionsTask -> ShowS
Prelude.Show, (forall x.
 StartAuditMitigationActionsTask
 -> Rep StartAuditMitigationActionsTask x)
-> (forall x.
    Rep StartAuditMitigationActionsTask x
    -> StartAuditMitigationActionsTask)
-> Generic StartAuditMitigationActionsTask
forall x.
Rep StartAuditMitigationActionsTask x
-> StartAuditMitigationActionsTask
forall x.
StartAuditMitigationActionsTask
-> Rep StartAuditMitigationActionsTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartAuditMitigationActionsTask x
-> StartAuditMitigationActionsTask
$cfrom :: forall x.
StartAuditMitigationActionsTask
-> Rep StartAuditMitigationActionsTask x
Prelude.Generic)

-- |
-- Create a value of 'StartAuditMitigationActionsTask' 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:
--
-- 'taskId', 'startAuditMitigationActionsTask_taskId' - A unique identifier for the task. You can use this identifier to check
-- the status of the task or to cancel it.
--
-- 'target', 'startAuditMitigationActionsTask_target' - Specifies the audit findings to which the mitigation actions are
-- applied. You can apply them to a type of audit check, to all findings
-- from an audit, or to a specific set of findings.
--
-- 'auditCheckToActionsMapping', 'startAuditMitigationActionsTask_auditCheckToActionsMapping' - For an audit check, specifies which mitigation actions to apply. Those
-- actions must be defined in your Amazon Web Services accounts.
--
-- 'clientRequestToken', 'startAuditMitigationActionsTask_clientRequestToken' - Each audit mitigation task must have a unique client request token. If
-- you try to start a new task with the same token as a task that already
-- exists, an exception occurs. If you omit this value, a unique client
-- request token is generated automatically.
newStartAuditMitigationActionsTask ::
  -- | 'taskId'
  Prelude.Text ->
  -- | 'target'
  AuditMitigationActionsTaskTarget ->
  -- | 'clientRequestToken'
  Prelude.Text ->
  StartAuditMitigationActionsTask
newStartAuditMitigationActionsTask :: Text
-> AuditMitigationActionsTaskTarget
-> Text
-> StartAuditMitigationActionsTask
newStartAuditMitigationActionsTask
  Text
pTaskId_
  AuditMitigationActionsTaskTarget
pTarget_
  Text
pClientRequestToken_ =
    StartAuditMitigationActionsTask' :: Text
-> AuditMitigationActionsTaskTarget
-> HashMap Text (NonEmpty Text)
-> Text
-> StartAuditMitigationActionsTask
StartAuditMitigationActionsTask'
      { $sel:taskId:StartAuditMitigationActionsTask' :: Text
taskId = Text
pTaskId_,
        $sel:target:StartAuditMitigationActionsTask' :: AuditMitigationActionsTaskTarget
target = AuditMitigationActionsTaskTarget
pTarget_,
        $sel:auditCheckToActionsMapping:StartAuditMitigationActionsTask' :: HashMap Text (NonEmpty Text)
auditCheckToActionsMapping =
          HashMap Text (NonEmpty Text)
forall a. Monoid a => a
Prelude.mempty,
        $sel:clientRequestToken:StartAuditMitigationActionsTask' :: Text
clientRequestToken = Text
pClientRequestToken_
      }

-- | A unique identifier for the task. You can use this identifier to check
-- the status of the task or to cancel it.
startAuditMitigationActionsTask_taskId :: Lens.Lens' StartAuditMitigationActionsTask Prelude.Text
startAuditMitigationActionsTask_taskId :: (Text -> f Text)
-> StartAuditMitigationActionsTask
-> f StartAuditMitigationActionsTask
startAuditMitigationActionsTask_taskId = (StartAuditMitigationActionsTask -> Text)
-> (StartAuditMitigationActionsTask
    -> Text -> StartAuditMitigationActionsTask)
-> Lens
     StartAuditMitigationActionsTask
     StartAuditMitigationActionsTask
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAuditMitigationActionsTask' {Text
taskId :: Text
$sel:taskId:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> Text
taskId} -> Text
taskId) (\s :: StartAuditMitigationActionsTask
s@StartAuditMitigationActionsTask' {} Text
a -> StartAuditMitigationActionsTask
s {$sel:taskId:StartAuditMitigationActionsTask' :: Text
taskId = Text
a} :: StartAuditMitigationActionsTask)

-- | Specifies the audit findings to which the mitigation actions are
-- applied. You can apply them to a type of audit check, to all findings
-- from an audit, or to a specific set of findings.
startAuditMitigationActionsTask_target :: Lens.Lens' StartAuditMitigationActionsTask AuditMitigationActionsTaskTarget
startAuditMitigationActionsTask_target :: (AuditMitigationActionsTaskTarget
 -> f AuditMitigationActionsTaskTarget)
-> StartAuditMitigationActionsTask
-> f StartAuditMitigationActionsTask
startAuditMitigationActionsTask_target = (StartAuditMitigationActionsTask
 -> AuditMitigationActionsTaskTarget)
-> (StartAuditMitigationActionsTask
    -> AuditMitigationActionsTaskTarget
    -> StartAuditMitigationActionsTask)
-> Lens
     StartAuditMitigationActionsTask
     StartAuditMitigationActionsTask
     AuditMitigationActionsTaskTarget
     AuditMitigationActionsTaskTarget
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAuditMitigationActionsTask' {AuditMitigationActionsTaskTarget
target :: AuditMitigationActionsTaskTarget
$sel:target:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> AuditMitigationActionsTaskTarget
target} -> AuditMitigationActionsTaskTarget
target) (\s :: StartAuditMitigationActionsTask
s@StartAuditMitigationActionsTask' {} AuditMitigationActionsTaskTarget
a -> StartAuditMitigationActionsTask
s {$sel:target:StartAuditMitigationActionsTask' :: AuditMitigationActionsTaskTarget
target = AuditMitigationActionsTaskTarget
a} :: StartAuditMitigationActionsTask)

-- | For an audit check, specifies which mitigation actions to apply. Those
-- actions must be defined in your Amazon Web Services accounts.
startAuditMitigationActionsTask_auditCheckToActionsMapping :: Lens.Lens' StartAuditMitigationActionsTask (Prelude.HashMap Prelude.Text (Prelude.NonEmpty Prelude.Text))
startAuditMitigationActionsTask_auditCheckToActionsMapping :: (HashMap Text (NonEmpty Text) -> f (HashMap Text (NonEmpty Text)))
-> StartAuditMitigationActionsTask
-> f StartAuditMitigationActionsTask
startAuditMitigationActionsTask_auditCheckToActionsMapping = (StartAuditMitigationActionsTask -> HashMap Text (NonEmpty Text))
-> (StartAuditMitigationActionsTask
    -> HashMap Text (NonEmpty Text) -> StartAuditMitigationActionsTask)
-> Lens
     StartAuditMitigationActionsTask
     StartAuditMitigationActionsTask
     (HashMap Text (NonEmpty Text))
     (HashMap Text (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAuditMitigationActionsTask' {HashMap Text (NonEmpty Text)
auditCheckToActionsMapping :: HashMap Text (NonEmpty Text)
$sel:auditCheckToActionsMapping:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> HashMap Text (NonEmpty Text)
auditCheckToActionsMapping} -> HashMap Text (NonEmpty Text)
auditCheckToActionsMapping) (\s :: StartAuditMitigationActionsTask
s@StartAuditMitigationActionsTask' {} HashMap Text (NonEmpty Text)
a -> StartAuditMitigationActionsTask
s {$sel:auditCheckToActionsMapping:StartAuditMitigationActionsTask' :: HashMap Text (NonEmpty Text)
auditCheckToActionsMapping = HashMap Text (NonEmpty Text)
a} :: StartAuditMitigationActionsTask) ((HashMap Text (NonEmpty Text) -> f (HashMap Text (NonEmpty Text)))
 -> StartAuditMitigationActionsTask
 -> f StartAuditMitigationActionsTask)
-> ((HashMap Text (NonEmpty Text)
     -> f (HashMap Text (NonEmpty Text)))
    -> HashMap Text (NonEmpty Text)
    -> f (HashMap Text (NonEmpty Text)))
-> (HashMap Text (NonEmpty Text)
    -> f (HashMap Text (NonEmpty Text)))
-> StartAuditMitigationActionsTask
-> f StartAuditMitigationActionsTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text (NonEmpty Text) -> f (HashMap Text (NonEmpty Text)))
-> HashMap Text (NonEmpty Text) -> f (HashMap Text (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Each audit mitigation task must have a unique client request token. If
-- you try to start a new task with the same token as a task that already
-- exists, an exception occurs. If you omit this value, a unique client
-- request token is generated automatically.
startAuditMitigationActionsTask_clientRequestToken :: Lens.Lens' StartAuditMitigationActionsTask Prelude.Text
startAuditMitigationActionsTask_clientRequestToken :: (Text -> f Text)
-> StartAuditMitigationActionsTask
-> f StartAuditMitigationActionsTask
startAuditMitigationActionsTask_clientRequestToken = (StartAuditMitigationActionsTask -> Text)
-> (StartAuditMitigationActionsTask
    -> Text -> StartAuditMitigationActionsTask)
-> Lens
     StartAuditMitigationActionsTask
     StartAuditMitigationActionsTask
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAuditMitigationActionsTask' {Text
clientRequestToken :: Text
$sel:clientRequestToken:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> Text
clientRequestToken} -> Text
clientRequestToken) (\s :: StartAuditMitigationActionsTask
s@StartAuditMitigationActionsTask' {} Text
a -> StartAuditMitigationActionsTask
s {$sel:clientRequestToken:StartAuditMitigationActionsTask' :: Text
clientRequestToken = Text
a} :: StartAuditMitigationActionsTask)

instance
  Core.AWSRequest
    StartAuditMitigationActionsTask
  where
  type
    AWSResponse StartAuditMitigationActionsTask =
      StartAuditMitigationActionsTaskResponse
  request :: StartAuditMitigationActionsTask
-> Request StartAuditMitigationActionsTask
request = Service
-> StartAuditMitigationActionsTask
-> Request StartAuditMitigationActionsTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartAuditMitigationActionsTask
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse StartAuditMitigationActionsTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartAuditMitigationActionsTask))
-> Logger
-> Service
-> Proxy StartAuditMitigationActionsTask
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse StartAuditMitigationActionsTask)))
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 -> StartAuditMitigationActionsTaskResponse
StartAuditMitigationActionsTaskResponse'
            (Maybe Text -> Int -> StartAuditMitigationActionsTaskResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartAuditMitigationActionsTaskResponse)
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
"taskId")
            Either String (Int -> StartAuditMitigationActionsTaskResponse)
-> Either String Int
-> Either String StartAuditMitigationActionsTaskResponse
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
    StartAuditMitigationActionsTask

instance
  Prelude.NFData
    StartAuditMitigationActionsTask

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

instance Core.ToJSON StartAuditMitigationActionsTask where
  toJSON :: StartAuditMitigationActionsTask -> Value
toJSON StartAuditMitigationActionsTask' {Text
HashMap Text (NonEmpty Text)
AuditMitigationActionsTaskTarget
clientRequestToken :: Text
auditCheckToActionsMapping :: HashMap Text (NonEmpty Text)
target :: AuditMitigationActionsTaskTarget
taskId :: Text
$sel:clientRequestToken:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> Text
$sel:auditCheckToActionsMapping:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> HashMap Text (NonEmpty Text)
$sel:target:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> AuditMitigationActionsTaskTarget
$sel:taskId:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"target" Text -> AuditMitigationActionsTaskTarget -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AuditMitigationActionsTaskTarget
target),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"auditCheckToActionsMapping"
                  Text -> HashMap Text (NonEmpty Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HashMap Text (NonEmpty Text)
auditCheckToActionsMapping
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientRequestToken)
          ]
      )

instance Core.ToPath StartAuditMitigationActionsTask where
  toPath :: StartAuditMitigationActionsTask -> ByteString
toPath StartAuditMitigationActionsTask' {Text
HashMap Text (NonEmpty Text)
AuditMitigationActionsTaskTarget
clientRequestToken :: Text
auditCheckToActionsMapping :: HashMap Text (NonEmpty Text)
target :: AuditMitigationActionsTaskTarget
taskId :: Text
$sel:clientRequestToken:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> Text
$sel:auditCheckToActionsMapping:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> HashMap Text (NonEmpty Text)
$sel:target:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> AuditMitigationActionsTaskTarget
$sel:taskId:StartAuditMitigationActionsTask' :: StartAuditMitigationActionsTask -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/audit/mitigationactions/tasks/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
taskId]

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

-- | /See:/ 'newStartAuditMitigationActionsTaskResponse' smart constructor.
data StartAuditMitigationActionsTaskResponse = StartAuditMitigationActionsTaskResponse'
  { -- | The unique identifier for the audit mitigation task. This matches the
    -- @taskId@ that you specified in the request.
    StartAuditMitigationActionsTaskResponse -> Maybe Text
taskId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StartAuditMitigationActionsTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartAuditMitigationActionsTaskResponse
-> StartAuditMitigationActionsTaskResponse -> Bool
(StartAuditMitigationActionsTaskResponse
 -> StartAuditMitigationActionsTaskResponse -> Bool)
-> (StartAuditMitigationActionsTaskResponse
    -> StartAuditMitigationActionsTaskResponse -> Bool)
-> Eq StartAuditMitigationActionsTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartAuditMitigationActionsTaskResponse
-> StartAuditMitigationActionsTaskResponse -> Bool
$c/= :: StartAuditMitigationActionsTaskResponse
-> StartAuditMitigationActionsTaskResponse -> Bool
== :: StartAuditMitigationActionsTaskResponse
-> StartAuditMitigationActionsTaskResponse -> Bool
$c== :: StartAuditMitigationActionsTaskResponse
-> StartAuditMitigationActionsTaskResponse -> Bool
Prelude.Eq, ReadPrec [StartAuditMitigationActionsTaskResponse]
ReadPrec StartAuditMitigationActionsTaskResponse
Int -> ReadS StartAuditMitigationActionsTaskResponse
ReadS [StartAuditMitigationActionsTaskResponse]
(Int -> ReadS StartAuditMitigationActionsTaskResponse)
-> ReadS [StartAuditMitigationActionsTaskResponse]
-> ReadPrec StartAuditMitigationActionsTaskResponse
-> ReadPrec [StartAuditMitigationActionsTaskResponse]
-> Read StartAuditMitigationActionsTaskResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartAuditMitigationActionsTaskResponse]
$creadListPrec :: ReadPrec [StartAuditMitigationActionsTaskResponse]
readPrec :: ReadPrec StartAuditMitigationActionsTaskResponse
$creadPrec :: ReadPrec StartAuditMitigationActionsTaskResponse
readList :: ReadS [StartAuditMitigationActionsTaskResponse]
$creadList :: ReadS [StartAuditMitigationActionsTaskResponse]
readsPrec :: Int -> ReadS StartAuditMitigationActionsTaskResponse
$creadsPrec :: Int -> ReadS StartAuditMitigationActionsTaskResponse
Prelude.Read, Int -> StartAuditMitigationActionsTaskResponse -> ShowS
[StartAuditMitigationActionsTaskResponse] -> ShowS
StartAuditMitigationActionsTaskResponse -> String
(Int -> StartAuditMitigationActionsTaskResponse -> ShowS)
-> (StartAuditMitigationActionsTaskResponse -> String)
-> ([StartAuditMitigationActionsTaskResponse] -> ShowS)
-> Show StartAuditMitigationActionsTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartAuditMitigationActionsTaskResponse] -> ShowS
$cshowList :: [StartAuditMitigationActionsTaskResponse] -> ShowS
show :: StartAuditMitigationActionsTaskResponse -> String
$cshow :: StartAuditMitigationActionsTaskResponse -> String
showsPrec :: Int -> StartAuditMitigationActionsTaskResponse -> ShowS
$cshowsPrec :: Int -> StartAuditMitigationActionsTaskResponse -> ShowS
Prelude.Show, (forall x.
 StartAuditMitigationActionsTaskResponse
 -> Rep StartAuditMitigationActionsTaskResponse x)
-> (forall x.
    Rep StartAuditMitigationActionsTaskResponse x
    -> StartAuditMitigationActionsTaskResponse)
-> Generic StartAuditMitigationActionsTaskResponse
forall x.
Rep StartAuditMitigationActionsTaskResponse x
-> StartAuditMitigationActionsTaskResponse
forall x.
StartAuditMitigationActionsTaskResponse
-> Rep StartAuditMitigationActionsTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartAuditMitigationActionsTaskResponse x
-> StartAuditMitigationActionsTaskResponse
$cfrom :: forall x.
StartAuditMitigationActionsTaskResponse
-> Rep StartAuditMitigationActionsTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartAuditMitigationActionsTaskResponse' 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:
--
-- 'taskId', 'startAuditMitigationActionsTaskResponse_taskId' - The unique identifier for the audit mitigation task. This matches the
-- @taskId@ that you specified in the request.
--
-- 'httpStatus', 'startAuditMitigationActionsTaskResponse_httpStatus' - The response's http status code.
newStartAuditMitigationActionsTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartAuditMitigationActionsTaskResponse
newStartAuditMitigationActionsTaskResponse :: Int -> StartAuditMitigationActionsTaskResponse
newStartAuditMitigationActionsTaskResponse
  Int
pHttpStatus_ =
    StartAuditMitigationActionsTaskResponse' :: Maybe Text -> Int -> StartAuditMitigationActionsTaskResponse
StartAuditMitigationActionsTaskResponse'
      { $sel:taskId:StartAuditMitigationActionsTaskResponse' :: Maybe Text
taskId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:StartAuditMitigationActionsTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The unique identifier for the audit mitigation task. This matches the
-- @taskId@ that you specified in the request.
startAuditMitigationActionsTaskResponse_taskId :: Lens.Lens' StartAuditMitigationActionsTaskResponse (Prelude.Maybe Prelude.Text)
startAuditMitigationActionsTaskResponse_taskId :: (Maybe Text -> f (Maybe Text))
-> StartAuditMitigationActionsTaskResponse
-> f StartAuditMitigationActionsTaskResponse
startAuditMitigationActionsTaskResponse_taskId = (StartAuditMitigationActionsTaskResponse -> Maybe Text)
-> (StartAuditMitigationActionsTaskResponse
    -> Maybe Text -> StartAuditMitigationActionsTaskResponse)
-> Lens
     StartAuditMitigationActionsTaskResponse
     StartAuditMitigationActionsTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAuditMitigationActionsTaskResponse' {Maybe Text
taskId :: Maybe Text
$sel:taskId:StartAuditMitigationActionsTaskResponse' :: StartAuditMitigationActionsTaskResponse -> Maybe Text
taskId} -> Maybe Text
taskId) (\s :: StartAuditMitigationActionsTaskResponse
s@StartAuditMitigationActionsTaskResponse' {} Maybe Text
a -> StartAuditMitigationActionsTaskResponse
s {$sel:taskId:StartAuditMitigationActionsTaskResponse' :: Maybe Text
taskId = Maybe Text
a} :: StartAuditMitigationActionsTaskResponse)

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

instance
  Prelude.NFData
    StartAuditMitigationActionsTaskResponse