{-# 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 #-}
module Amazonka.IoT.ListAuditMitigationActionsTasks
(
ListAuditMitigationActionsTasks (..),
newListAuditMitigationActionsTasks,
listAuditMitigationActionsTasks_auditTaskId,
listAuditMitigationActionsTasks_nextToken,
listAuditMitigationActionsTasks_findingId,
listAuditMitigationActionsTasks_maxResults,
listAuditMitigationActionsTasks_taskStatus,
listAuditMitigationActionsTasks_startTime,
listAuditMitigationActionsTasks_endTime,
ListAuditMitigationActionsTasksResponse (..),
newListAuditMitigationActionsTasksResponse,
listAuditMitigationActionsTasksResponse_tasks,
listAuditMitigationActionsTasksResponse_nextToken,
listAuditMitigationActionsTasksResponse_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
data ListAuditMitigationActionsTasks = ListAuditMitigationActionsTasks'
{
ListAuditMitigationActionsTasks -> Maybe Text
auditTaskId :: Prelude.Maybe Prelude.Text,
ListAuditMitigationActionsTasks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAuditMitigationActionsTasks -> Maybe Text
findingId :: Prelude.Maybe Prelude.Text,
ListAuditMitigationActionsTasks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListAuditMitigationActionsTasks
-> Maybe AuditMitigationActionsTaskStatus
taskStatus :: Prelude.Maybe AuditMitigationActionsTaskStatus,
ListAuditMitigationActionsTasks -> POSIX
startTime :: Core.POSIX,
ListAuditMitigationActionsTasks -> POSIX
endTime :: Core.POSIX
}
deriving (ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool
(ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool)
-> (ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool)
-> Eq ListAuditMitigationActionsTasks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool
$c/= :: ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool
== :: ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool
$c== :: ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks -> Bool
Prelude.Eq, ReadPrec [ListAuditMitigationActionsTasks]
ReadPrec ListAuditMitigationActionsTasks
Int -> ReadS ListAuditMitigationActionsTasks
ReadS [ListAuditMitigationActionsTasks]
(Int -> ReadS ListAuditMitigationActionsTasks)
-> ReadS [ListAuditMitigationActionsTasks]
-> ReadPrec ListAuditMitigationActionsTasks
-> ReadPrec [ListAuditMitigationActionsTasks]
-> Read ListAuditMitigationActionsTasks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAuditMitigationActionsTasks]
$creadListPrec :: ReadPrec [ListAuditMitigationActionsTasks]
readPrec :: ReadPrec ListAuditMitigationActionsTasks
$creadPrec :: ReadPrec ListAuditMitigationActionsTasks
readList :: ReadS [ListAuditMitigationActionsTasks]
$creadList :: ReadS [ListAuditMitigationActionsTasks]
readsPrec :: Int -> ReadS ListAuditMitigationActionsTasks
$creadsPrec :: Int -> ReadS ListAuditMitigationActionsTasks
Prelude.Read, Int -> ListAuditMitigationActionsTasks -> ShowS
[ListAuditMitigationActionsTasks] -> ShowS
ListAuditMitigationActionsTasks -> String
(Int -> ListAuditMitigationActionsTasks -> ShowS)
-> (ListAuditMitigationActionsTasks -> String)
-> ([ListAuditMitigationActionsTasks] -> ShowS)
-> Show ListAuditMitigationActionsTasks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAuditMitigationActionsTasks] -> ShowS
$cshowList :: [ListAuditMitigationActionsTasks] -> ShowS
show :: ListAuditMitigationActionsTasks -> String
$cshow :: ListAuditMitigationActionsTasks -> String
showsPrec :: Int -> ListAuditMitigationActionsTasks -> ShowS
$cshowsPrec :: Int -> ListAuditMitigationActionsTasks -> ShowS
Prelude.Show, (forall x.
ListAuditMitigationActionsTasks
-> Rep ListAuditMitigationActionsTasks x)
-> (forall x.
Rep ListAuditMitigationActionsTasks x
-> ListAuditMitigationActionsTasks)
-> Generic ListAuditMitigationActionsTasks
forall x.
Rep ListAuditMitigationActionsTasks x
-> ListAuditMitigationActionsTasks
forall x.
ListAuditMitigationActionsTasks
-> Rep ListAuditMitigationActionsTasks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAuditMitigationActionsTasks x
-> ListAuditMitigationActionsTasks
$cfrom :: forall x.
ListAuditMitigationActionsTasks
-> Rep ListAuditMitigationActionsTasks x
Prelude.Generic)
newListAuditMitigationActionsTasks ::
Prelude.UTCTime ->
Prelude.UTCTime ->
ListAuditMitigationActionsTasks
newListAuditMitigationActionsTasks :: UTCTime -> UTCTime -> ListAuditMitigationActionsTasks
newListAuditMitigationActionsTasks
UTCTime
pStartTime_
UTCTime
pEndTime_ =
ListAuditMitigationActionsTasks' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe AuditMitigationActionsTaskStatus
-> POSIX
-> POSIX
-> ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks'
{ $sel:auditTaskId:ListAuditMitigationActionsTasks' :: Maybe Text
auditTaskId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAuditMitigationActionsTasks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:findingId:ListAuditMitigationActionsTasks' :: Maybe Text
findingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListAuditMitigationActionsTasks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:taskStatus:ListAuditMitigationActionsTasks' :: Maybe AuditMitigationActionsTaskStatus
taskStatus = Maybe AuditMitigationActionsTaskStatus
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ListAuditMitigationActionsTasks' :: POSIX
startTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:endTime:ListAuditMitigationActionsTasks' :: POSIX
endTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_
}
listAuditMitigationActionsTasks_auditTaskId :: Lens.Lens' ListAuditMitigationActionsTasks (Prelude.Maybe Prelude.Text)
listAuditMitigationActionsTasks_auditTaskId :: (Maybe Text -> f (Maybe Text))
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_auditTaskId = (ListAuditMitigationActionsTasks -> Maybe Text)
-> (ListAuditMitigationActionsTasks
-> Maybe Text -> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {Maybe Text
auditTaskId :: Maybe Text
$sel:auditTaskId:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Text
auditTaskId} -> Maybe Text
auditTaskId) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} Maybe Text
a -> ListAuditMitigationActionsTasks
s {$sel:auditTaskId:ListAuditMitigationActionsTasks' :: Maybe Text
auditTaskId = Maybe Text
a} :: ListAuditMitigationActionsTasks)
listAuditMitigationActionsTasks_nextToken :: Lens.Lens' ListAuditMitigationActionsTasks (Prelude.Maybe Prelude.Text)
listAuditMitigationActionsTasks_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_nextToken = (ListAuditMitigationActionsTasks -> Maybe Text)
-> (ListAuditMitigationActionsTasks
-> Maybe Text -> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} Maybe Text
a -> ListAuditMitigationActionsTasks
s {$sel:nextToken:ListAuditMitigationActionsTasks' :: Maybe Text
nextToken = Maybe Text
a} :: ListAuditMitigationActionsTasks)
listAuditMitigationActionsTasks_findingId :: Lens.Lens' ListAuditMitigationActionsTasks (Prelude.Maybe Prelude.Text)
listAuditMitigationActionsTasks_findingId :: (Maybe Text -> f (Maybe Text))
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_findingId = (ListAuditMitigationActionsTasks -> Maybe Text)
-> (ListAuditMitigationActionsTasks
-> Maybe Text -> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {Maybe Text
findingId :: Maybe Text
$sel:findingId:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Text
findingId} -> Maybe Text
findingId) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} Maybe Text
a -> ListAuditMitigationActionsTasks
s {$sel:findingId:ListAuditMitigationActionsTasks' :: Maybe Text
findingId = Maybe Text
a} :: ListAuditMitigationActionsTasks)
listAuditMitigationActionsTasks_maxResults :: Lens.Lens' ListAuditMitigationActionsTasks (Prelude.Maybe Prelude.Natural)
listAuditMitigationActionsTasks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_maxResults = (ListAuditMitigationActionsTasks -> Maybe Natural)
-> (ListAuditMitigationActionsTasks
-> Maybe Natural -> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} Maybe Natural
a -> ListAuditMitigationActionsTasks
s {$sel:maxResults:ListAuditMitigationActionsTasks' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAuditMitigationActionsTasks)
listAuditMitigationActionsTasks_taskStatus :: Lens.Lens' ListAuditMitigationActionsTasks (Prelude.Maybe AuditMitigationActionsTaskStatus)
listAuditMitigationActionsTasks_taskStatus :: (Maybe AuditMitigationActionsTaskStatus
-> f (Maybe AuditMitigationActionsTaskStatus))
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_taskStatus = (ListAuditMitigationActionsTasks
-> Maybe AuditMitigationActionsTaskStatus)
-> (ListAuditMitigationActionsTasks
-> Maybe AuditMitigationActionsTaskStatus
-> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
(Maybe AuditMitigationActionsTaskStatus)
(Maybe AuditMitigationActionsTaskStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {Maybe AuditMitigationActionsTaskStatus
taskStatus :: Maybe AuditMitigationActionsTaskStatus
$sel:taskStatus:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks
-> Maybe AuditMitigationActionsTaskStatus
taskStatus} -> Maybe AuditMitigationActionsTaskStatus
taskStatus) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} Maybe AuditMitigationActionsTaskStatus
a -> ListAuditMitigationActionsTasks
s {$sel:taskStatus:ListAuditMitigationActionsTasks' :: Maybe AuditMitigationActionsTaskStatus
taskStatus = Maybe AuditMitigationActionsTaskStatus
a} :: ListAuditMitigationActionsTasks)
listAuditMitigationActionsTasks_startTime :: Lens.Lens' ListAuditMitigationActionsTasks Prelude.UTCTime
listAuditMitigationActionsTasks_startTime :: (UTCTime -> f UTCTime)
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_startTime = (ListAuditMitigationActionsTasks -> POSIX)
-> (ListAuditMitigationActionsTasks
-> POSIX -> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {POSIX
startTime :: POSIX
$sel:startTime:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> POSIX
startTime} -> POSIX
startTime) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} POSIX
a -> ListAuditMitigationActionsTasks
s {$sel:startTime:ListAuditMitigationActionsTasks' :: POSIX
startTime = POSIX
a} :: ListAuditMitigationActionsTasks) ((POSIX -> f POSIX)
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listAuditMitigationActionsTasks_endTime :: Lens.Lens' ListAuditMitigationActionsTasks Prelude.UTCTime
listAuditMitigationActionsTasks_endTime :: (UTCTime -> f UTCTime)
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
listAuditMitigationActionsTasks_endTime = (ListAuditMitigationActionsTasks -> POSIX)
-> (ListAuditMitigationActionsTasks
-> POSIX -> ListAuditMitigationActionsTasks)
-> Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasks' {POSIX
endTime :: POSIX
$sel:endTime:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> POSIX
endTime} -> POSIX
endTime) (\s :: ListAuditMitigationActionsTasks
s@ListAuditMitigationActionsTasks' {} POSIX
a -> ListAuditMitigationActionsTasks
s {$sel:endTime:ListAuditMitigationActionsTasks' :: POSIX
endTime = POSIX
a} :: ListAuditMitigationActionsTasks) ((POSIX -> f POSIX)
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ListAuditMitigationActionsTasks
-> f ListAuditMitigationActionsTasks
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance
Core.AWSPager
ListAuditMitigationActionsTasks
where
page :: ListAuditMitigationActionsTasks
-> AWSResponse ListAuditMitigationActionsTasks
-> Maybe ListAuditMitigationActionsTasks
page ListAuditMitigationActionsTasks
rq AWSResponse ListAuditMitigationActionsTasks
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasksResponse
rs
ListAuditMitigationActionsTasksResponse
-> Getting
(First Text) ListAuditMitigationActionsTasksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAuditMitigationActionsTasksResponse
-> Const (First Text) ListAuditMitigationActionsTasksResponse
Lens' ListAuditMitigationActionsTasksResponse (Maybe Text)
listAuditMitigationActionsTasksResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAuditMitigationActionsTasksResponse
-> Const (First Text) ListAuditMitigationActionsTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListAuditMitigationActionsTasksResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListAuditMitigationActionsTasks
forall a. Maybe a
Prelude.Nothing
| Maybe [AuditMitigationActionsTaskMetadata] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasksResponse
rs
ListAuditMitigationActionsTasksResponse
-> Getting
(First [AuditMitigationActionsTaskMetadata])
ListAuditMitigationActionsTasksResponse
[AuditMitigationActionsTaskMetadata]
-> Maybe [AuditMitigationActionsTaskMetadata]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AuditMitigationActionsTaskMetadata]
-> Const
(First [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata]))
-> ListAuditMitigationActionsTasksResponse
-> Const
(First [AuditMitigationActionsTaskMetadata])
ListAuditMitigationActionsTasksResponse
Lens'
ListAuditMitigationActionsTasksResponse
(Maybe [AuditMitigationActionsTaskMetadata])
listAuditMitigationActionsTasksResponse_tasks
((Maybe [AuditMitigationActionsTaskMetadata]
-> Const
(First [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata]))
-> ListAuditMitigationActionsTasksResponse
-> Const
(First [AuditMitigationActionsTaskMetadata])
ListAuditMitigationActionsTasksResponse)
-> (([AuditMitigationActionsTaskMetadata]
-> Const
(First [AuditMitigationActionsTaskMetadata])
[AuditMitigationActionsTaskMetadata])
-> Maybe [AuditMitigationActionsTaskMetadata]
-> Const
(First [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata]))
-> Getting
(First [AuditMitigationActionsTaskMetadata])
ListAuditMitigationActionsTasksResponse
[AuditMitigationActionsTaskMetadata]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AuditMitigationActionsTaskMetadata]
-> Const
(First [AuditMitigationActionsTaskMetadata])
[AuditMitigationActionsTaskMetadata])
-> Maybe [AuditMitigationActionsTaskMetadata]
-> Const
(First [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListAuditMitigationActionsTasks
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListAuditMitigationActionsTasks
-> Maybe ListAuditMitigationActionsTasks
forall a. a -> Maybe a
Prelude.Just (ListAuditMitigationActionsTasks
-> Maybe ListAuditMitigationActionsTasks)
-> ListAuditMitigationActionsTasks
-> Maybe ListAuditMitigationActionsTasks
forall a b. (a -> b) -> a -> b
Prelude.$
ListAuditMitigationActionsTasks
rq
ListAuditMitigationActionsTasks
-> (ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks)
-> ListAuditMitigationActionsTasks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListAuditMitigationActionsTasks
-> Identity ListAuditMitigationActionsTasks
Lens
ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasks
(Maybe Text)
(Maybe Text)
listAuditMitigationActionsTasks_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListAuditMitigationActionsTasks
-> Identity ListAuditMitigationActionsTasks)
-> Maybe Text
-> ListAuditMitigationActionsTasks
-> ListAuditMitigationActionsTasks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAuditMitigationActionsTasks
ListAuditMitigationActionsTasksResponse
rs
ListAuditMitigationActionsTasksResponse
-> Getting
(First Text) ListAuditMitigationActionsTasksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAuditMitigationActionsTasksResponse
-> Const (First Text) ListAuditMitigationActionsTasksResponse
Lens' ListAuditMitigationActionsTasksResponse (Maybe Text)
listAuditMitigationActionsTasksResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAuditMitigationActionsTasksResponse
-> Const (First Text) ListAuditMitigationActionsTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListAuditMitigationActionsTasksResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance
Core.AWSRequest
ListAuditMitigationActionsTasks
where
type
AWSResponse ListAuditMitigationActionsTasks =
ListAuditMitigationActionsTasksResponse
request :: ListAuditMitigationActionsTasks
-> Request ListAuditMitigationActionsTasks
request = Service
-> ListAuditMitigationActionsTasks
-> Request ListAuditMitigationActionsTasks
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListAuditMitigationActionsTasks
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListAuditMitigationActionsTasks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListAuditMitigationActionsTasks))
-> Logger
-> Service
-> Proxy ListAuditMitigationActionsTasks
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListAuditMitigationActionsTasks)))
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 [AuditMitigationActionsTaskMetadata]
-> Maybe Text -> Int -> ListAuditMitigationActionsTasksResponse
ListAuditMitigationActionsTasksResponse'
(Maybe [AuditMitigationActionsTaskMetadata]
-> Maybe Text -> Int -> ListAuditMitigationActionsTasksResponse)
-> Either String (Maybe [AuditMitigationActionsTaskMetadata])
-> Either
String
(Maybe Text -> Int -> ListAuditMitigationActionsTasksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either
String (Maybe (Maybe [AuditMitigationActionsTaskMetadata]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tasks" Either String (Maybe (Maybe [AuditMitigationActionsTaskMetadata]))
-> Maybe [AuditMitigationActionsTaskMetadata]
-> Either String (Maybe [AuditMitigationActionsTaskMetadata])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AuditMitigationActionsTaskMetadata]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text -> Int -> ListAuditMitigationActionsTasksResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListAuditMitigationActionsTasksResponse)
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
"nextToken")
Either String (Int -> ListAuditMitigationActionsTasksResponse)
-> Either String Int
-> Either String ListAuditMitigationActionsTasksResponse
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
ListAuditMitigationActionsTasks
instance
Prelude.NFData
ListAuditMitigationActionsTasks
instance
Core.ToHeaders
ListAuditMitigationActionsTasks
where
toHeaders :: ListAuditMitigationActionsTasks -> ResponseHeaders
toHeaders = ResponseHeaders
-> ListAuditMitigationActionsTasks -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListAuditMitigationActionsTasks where
toPath :: ListAuditMitigationActionsTasks -> ByteString
toPath =
ByteString -> ListAuditMitigationActionsTasks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/audit/mitigationactions/tasks"
instance Core.ToQuery ListAuditMitigationActionsTasks where
toQuery :: ListAuditMitigationActionsTasks -> QueryString
toQuery ListAuditMitigationActionsTasks' {Maybe Natural
Maybe Text
Maybe AuditMitigationActionsTaskStatus
POSIX
endTime :: POSIX
startTime :: POSIX
taskStatus :: Maybe AuditMitigationActionsTaskStatus
maxResults :: Maybe Natural
findingId :: Maybe Text
nextToken :: Maybe Text
auditTaskId :: Maybe Text
$sel:endTime:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> POSIX
$sel:startTime:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> POSIX
$sel:taskStatus:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks
-> Maybe AuditMitigationActionsTaskStatus
$sel:maxResults:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Natural
$sel:findingId:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Text
$sel:nextToken:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Text
$sel:auditTaskId:ListAuditMitigationActionsTasks' :: ListAuditMitigationActionsTasks -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"auditTaskId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
auditTaskId,
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"findingId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
findingId,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
ByteString
"taskStatus" ByteString -> Maybe AuditMitigationActionsTaskStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe AuditMitigationActionsTaskStatus
taskStatus,
ByteString
"startTime" ByteString -> POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: POSIX
startTime,
ByteString
"endTime" ByteString -> POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: POSIX
endTime
]
data ListAuditMitigationActionsTasksResponse = ListAuditMitigationActionsTasksResponse'
{
ListAuditMitigationActionsTasksResponse
-> Maybe [AuditMitigationActionsTaskMetadata]
tasks :: Prelude.Maybe [AuditMitigationActionsTaskMetadata],
ListAuditMitigationActionsTasksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAuditMitigationActionsTasksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool
(ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool)
-> (ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool)
-> Eq ListAuditMitigationActionsTasksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool
$c/= :: ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool
== :: ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool
$c== :: ListAuditMitigationActionsTasksResponse
-> ListAuditMitigationActionsTasksResponse -> Bool
Prelude.Eq, ReadPrec [ListAuditMitigationActionsTasksResponse]
ReadPrec ListAuditMitigationActionsTasksResponse
Int -> ReadS ListAuditMitigationActionsTasksResponse
ReadS [ListAuditMitigationActionsTasksResponse]
(Int -> ReadS ListAuditMitigationActionsTasksResponse)
-> ReadS [ListAuditMitigationActionsTasksResponse]
-> ReadPrec ListAuditMitigationActionsTasksResponse
-> ReadPrec [ListAuditMitigationActionsTasksResponse]
-> Read ListAuditMitigationActionsTasksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAuditMitigationActionsTasksResponse]
$creadListPrec :: ReadPrec [ListAuditMitigationActionsTasksResponse]
readPrec :: ReadPrec ListAuditMitigationActionsTasksResponse
$creadPrec :: ReadPrec ListAuditMitigationActionsTasksResponse
readList :: ReadS [ListAuditMitigationActionsTasksResponse]
$creadList :: ReadS [ListAuditMitigationActionsTasksResponse]
readsPrec :: Int -> ReadS ListAuditMitigationActionsTasksResponse
$creadsPrec :: Int -> ReadS ListAuditMitigationActionsTasksResponse
Prelude.Read, Int -> ListAuditMitigationActionsTasksResponse -> ShowS
[ListAuditMitigationActionsTasksResponse] -> ShowS
ListAuditMitigationActionsTasksResponse -> String
(Int -> ListAuditMitigationActionsTasksResponse -> ShowS)
-> (ListAuditMitigationActionsTasksResponse -> String)
-> ([ListAuditMitigationActionsTasksResponse] -> ShowS)
-> Show ListAuditMitigationActionsTasksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAuditMitigationActionsTasksResponse] -> ShowS
$cshowList :: [ListAuditMitigationActionsTasksResponse] -> ShowS
show :: ListAuditMitigationActionsTasksResponse -> String
$cshow :: ListAuditMitigationActionsTasksResponse -> String
showsPrec :: Int -> ListAuditMitigationActionsTasksResponse -> ShowS
$cshowsPrec :: Int -> ListAuditMitigationActionsTasksResponse -> ShowS
Prelude.Show, (forall x.
ListAuditMitigationActionsTasksResponse
-> Rep ListAuditMitigationActionsTasksResponse x)
-> (forall x.
Rep ListAuditMitigationActionsTasksResponse x
-> ListAuditMitigationActionsTasksResponse)
-> Generic ListAuditMitigationActionsTasksResponse
forall x.
Rep ListAuditMitigationActionsTasksResponse x
-> ListAuditMitigationActionsTasksResponse
forall x.
ListAuditMitigationActionsTasksResponse
-> Rep ListAuditMitigationActionsTasksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAuditMitigationActionsTasksResponse x
-> ListAuditMitigationActionsTasksResponse
$cfrom :: forall x.
ListAuditMitigationActionsTasksResponse
-> Rep ListAuditMitigationActionsTasksResponse x
Prelude.Generic)
newListAuditMitigationActionsTasksResponse ::
Prelude.Int ->
ListAuditMitigationActionsTasksResponse
newListAuditMitigationActionsTasksResponse :: Int -> ListAuditMitigationActionsTasksResponse
newListAuditMitigationActionsTasksResponse
Int
pHttpStatus_ =
ListAuditMitigationActionsTasksResponse' :: Maybe [AuditMitigationActionsTaskMetadata]
-> Maybe Text -> Int -> ListAuditMitigationActionsTasksResponse
ListAuditMitigationActionsTasksResponse'
{ $sel:tasks:ListAuditMitigationActionsTasksResponse' :: Maybe [AuditMitigationActionsTaskMetadata]
tasks =
Maybe [AuditMitigationActionsTaskMetadata]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAuditMitigationActionsTasksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAuditMitigationActionsTasksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAuditMitigationActionsTasksResponse_tasks :: Lens.Lens' ListAuditMitigationActionsTasksResponse (Prelude.Maybe [AuditMitigationActionsTaskMetadata])
listAuditMitigationActionsTasksResponse_tasks :: (Maybe [AuditMitigationActionsTaskMetadata]
-> f (Maybe [AuditMitigationActionsTaskMetadata]))
-> ListAuditMitigationActionsTasksResponse
-> f ListAuditMitigationActionsTasksResponse
listAuditMitigationActionsTasksResponse_tasks = (ListAuditMitigationActionsTasksResponse
-> Maybe [AuditMitigationActionsTaskMetadata])
-> (ListAuditMitigationActionsTasksResponse
-> Maybe [AuditMitigationActionsTaskMetadata]
-> ListAuditMitigationActionsTasksResponse)
-> Lens'
ListAuditMitigationActionsTasksResponse
(Maybe [AuditMitigationActionsTaskMetadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasksResponse' {Maybe [AuditMitigationActionsTaskMetadata]
tasks :: Maybe [AuditMitigationActionsTaskMetadata]
$sel:tasks:ListAuditMitigationActionsTasksResponse' :: ListAuditMitigationActionsTasksResponse
-> Maybe [AuditMitigationActionsTaskMetadata]
tasks} -> Maybe [AuditMitigationActionsTaskMetadata]
tasks) (\s :: ListAuditMitigationActionsTasksResponse
s@ListAuditMitigationActionsTasksResponse' {} Maybe [AuditMitigationActionsTaskMetadata]
a -> ListAuditMitigationActionsTasksResponse
s {$sel:tasks:ListAuditMitigationActionsTasksResponse' :: Maybe [AuditMitigationActionsTaskMetadata]
tasks = Maybe [AuditMitigationActionsTaskMetadata]
a} :: ListAuditMitigationActionsTasksResponse) ((Maybe [AuditMitigationActionsTaskMetadata]
-> f (Maybe [AuditMitigationActionsTaskMetadata]))
-> ListAuditMitigationActionsTasksResponse
-> f ListAuditMitigationActionsTasksResponse)
-> ((Maybe [AuditMitigationActionsTaskMetadata]
-> f (Maybe [AuditMitigationActionsTaskMetadata]))
-> Maybe [AuditMitigationActionsTaskMetadata]
-> f (Maybe [AuditMitigationActionsTaskMetadata]))
-> (Maybe [AuditMitigationActionsTaskMetadata]
-> f (Maybe [AuditMitigationActionsTaskMetadata]))
-> ListAuditMitigationActionsTasksResponse
-> f ListAuditMitigationActionsTasksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AuditMitigationActionsTaskMetadata]
[AuditMitigationActionsTaskMetadata]
[AuditMitigationActionsTaskMetadata]
[AuditMitigationActionsTaskMetadata]
-> Iso
(Maybe [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata])
(Maybe [AuditMitigationActionsTaskMetadata])
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
[AuditMitigationActionsTaskMetadata]
[AuditMitigationActionsTaskMetadata]
[AuditMitigationActionsTaskMetadata]
[AuditMitigationActionsTaskMetadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listAuditMitigationActionsTasksResponse_nextToken :: Lens.Lens' ListAuditMitigationActionsTasksResponse (Prelude.Maybe Prelude.Text)
listAuditMitigationActionsTasksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAuditMitigationActionsTasksResponse
-> f ListAuditMitigationActionsTasksResponse
listAuditMitigationActionsTasksResponse_nextToken = (ListAuditMitigationActionsTasksResponse -> Maybe Text)
-> (ListAuditMitigationActionsTasksResponse
-> Maybe Text -> ListAuditMitigationActionsTasksResponse)
-> Lens' ListAuditMitigationActionsTasksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAuditMitigationActionsTasksResponse' :: ListAuditMitigationActionsTasksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAuditMitigationActionsTasksResponse
s@ListAuditMitigationActionsTasksResponse' {} Maybe Text
a -> ListAuditMitigationActionsTasksResponse
s {$sel:nextToken:ListAuditMitigationActionsTasksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAuditMitigationActionsTasksResponse)
listAuditMitigationActionsTasksResponse_httpStatus :: Lens.Lens' ListAuditMitigationActionsTasksResponse Prelude.Int
listAuditMitigationActionsTasksResponse_httpStatus :: (Int -> f Int)
-> ListAuditMitigationActionsTasksResponse
-> f ListAuditMitigationActionsTasksResponse
listAuditMitigationActionsTasksResponse_httpStatus = (ListAuditMitigationActionsTasksResponse -> Int)
-> (ListAuditMitigationActionsTasksResponse
-> Int -> ListAuditMitigationActionsTasksResponse)
-> Lens
ListAuditMitigationActionsTasksResponse
ListAuditMitigationActionsTasksResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAuditMitigationActionsTasksResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAuditMitigationActionsTasksResponse' :: ListAuditMitigationActionsTasksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAuditMitigationActionsTasksResponse
s@ListAuditMitigationActionsTasksResponse' {} Int
a -> ListAuditMitigationActionsTasksResponse
s {$sel:httpStatus:ListAuditMitigationActionsTasksResponse' :: Int
httpStatus = Int
a} :: ListAuditMitigationActionsTasksResponse)
instance
Prelude.NFData
ListAuditMitigationActionsTasksResponse