{-# 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.ListDetectMitigationActionsExecutions
(
ListDetectMitigationActionsExecutions (..),
newListDetectMitigationActionsExecutions,
listDetectMitigationActionsExecutions_startTime,
listDetectMitigationActionsExecutions_taskId,
listDetectMitigationActionsExecutions_violationId,
listDetectMitigationActionsExecutions_nextToken,
listDetectMitigationActionsExecutions_endTime,
listDetectMitigationActionsExecutions_thingName,
listDetectMitigationActionsExecutions_maxResults,
ListDetectMitigationActionsExecutionsResponse (..),
newListDetectMitigationActionsExecutionsResponse,
listDetectMitigationActionsExecutionsResponse_actionsExecutions,
listDetectMitigationActionsExecutionsResponse_nextToken,
listDetectMitigationActionsExecutionsResponse_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 ListDetectMitigationActionsExecutions = ListDetectMitigationActionsExecutions'
{
ListDetectMitigationActionsExecutions -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
ListDetectMitigationActionsExecutions -> Maybe Text
taskId :: Prelude.Maybe Prelude.Text,
ListDetectMitigationActionsExecutions -> Maybe Text
violationId :: Prelude.Maybe Prelude.Text,
ListDetectMitigationActionsExecutions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDetectMitigationActionsExecutions -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
ListDetectMitigationActionsExecutions -> Maybe Text
thingName :: Prelude.Maybe Prelude.Text,
ListDetectMitigationActionsExecutions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool
(ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool)
-> (ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool)
-> Eq ListDetectMitigationActionsExecutions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool
$c/= :: ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool
== :: ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool
$c== :: ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions -> Bool
Prelude.Eq, ReadPrec [ListDetectMitigationActionsExecutions]
ReadPrec ListDetectMitigationActionsExecutions
Int -> ReadS ListDetectMitigationActionsExecutions
ReadS [ListDetectMitigationActionsExecutions]
(Int -> ReadS ListDetectMitigationActionsExecutions)
-> ReadS [ListDetectMitigationActionsExecutions]
-> ReadPrec ListDetectMitigationActionsExecutions
-> ReadPrec [ListDetectMitigationActionsExecutions]
-> Read ListDetectMitigationActionsExecutions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDetectMitigationActionsExecutions]
$creadListPrec :: ReadPrec [ListDetectMitigationActionsExecutions]
readPrec :: ReadPrec ListDetectMitigationActionsExecutions
$creadPrec :: ReadPrec ListDetectMitigationActionsExecutions
readList :: ReadS [ListDetectMitigationActionsExecutions]
$creadList :: ReadS [ListDetectMitigationActionsExecutions]
readsPrec :: Int -> ReadS ListDetectMitigationActionsExecutions
$creadsPrec :: Int -> ReadS ListDetectMitigationActionsExecutions
Prelude.Read, Int -> ListDetectMitigationActionsExecutions -> ShowS
[ListDetectMitigationActionsExecutions] -> ShowS
ListDetectMitigationActionsExecutions -> String
(Int -> ListDetectMitigationActionsExecutions -> ShowS)
-> (ListDetectMitigationActionsExecutions -> String)
-> ([ListDetectMitigationActionsExecutions] -> ShowS)
-> Show ListDetectMitigationActionsExecutions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDetectMitigationActionsExecutions] -> ShowS
$cshowList :: [ListDetectMitigationActionsExecutions] -> ShowS
show :: ListDetectMitigationActionsExecutions -> String
$cshow :: ListDetectMitigationActionsExecutions -> String
showsPrec :: Int -> ListDetectMitigationActionsExecutions -> ShowS
$cshowsPrec :: Int -> ListDetectMitigationActionsExecutions -> ShowS
Prelude.Show, (forall x.
ListDetectMitigationActionsExecutions
-> Rep ListDetectMitigationActionsExecutions x)
-> (forall x.
Rep ListDetectMitigationActionsExecutions x
-> ListDetectMitigationActionsExecutions)
-> Generic ListDetectMitigationActionsExecutions
forall x.
Rep ListDetectMitigationActionsExecutions x
-> ListDetectMitigationActionsExecutions
forall x.
ListDetectMitigationActionsExecutions
-> Rep ListDetectMitigationActionsExecutions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDetectMitigationActionsExecutions x
-> ListDetectMitigationActionsExecutions
$cfrom :: forall x.
ListDetectMitigationActionsExecutions
-> Rep ListDetectMitigationActionsExecutions x
Prelude.Generic)
newListDetectMitigationActionsExecutions ::
ListDetectMitigationActionsExecutions
newListDetectMitigationActionsExecutions :: ListDetectMitigationActionsExecutions
newListDetectMitigationActionsExecutions =
ListDetectMitigationActionsExecutions' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Natural
-> ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions'
{ $sel:startTime:ListDetectMitigationActionsExecutions' :: Maybe POSIX
startTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:taskId:ListDetectMitigationActionsExecutions' :: Maybe Text
taskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:violationId:ListDetectMitigationActionsExecutions' :: Maybe Text
violationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDetectMitigationActionsExecutions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:ListDetectMitigationActionsExecutions' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:thingName:ListDetectMitigationActionsExecutions' :: Maybe Text
thingName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListDetectMitigationActionsExecutions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listDetectMitigationActionsExecutions_startTime :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.UTCTime)
listDetectMitigationActionsExecutions_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_startTime = (ListDetectMitigationActionsExecutions -> Maybe POSIX)
-> (ListDetectMitigationActionsExecutions
-> Maybe POSIX -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe POSIX
a -> ListDetectMitigationActionsExecutions
s {$sel:startTime:ListDetectMitigationActionsExecutions' :: Maybe POSIX
startTime = Maybe POSIX
a} :: ListDetectMitigationActionsExecutions) ((Maybe POSIX -> f (Maybe POSIX))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
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
listDetectMitigationActionsExecutions_taskId :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.Text)
listDetectMitigationActionsExecutions_taskId :: (Maybe Text -> f (Maybe Text))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_taskId = (ListDetectMitigationActionsExecutions -> Maybe Text)
-> (ListDetectMitigationActionsExecutions
-> Maybe Text -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe Text
taskId :: Maybe Text
$sel:taskId:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
taskId} -> Maybe Text
taskId) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe Text
a -> ListDetectMitigationActionsExecutions
s {$sel:taskId:ListDetectMitigationActionsExecutions' :: Maybe Text
taskId = Maybe Text
a} :: ListDetectMitigationActionsExecutions)
listDetectMitigationActionsExecutions_violationId :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.Text)
listDetectMitigationActionsExecutions_violationId :: (Maybe Text -> f (Maybe Text))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_violationId = (ListDetectMitigationActionsExecutions -> Maybe Text)
-> (ListDetectMitigationActionsExecutions
-> Maybe Text -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe Text
violationId :: Maybe Text
$sel:violationId:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
violationId} -> Maybe Text
violationId) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe Text
a -> ListDetectMitigationActionsExecutions
s {$sel:violationId:ListDetectMitigationActionsExecutions' :: Maybe Text
violationId = Maybe Text
a} :: ListDetectMitigationActionsExecutions)
listDetectMitigationActionsExecutions_nextToken :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.Text)
listDetectMitigationActionsExecutions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_nextToken = (ListDetectMitigationActionsExecutions -> Maybe Text)
-> (ListDetectMitigationActionsExecutions
-> Maybe Text -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe Text
a -> ListDetectMitigationActionsExecutions
s {$sel:nextToken:ListDetectMitigationActionsExecutions' :: Maybe Text
nextToken = Maybe Text
a} :: ListDetectMitigationActionsExecutions)
listDetectMitigationActionsExecutions_endTime :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.UTCTime)
listDetectMitigationActionsExecutions_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_endTime = (ListDetectMitigationActionsExecutions -> Maybe POSIX)
-> (ListDetectMitigationActionsExecutions
-> Maybe POSIX -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe POSIX
a -> ListDetectMitigationActionsExecutions
s {$sel:endTime:ListDetectMitigationActionsExecutions' :: Maybe POSIX
endTime = Maybe POSIX
a} :: ListDetectMitigationActionsExecutions) ((Maybe POSIX -> f (Maybe POSIX))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
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
listDetectMitigationActionsExecutions_thingName :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.Text)
listDetectMitigationActionsExecutions_thingName :: (Maybe Text -> f (Maybe Text))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_thingName = (ListDetectMitigationActionsExecutions -> Maybe Text)
-> (ListDetectMitigationActionsExecutions
-> Maybe Text -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe Text
thingName :: Maybe Text
$sel:thingName:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
thingName} -> Maybe Text
thingName) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe Text
a -> ListDetectMitigationActionsExecutions
s {$sel:thingName:ListDetectMitigationActionsExecutions' :: Maybe Text
thingName = Maybe Text
a} :: ListDetectMitigationActionsExecutions)
listDetectMitigationActionsExecutions_maxResults :: Lens.Lens' ListDetectMitigationActionsExecutions (Prelude.Maybe Prelude.Natural)
listDetectMitigationActionsExecutions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDetectMitigationActionsExecutions
-> f ListDetectMitigationActionsExecutions
listDetectMitigationActionsExecutions_maxResults = (ListDetectMitigationActionsExecutions -> Maybe Natural)
-> (ListDetectMitigationActionsExecutions
-> Maybe Natural -> ListDetectMitigationActionsExecutions)
-> Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDetectMitigationActionsExecutions
s@ListDetectMitigationActionsExecutions' {} Maybe Natural
a -> ListDetectMitigationActionsExecutions
s {$sel:maxResults:ListDetectMitigationActionsExecutions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDetectMitigationActionsExecutions)
instance
Core.AWSPager
ListDetectMitigationActionsExecutions
where
page :: ListDetectMitigationActionsExecutions
-> AWSResponse ListDetectMitigationActionsExecutions
-> Maybe ListDetectMitigationActionsExecutions
page ListDetectMitigationActionsExecutions
rq AWSResponse ListDetectMitigationActionsExecutions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutionsResponse
rs
ListDetectMitigationActionsExecutionsResponse
-> Getting
(First Text) ListDetectMitigationActionsExecutionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDetectMitigationActionsExecutionsResponse
-> Const (First Text) ListDetectMitigationActionsExecutionsResponse
Lens' ListDetectMitigationActionsExecutionsResponse (Maybe Text)
listDetectMitigationActionsExecutionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListDetectMitigationActionsExecutionsResponse
-> Const
(First Text) ListDetectMitigationActionsExecutionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListDetectMitigationActionsExecutionsResponse 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 ListDetectMitigationActionsExecutions
forall a. Maybe a
Prelude.Nothing
| Maybe [DetectMitigationActionExecution] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutionsResponse
rs
ListDetectMitigationActionsExecutionsResponse
-> Getting
(First [DetectMitigationActionExecution])
ListDetectMitigationActionsExecutionsResponse
[DetectMitigationActionExecution]
-> Maybe [DetectMitigationActionExecution]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DetectMitigationActionExecution]
-> Const
(First [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution]))
-> ListDetectMitigationActionsExecutionsResponse
-> Const
(First [DetectMitigationActionExecution])
ListDetectMitigationActionsExecutionsResponse
Lens'
ListDetectMitigationActionsExecutionsResponse
(Maybe [DetectMitigationActionExecution])
listDetectMitigationActionsExecutionsResponse_actionsExecutions
((Maybe [DetectMitigationActionExecution]
-> Const
(First [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution]))
-> ListDetectMitigationActionsExecutionsResponse
-> Const
(First [DetectMitigationActionExecution])
ListDetectMitigationActionsExecutionsResponse)
-> (([DetectMitigationActionExecution]
-> Const
(First [DetectMitigationActionExecution])
[DetectMitigationActionExecution])
-> Maybe [DetectMitigationActionExecution]
-> Const
(First [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution]))
-> Getting
(First [DetectMitigationActionExecution])
ListDetectMitigationActionsExecutionsResponse
[DetectMitigationActionExecution]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DetectMitigationActionExecution]
-> Const
(First [DetectMitigationActionExecution])
[DetectMitigationActionExecution])
-> Maybe [DetectMitigationActionExecution]
-> Const
(First [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListDetectMitigationActionsExecutions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListDetectMitigationActionsExecutions
-> Maybe ListDetectMitigationActionsExecutions
forall a. a -> Maybe a
Prelude.Just (ListDetectMitigationActionsExecutions
-> Maybe ListDetectMitigationActionsExecutions)
-> ListDetectMitigationActionsExecutions
-> Maybe ListDetectMitigationActionsExecutions
forall a b. (a -> b) -> a -> b
Prelude.$
ListDetectMitigationActionsExecutions
rq
ListDetectMitigationActionsExecutions
-> (ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions)
-> ListDetectMitigationActionsExecutions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDetectMitigationActionsExecutions
-> Identity ListDetectMitigationActionsExecutions
Lens
ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutions
(Maybe Text)
(Maybe Text)
listDetectMitigationActionsExecutions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListDetectMitigationActionsExecutions
-> Identity ListDetectMitigationActionsExecutions)
-> Maybe Text
-> ListDetectMitigationActionsExecutions
-> ListDetectMitigationActionsExecutions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDetectMitigationActionsExecutions
ListDetectMitigationActionsExecutionsResponse
rs
ListDetectMitigationActionsExecutionsResponse
-> Getting
(First Text) ListDetectMitigationActionsExecutionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDetectMitigationActionsExecutionsResponse
-> Const (First Text) ListDetectMitigationActionsExecutionsResponse
Lens' ListDetectMitigationActionsExecutionsResponse (Maybe Text)
listDetectMitigationActionsExecutionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListDetectMitigationActionsExecutionsResponse
-> Const
(First Text) ListDetectMitigationActionsExecutionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListDetectMitigationActionsExecutionsResponse 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
ListDetectMitigationActionsExecutions
where
type
AWSResponse
ListDetectMitigationActionsExecutions =
ListDetectMitigationActionsExecutionsResponse
request :: ListDetectMitigationActionsExecutions
-> Request ListDetectMitigationActionsExecutions
request = Service
-> ListDetectMitigationActionsExecutions
-> Request ListDetectMitigationActionsExecutions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListDetectMitigationActionsExecutions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListDetectMitigationActionsExecutions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse ListDetectMitigationActionsExecutions))
-> Logger
-> Service
-> Proxy ListDetectMitigationActionsExecutions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListDetectMitigationActionsExecutions)))
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 [DetectMitigationActionExecution]
-> Maybe Text
-> Int
-> ListDetectMitigationActionsExecutionsResponse
ListDetectMitigationActionsExecutionsResponse'
(Maybe [DetectMitigationActionExecution]
-> Maybe Text
-> Int
-> ListDetectMitigationActionsExecutionsResponse)
-> Either String (Maybe [DetectMitigationActionExecution])
-> Either
String
(Maybe Text
-> Int -> ListDetectMitigationActionsExecutionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [DetectMitigationActionExecution]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"actionsExecutions"
Either String (Maybe (Maybe [DetectMitigationActionExecution]))
-> Maybe [DetectMitigationActionExecution]
-> Either String (Maybe [DetectMitigationActionExecution])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DetectMitigationActionExecution]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe Text
-> Int -> ListDetectMitigationActionsExecutionsResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> ListDetectMitigationActionsExecutionsResponse)
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 -> ListDetectMitigationActionsExecutionsResponse)
-> Either String Int
-> Either String ListDetectMitigationActionsExecutionsResponse
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
ListDetectMitigationActionsExecutions
instance
Prelude.NFData
ListDetectMitigationActionsExecutions
instance
Core.ToHeaders
ListDetectMitigationActionsExecutions
where
toHeaders :: ListDetectMitigationActionsExecutions -> ResponseHeaders
toHeaders = ResponseHeaders
-> ListDetectMitigationActionsExecutions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
ListDetectMitigationActionsExecutions
where
toPath :: ListDetectMitigationActionsExecutions -> ByteString
toPath =
ByteString -> ListDetectMitigationActionsExecutions -> ByteString
forall a b. a -> b -> a
Prelude.const
ByteString
"/detect/mitigationactions/executions"
instance
Core.ToQuery
ListDetectMitigationActionsExecutions
where
toQuery :: ListDetectMitigationActionsExecutions -> QueryString
toQuery ListDetectMitigationActionsExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
maxResults :: Maybe Natural
thingName :: Maybe Text
endTime :: Maybe POSIX
nextToken :: Maybe Text
violationId :: Maybe Text
taskId :: Maybe Text
startTime :: Maybe POSIX
$sel:maxResults:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Natural
$sel:thingName:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
$sel:endTime:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe POSIX
$sel:nextToken:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
$sel:violationId:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
$sel:taskId:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe Text
$sel:startTime:ListDetectMitigationActionsExecutions' :: ListDetectMitigationActionsExecutions -> Maybe POSIX
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"startTime" ByteString -> Maybe POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe POSIX
startTime,
ByteString
"taskId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
taskId,
ByteString
"violationId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
violationId,
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"endTime" ByteString -> Maybe POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe POSIX
endTime,
ByteString
"thingName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
thingName,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListDetectMitigationActionsExecutionsResponse = ListDetectMitigationActionsExecutionsResponse'
{
ListDetectMitigationActionsExecutionsResponse
-> Maybe [DetectMitigationActionExecution]
actionsExecutions :: Prelude.Maybe [DetectMitigationActionExecution],
ListDetectMitigationActionsExecutionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDetectMitigationActionsExecutionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool
(ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool)
-> (ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool)
-> Eq ListDetectMitigationActionsExecutionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool
$c/= :: ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool
== :: ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool
$c== :: ListDetectMitigationActionsExecutionsResponse
-> ListDetectMitigationActionsExecutionsResponse -> Bool
Prelude.Eq, ReadPrec [ListDetectMitigationActionsExecutionsResponse]
ReadPrec ListDetectMitigationActionsExecutionsResponse
Int -> ReadS ListDetectMitigationActionsExecutionsResponse
ReadS [ListDetectMitigationActionsExecutionsResponse]
(Int -> ReadS ListDetectMitigationActionsExecutionsResponse)
-> ReadS [ListDetectMitigationActionsExecutionsResponse]
-> ReadPrec ListDetectMitigationActionsExecutionsResponse
-> ReadPrec [ListDetectMitigationActionsExecutionsResponse]
-> Read ListDetectMitigationActionsExecutionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDetectMitigationActionsExecutionsResponse]
$creadListPrec :: ReadPrec [ListDetectMitigationActionsExecutionsResponse]
readPrec :: ReadPrec ListDetectMitigationActionsExecutionsResponse
$creadPrec :: ReadPrec ListDetectMitigationActionsExecutionsResponse
readList :: ReadS [ListDetectMitigationActionsExecutionsResponse]
$creadList :: ReadS [ListDetectMitigationActionsExecutionsResponse]
readsPrec :: Int -> ReadS ListDetectMitigationActionsExecutionsResponse
$creadsPrec :: Int -> ReadS ListDetectMitigationActionsExecutionsResponse
Prelude.Read, Int -> ListDetectMitigationActionsExecutionsResponse -> ShowS
[ListDetectMitigationActionsExecutionsResponse] -> ShowS
ListDetectMitigationActionsExecutionsResponse -> String
(Int -> ListDetectMitigationActionsExecutionsResponse -> ShowS)
-> (ListDetectMitigationActionsExecutionsResponse -> String)
-> ([ListDetectMitigationActionsExecutionsResponse] -> ShowS)
-> Show ListDetectMitigationActionsExecutionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDetectMitigationActionsExecutionsResponse] -> ShowS
$cshowList :: [ListDetectMitigationActionsExecutionsResponse] -> ShowS
show :: ListDetectMitigationActionsExecutionsResponse -> String
$cshow :: ListDetectMitigationActionsExecutionsResponse -> String
showsPrec :: Int -> ListDetectMitigationActionsExecutionsResponse -> ShowS
$cshowsPrec :: Int -> ListDetectMitigationActionsExecutionsResponse -> ShowS
Prelude.Show, (forall x.
ListDetectMitigationActionsExecutionsResponse
-> Rep ListDetectMitigationActionsExecutionsResponse x)
-> (forall x.
Rep ListDetectMitigationActionsExecutionsResponse x
-> ListDetectMitigationActionsExecutionsResponse)
-> Generic ListDetectMitigationActionsExecutionsResponse
forall x.
Rep ListDetectMitigationActionsExecutionsResponse x
-> ListDetectMitigationActionsExecutionsResponse
forall x.
ListDetectMitigationActionsExecutionsResponse
-> Rep ListDetectMitigationActionsExecutionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDetectMitigationActionsExecutionsResponse x
-> ListDetectMitigationActionsExecutionsResponse
$cfrom :: forall x.
ListDetectMitigationActionsExecutionsResponse
-> Rep ListDetectMitigationActionsExecutionsResponse x
Prelude.Generic)
newListDetectMitigationActionsExecutionsResponse ::
Prelude.Int ->
ListDetectMitigationActionsExecutionsResponse
newListDetectMitigationActionsExecutionsResponse :: Int -> ListDetectMitigationActionsExecutionsResponse
newListDetectMitigationActionsExecutionsResponse
Int
pHttpStatus_ =
ListDetectMitigationActionsExecutionsResponse' :: Maybe [DetectMitigationActionExecution]
-> Maybe Text
-> Int
-> ListDetectMitigationActionsExecutionsResponse
ListDetectMitigationActionsExecutionsResponse'
{ $sel:actionsExecutions:ListDetectMitigationActionsExecutionsResponse' :: Maybe [DetectMitigationActionExecution]
actionsExecutions =
Maybe [DetectMitigationActionExecution]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDetectMitigationActionsExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListDetectMitigationActionsExecutionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listDetectMitigationActionsExecutionsResponse_actionsExecutions :: Lens.Lens' ListDetectMitigationActionsExecutionsResponse (Prelude.Maybe [DetectMitigationActionExecution])
listDetectMitigationActionsExecutionsResponse_actionsExecutions :: (Maybe [DetectMitigationActionExecution]
-> f (Maybe [DetectMitigationActionExecution]))
-> ListDetectMitigationActionsExecutionsResponse
-> f ListDetectMitigationActionsExecutionsResponse
listDetectMitigationActionsExecutionsResponse_actionsExecutions = (ListDetectMitigationActionsExecutionsResponse
-> Maybe [DetectMitigationActionExecution])
-> (ListDetectMitigationActionsExecutionsResponse
-> Maybe [DetectMitigationActionExecution]
-> ListDetectMitigationActionsExecutionsResponse)
-> Lens'
ListDetectMitigationActionsExecutionsResponse
(Maybe [DetectMitigationActionExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutionsResponse' {Maybe [DetectMitigationActionExecution]
actionsExecutions :: Maybe [DetectMitigationActionExecution]
$sel:actionsExecutions:ListDetectMitigationActionsExecutionsResponse' :: ListDetectMitigationActionsExecutionsResponse
-> Maybe [DetectMitigationActionExecution]
actionsExecutions} -> Maybe [DetectMitigationActionExecution]
actionsExecutions) (\s :: ListDetectMitigationActionsExecutionsResponse
s@ListDetectMitigationActionsExecutionsResponse' {} Maybe [DetectMitigationActionExecution]
a -> ListDetectMitigationActionsExecutionsResponse
s {$sel:actionsExecutions:ListDetectMitigationActionsExecutionsResponse' :: Maybe [DetectMitigationActionExecution]
actionsExecutions = Maybe [DetectMitigationActionExecution]
a} :: ListDetectMitigationActionsExecutionsResponse) ((Maybe [DetectMitigationActionExecution]
-> f (Maybe [DetectMitigationActionExecution]))
-> ListDetectMitigationActionsExecutionsResponse
-> f ListDetectMitigationActionsExecutionsResponse)
-> ((Maybe [DetectMitigationActionExecution]
-> f (Maybe [DetectMitigationActionExecution]))
-> Maybe [DetectMitigationActionExecution]
-> f (Maybe [DetectMitigationActionExecution]))
-> (Maybe [DetectMitigationActionExecution]
-> f (Maybe [DetectMitigationActionExecution]))
-> ListDetectMitigationActionsExecutionsResponse
-> f ListDetectMitigationActionsExecutionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DetectMitigationActionExecution]
[DetectMitigationActionExecution]
[DetectMitigationActionExecution]
[DetectMitigationActionExecution]
-> Iso
(Maybe [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution])
(Maybe [DetectMitigationActionExecution])
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
[DetectMitigationActionExecution]
[DetectMitigationActionExecution]
[DetectMitigationActionExecution]
[DetectMitigationActionExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listDetectMitigationActionsExecutionsResponse_nextToken :: Lens.Lens' ListDetectMitigationActionsExecutionsResponse (Prelude.Maybe Prelude.Text)
listDetectMitigationActionsExecutionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDetectMitigationActionsExecutionsResponse
-> f ListDetectMitigationActionsExecutionsResponse
listDetectMitigationActionsExecutionsResponse_nextToken = (ListDetectMitigationActionsExecutionsResponse -> Maybe Text)
-> (ListDetectMitigationActionsExecutionsResponse
-> Maybe Text -> ListDetectMitigationActionsExecutionsResponse)
-> Lens' ListDetectMitigationActionsExecutionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDetectMitigationActionsExecutionsResponse' :: ListDetectMitigationActionsExecutionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDetectMitigationActionsExecutionsResponse
s@ListDetectMitigationActionsExecutionsResponse' {} Maybe Text
a -> ListDetectMitigationActionsExecutionsResponse
s {$sel:nextToken:ListDetectMitigationActionsExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDetectMitigationActionsExecutionsResponse)
listDetectMitigationActionsExecutionsResponse_httpStatus :: Lens.Lens' ListDetectMitigationActionsExecutionsResponse Prelude.Int
listDetectMitigationActionsExecutionsResponse_httpStatus :: (Int -> f Int)
-> ListDetectMitigationActionsExecutionsResponse
-> f ListDetectMitigationActionsExecutionsResponse
listDetectMitigationActionsExecutionsResponse_httpStatus = (ListDetectMitigationActionsExecutionsResponse -> Int)
-> (ListDetectMitigationActionsExecutionsResponse
-> Int -> ListDetectMitigationActionsExecutionsResponse)
-> Lens
ListDetectMitigationActionsExecutionsResponse
ListDetectMitigationActionsExecutionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectMitigationActionsExecutionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDetectMitigationActionsExecutionsResponse' :: ListDetectMitigationActionsExecutionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDetectMitigationActionsExecutionsResponse
s@ListDetectMitigationActionsExecutionsResponse' {} Int
a -> ListDetectMitigationActionsExecutionsResponse
s {$sel:httpStatus:ListDetectMitigationActionsExecutionsResponse' :: Int
httpStatus = Int
a} :: ListDetectMitigationActionsExecutionsResponse)
instance
Prelude.NFData
ListDetectMitigationActionsExecutionsResponse