{-# 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.ListJobExecutionsForThing
(
ListJobExecutionsForThing (..),
newListJobExecutionsForThing,
listJobExecutionsForThing_status,
listJobExecutionsForThing_namespaceId,
listJobExecutionsForThing_nextToken,
listJobExecutionsForThing_maxResults,
listJobExecutionsForThing_thingName,
ListJobExecutionsForThingResponse (..),
newListJobExecutionsForThingResponse,
listJobExecutionsForThingResponse_executionSummaries,
listJobExecutionsForThingResponse_nextToken,
listJobExecutionsForThingResponse_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 ListJobExecutionsForThing = ListJobExecutionsForThing'
{
ListJobExecutionsForThing -> Maybe JobExecutionStatus
status :: Prelude.Maybe JobExecutionStatus,
ListJobExecutionsForThing -> Maybe Text
namespaceId :: Prelude.Maybe Prelude.Text,
ListJobExecutionsForThing -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListJobExecutionsForThing -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListJobExecutionsForThing -> Text
thingName :: Prelude.Text
}
deriving (ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool
(ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool)
-> (ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool)
-> Eq ListJobExecutionsForThing
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool
$c/= :: ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool
== :: ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool
$c== :: ListJobExecutionsForThing -> ListJobExecutionsForThing -> Bool
Prelude.Eq, ReadPrec [ListJobExecutionsForThing]
ReadPrec ListJobExecutionsForThing
Int -> ReadS ListJobExecutionsForThing
ReadS [ListJobExecutionsForThing]
(Int -> ReadS ListJobExecutionsForThing)
-> ReadS [ListJobExecutionsForThing]
-> ReadPrec ListJobExecutionsForThing
-> ReadPrec [ListJobExecutionsForThing]
-> Read ListJobExecutionsForThing
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobExecutionsForThing]
$creadListPrec :: ReadPrec [ListJobExecutionsForThing]
readPrec :: ReadPrec ListJobExecutionsForThing
$creadPrec :: ReadPrec ListJobExecutionsForThing
readList :: ReadS [ListJobExecutionsForThing]
$creadList :: ReadS [ListJobExecutionsForThing]
readsPrec :: Int -> ReadS ListJobExecutionsForThing
$creadsPrec :: Int -> ReadS ListJobExecutionsForThing
Prelude.Read, Int -> ListJobExecutionsForThing -> ShowS
[ListJobExecutionsForThing] -> ShowS
ListJobExecutionsForThing -> String
(Int -> ListJobExecutionsForThing -> ShowS)
-> (ListJobExecutionsForThing -> String)
-> ([ListJobExecutionsForThing] -> ShowS)
-> Show ListJobExecutionsForThing
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobExecutionsForThing] -> ShowS
$cshowList :: [ListJobExecutionsForThing] -> ShowS
show :: ListJobExecutionsForThing -> String
$cshow :: ListJobExecutionsForThing -> String
showsPrec :: Int -> ListJobExecutionsForThing -> ShowS
$cshowsPrec :: Int -> ListJobExecutionsForThing -> ShowS
Prelude.Show, (forall x.
ListJobExecutionsForThing -> Rep ListJobExecutionsForThing x)
-> (forall x.
Rep ListJobExecutionsForThing x -> ListJobExecutionsForThing)
-> Generic ListJobExecutionsForThing
forall x.
Rep ListJobExecutionsForThing x -> ListJobExecutionsForThing
forall x.
ListJobExecutionsForThing -> Rep ListJobExecutionsForThing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJobExecutionsForThing x -> ListJobExecutionsForThing
$cfrom :: forall x.
ListJobExecutionsForThing -> Rep ListJobExecutionsForThing x
Prelude.Generic)
newListJobExecutionsForThing ::
Prelude.Text ->
ListJobExecutionsForThing
newListJobExecutionsForThing :: Text -> ListJobExecutionsForThing
newListJobExecutionsForThing Text
pThingName_ =
ListJobExecutionsForThing' :: Maybe JobExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> ListJobExecutionsForThing
ListJobExecutionsForThing'
{ $sel:status:ListJobExecutionsForThing' :: Maybe JobExecutionStatus
status =
Maybe JobExecutionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceId:ListJobExecutionsForThing' :: Maybe Text
namespaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListJobExecutionsForThing' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListJobExecutionsForThing' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:thingName:ListJobExecutionsForThing' :: Text
thingName = Text
pThingName_
}
listJobExecutionsForThing_status :: Lens.Lens' ListJobExecutionsForThing (Prelude.Maybe JobExecutionStatus)
listJobExecutionsForThing_status :: (Maybe JobExecutionStatus -> f (Maybe JobExecutionStatus))
-> ListJobExecutionsForThing -> f ListJobExecutionsForThing
listJobExecutionsForThing_status = (ListJobExecutionsForThing -> Maybe JobExecutionStatus)
-> (ListJobExecutionsForThing
-> Maybe JobExecutionStatus -> ListJobExecutionsForThing)
-> Lens
ListJobExecutionsForThing
ListJobExecutionsForThing
(Maybe JobExecutionStatus)
(Maybe JobExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThing' {Maybe JobExecutionStatus
status :: Maybe JobExecutionStatus
$sel:status:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe JobExecutionStatus
status} -> Maybe JobExecutionStatus
status) (\s :: ListJobExecutionsForThing
s@ListJobExecutionsForThing' {} Maybe JobExecutionStatus
a -> ListJobExecutionsForThing
s {$sel:status:ListJobExecutionsForThing' :: Maybe JobExecutionStatus
status = Maybe JobExecutionStatus
a} :: ListJobExecutionsForThing)
listJobExecutionsForThing_namespaceId :: Lens.Lens' ListJobExecutionsForThing (Prelude.Maybe Prelude.Text)
listJobExecutionsForThing_namespaceId :: (Maybe Text -> f (Maybe Text))
-> ListJobExecutionsForThing -> f ListJobExecutionsForThing
listJobExecutionsForThing_namespaceId = (ListJobExecutionsForThing -> Maybe Text)
-> (ListJobExecutionsForThing
-> Maybe Text -> ListJobExecutionsForThing)
-> Lens
ListJobExecutionsForThing
ListJobExecutionsForThing
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThing' {Maybe Text
namespaceId :: Maybe Text
$sel:namespaceId:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Text
namespaceId} -> Maybe Text
namespaceId) (\s :: ListJobExecutionsForThing
s@ListJobExecutionsForThing' {} Maybe Text
a -> ListJobExecutionsForThing
s {$sel:namespaceId:ListJobExecutionsForThing' :: Maybe Text
namespaceId = Maybe Text
a} :: ListJobExecutionsForThing)
listJobExecutionsForThing_nextToken :: Lens.Lens' ListJobExecutionsForThing (Prelude.Maybe Prelude.Text)
listJobExecutionsForThing_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListJobExecutionsForThing -> f ListJobExecutionsForThing
listJobExecutionsForThing_nextToken = (ListJobExecutionsForThing -> Maybe Text)
-> (ListJobExecutionsForThing
-> Maybe Text -> ListJobExecutionsForThing)
-> Lens
ListJobExecutionsForThing
ListJobExecutionsForThing
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThing' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobExecutionsForThing
s@ListJobExecutionsForThing' {} Maybe Text
a -> ListJobExecutionsForThing
s {$sel:nextToken:ListJobExecutionsForThing' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobExecutionsForThing)
listJobExecutionsForThing_maxResults :: Lens.Lens' ListJobExecutionsForThing (Prelude.Maybe Prelude.Natural)
listJobExecutionsForThing_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListJobExecutionsForThing -> f ListJobExecutionsForThing
listJobExecutionsForThing_maxResults = (ListJobExecutionsForThing -> Maybe Natural)
-> (ListJobExecutionsForThing
-> Maybe Natural -> ListJobExecutionsForThing)
-> Lens
ListJobExecutionsForThing
ListJobExecutionsForThing
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThing' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListJobExecutionsForThing
s@ListJobExecutionsForThing' {} Maybe Natural
a -> ListJobExecutionsForThing
s {$sel:maxResults:ListJobExecutionsForThing' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListJobExecutionsForThing)
listJobExecutionsForThing_thingName :: Lens.Lens' ListJobExecutionsForThing Prelude.Text
listJobExecutionsForThing_thingName :: (Text -> f Text)
-> ListJobExecutionsForThing -> f ListJobExecutionsForThing
listJobExecutionsForThing_thingName = (ListJobExecutionsForThing -> Text)
-> (ListJobExecutionsForThing -> Text -> ListJobExecutionsForThing)
-> Lens
ListJobExecutionsForThing ListJobExecutionsForThing Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThing' {Text
thingName :: Text
$sel:thingName:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Text
thingName} -> Text
thingName) (\s :: ListJobExecutionsForThing
s@ListJobExecutionsForThing' {} Text
a -> ListJobExecutionsForThing
s {$sel:thingName:ListJobExecutionsForThing' :: Text
thingName = Text
a} :: ListJobExecutionsForThing)
instance Core.AWSPager ListJobExecutionsForThing where
page :: ListJobExecutionsForThing
-> AWSResponse ListJobExecutionsForThing
-> Maybe ListJobExecutionsForThing
page ListJobExecutionsForThing
rq AWSResponse ListJobExecutionsForThing
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListJobExecutionsForThing
ListJobExecutionsForThingResponse
rs
ListJobExecutionsForThingResponse
-> Getting (First Text) ListJobExecutionsForThingResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobExecutionsForThingResponse
-> Const (First Text) ListJobExecutionsForThingResponse
Lens' ListJobExecutionsForThingResponse (Maybe Text)
listJobExecutionsForThingResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobExecutionsForThingResponse
-> Const (First Text) ListJobExecutionsForThingResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListJobExecutionsForThingResponse 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 ListJobExecutionsForThing
forall a. Maybe a
Prelude.Nothing
| Maybe [JobExecutionSummaryForThing] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListJobExecutionsForThing
ListJobExecutionsForThingResponse
rs
ListJobExecutionsForThingResponse
-> Getting
(First [JobExecutionSummaryForThing])
ListJobExecutionsForThingResponse
[JobExecutionSummaryForThing]
-> Maybe [JobExecutionSummaryForThing]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [JobExecutionSummaryForThing]
-> Const
(First [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing]))
-> ListJobExecutionsForThingResponse
-> Const
(First [JobExecutionSummaryForThing])
ListJobExecutionsForThingResponse
Lens'
ListJobExecutionsForThingResponse
(Maybe [JobExecutionSummaryForThing])
listJobExecutionsForThingResponse_executionSummaries
((Maybe [JobExecutionSummaryForThing]
-> Const
(First [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing]))
-> ListJobExecutionsForThingResponse
-> Const
(First [JobExecutionSummaryForThing])
ListJobExecutionsForThingResponse)
-> (([JobExecutionSummaryForThing]
-> Const
(First [JobExecutionSummaryForThing])
[JobExecutionSummaryForThing])
-> Maybe [JobExecutionSummaryForThing]
-> Const
(First [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing]))
-> Getting
(First [JobExecutionSummaryForThing])
ListJobExecutionsForThingResponse
[JobExecutionSummaryForThing]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([JobExecutionSummaryForThing]
-> Const
(First [JobExecutionSummaryForThing])
[JobExecutionSummaryForThing])
-> Maybe [JobExecutionSummaryForThing]
-> Const
(First [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListJobExecutionsForThing
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListJobExecutionsForThing -> Maybe ListJobExecutionsForThing
forall a. a -> Maybe a
Prelude.Just (ListJobExecutionsForThing -> Maybe ListJobExecutionsForThing)
-> ListJobExecutionsForThing -> Maybe ListJobExecutionsForThing
forall a b. (a -> b) -> a -> b
Prelude.$
ListJobExecutionsForThing
rq
ListJobExecutionsForThing
-> (ListJobExecutionsForThing -> ListJobExecutionsForThing)
-> ListJobExecutionsForThing
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListJobExecutionsForThing -> Identity ListJobExecutionsForThing
Lens
ListJobExecutionsForThing
ListJobExecutionsForThing
(Maybe Text)
(Maybe Text)
listJobExecutionsForThing_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListJobExecutionsForThing -> Identity ListJobExecutionsForThing)
-> Maybe Text
-> ListJobExecutionsForThing
-> ListJobExecutionsForThing
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListJobExecutionsForThing
ListJobExecutionsForThingResponse
rs
ListJobExecutionsForThingResponse
-> Getting (First Text) ListJobExecutionsForThingResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobExecutionsForThingResponse
-> Const (First Text) ListJobExecutionsForThingResponse
Lens' ListJobExecutionsForThingResponse (Maybe Text)
listJobExecutionsForThingResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobExecutionsForThingResponse
-> Const (First Text) ListJobExecutionsForThingResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListJobExecutionsForThingResponse 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 ListJobExecutionsForThing where
type
AWSResponse ListJobExecutionsForThing =
ListJobExecutionsForThingResponse
request :: ListJobExecutionsForThing -> Request ListJobExecutionsForThing
request = Service
-> ListJobExecutionsForThing -> Request ListJobExecutionsForThing
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListJobExecutionsForThing
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListJobExecutionsForThing)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListJobExecutionsForThing))
-> Logger
-> Service
-> Proxy ListJobExecutionsForThing
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListJobExecutionsForThing)))
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 [JobExecutionSummaryForThing]
-> Maybe Text -> Int -> ListJobExecutionsForThingResponse
ListJobExecutionsForThingResponse'
(Maybe [JobExecutionSummaryForThing]
-> Maybe Text -> Int -> ListJobExecutionsForThingResponse)
-> Either String (Maybe [JobExecutionSummaryForThing])
-> Either
String (Maybe Text -> Int -> ListJobExecutionsForThingResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [JobExecutionSummaryForThing]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"executionSummaries"
Either String (Maybe (Maybe [JobExecutionSummaryForThing]))
-> Maybe [JobExecutionSummaryForThing]
-> Either String (Maybe [JobExecutionSummaryForThing])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [JobExecutionSummaryForThing]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Maybe Text -> Int -> ListJobExecutionsForThingResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListJobExecutionsForThingResponse)
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 -> ListJobExecutionsForThingResponse)
-> Either String Int
-> Either String ListJobExecutionsForThingResponse
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 ListJobExecutionsForThing
instance Prelude.NFData ListJobExecutionsForThing
instance Core.ToHeaders ListJobExecutionsForThing where
toHeaders :: ListJobExecutionsForThing -> ResponseHeaders
toHeaders = ResponseHeaders -> ListJobExecutionsForThing -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListJobExecutionsForThing where
toPath :: ListJobExecutionsForThing -> ByteString
toPath ListJobExecutionsForThing' {Maybe Natural
Maybe Text
Maybe JobExecutionStatus
Text
thingName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
namespaceId :: Maybe Text
status :: Maybe JobExecutionStatus
$sel:thingName:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Text
$sel:maxResults:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Natural
$sel:nextToken:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Text
$sel:namespaceId:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Text
$sel:status:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe JobExecutionStatus
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/things/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
thingName, ByteString
"/jobs"]
instance Core.ToQuery ListJobExecutionsForThing where
toQuery :: ListJobExecutionsForThing -> QueryString
toQuery ListJobExecutionsForThing' {Maybe Natural
Maybe Text
Maybe JobExecutionStatus
Text
thingName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
namespaceId :: Maybe Text
status :: Maybe JobExecutionStatus
$sel:thingName:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Text
$sel:maxResults:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Natural
$sel:nextToken:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Text
$sel:namespaceId:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe Text
$sel:status:ListJobExecutionsForThing' :: ListJobExecutionsForThing -> Maybe JobExecutionStatus
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"status" ByteString -> Maybe JobExecutionStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe JobExecutionStatus
status,
ByteString
"namespaceId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
namespaceId,
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListJobExecutionsForThingResponse = ListJobExecutionsForThingResponse'
{
ListJobExecutionsForThingResponse
-> Maybe [JobExecutionSummaryForThing]
executionSummaries :: Prelude.Maybe [JobExecutionSummaryForThing],
ListJobExecutionsForThingResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListJobExecutionsForThingResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool
(ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool)
-> (ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool)
-> Eq ListJobExecutionsForThingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool
$c/= :: ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool
== :: ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool
$c== :: ListJobExecutionsForThingResponse
-> ListJobExecutionsForThingResponse -> Bool
Prelude.Eq, ReadPrec [ListJobExecutionsForThingResponse]
ReadPrec ListJobExecutionsForThingResponse
Int -> ReadS ListJobExecutionsForThingResponse
ReadS [ListJobExecutionsForThingResponse]
(Int -> ReadS ListJobExecutionsForThingResponse)
-> ReadS [ListJobExecutionsForThingResponse]
-> ReadPrec ListJobExecutionsForThingResponse
-> ReadPrec [ListJobExecutionsForThingResponse]
-> Read ListJobExecutionsForThingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobExecutionsForThingResponse]
$creadListPrec :: ReadPrec [ListJobExecutionsForThingResponse]
readPrec :: ReadPrec ListJobExecutionsForThingResponse
$creadPrec :: ReadPrec ListJobExecutionsForThingResponse
readList :: ReadS [ListJobExecutionsForThingResponse]
$creadList :: ReadS [ListJobExecutionsForThingResponse]
readsPrec :: Int -> ReadS ListJobExecutionsForThingResponse
$creadsPrec :: Int -> ReadS ListJobExecutionsForThingResponse
Prelude.Read, Int -> ListJobExecutionsForThingResponse -> ShowS
[ListJobExecutionsForThingResponse] -> ShowS
ListJobExecutionsForThingResponse -> String
(Int -> ListJobExecutionsForThingResponse -> ShowS)
-> (ListJobExecutionsForThingResponse -> String)
-> ([ListJobExecutionsForThingResponse] -> ShowS)
-> Show ListJobExecutionsForThingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobExecutionsForThingResponse] -> ShowS
$cshowList :: [ListJobExecutionsForThingResponse] -> ShowS
show :: ListJobExecutionsForThingResponse -> String
$cshow :: ListJobExecutionsForThingResponse -> String
showsPrec :: Int -> ListJobExecutionsForThingResponse -> ShowS
$cshowsPrec :: Int -> ListJobExecutionsForThingResponse -> ShowS
Prelude.Show, (forall x.
ListJobExecutionsForThingResponse
-> Rep ListJobExecutionsForThingResponse x)
-> (forall x.
Rep ListJobExecutionsForThingResponse x
-> ListJobExecutionsForThingResponse)
-> Generic ListJobExecutionsForThingResponse
forall x.
Rep ListJobExecutionsForThingResponse x
-> ListJobExecutionsForThingResponse
forall x.
ListJobExecutionsForThingResponse
-> Rep ListJobExecutionsForThingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJobExecutionsForThingResponse x
-> ListJobExecutionsForThingResponse
$cfrom :: forall x.
ListJobExecutionsForThingResponse
-> Rep ListJobExecutionsForThingResponse x
Prelude.Generic)
newListJobExecutionsForThingResponse ::
Prelude.Int ->
ListJobExecutionsForThingResponse
newListJobExecutionsForThingResponse :: Int -> ListJobExecutionsForThingResponse
newListJobExecutionsForThingResponse Int
pHttpStatus_ =
ListJobExecutionsForThingResponse' :: Maybe [JobExecutionSummaryForThing]
-> Maybe Text -> Int -> ListJobExecutionsForThingResponse
ListJobExecutionsForThingResponse'
{ $sel:executionSummaries:ListJobExecutionsForThingResponse' :: Maybe [JobExecutionSummaryForThing]
executionSummaries =
Maybe [JobExecutionSummaryForThing]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListJobExecutionsForThingResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListJobExecutionsForThingResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listJobExecutionsForThingResponse_executionSummaries :: Lens.Lens' ListJobExecutionsForThingResponse (Prelude.Maybe [JobExecutionSummaryForThing])
listJobExecutionsForThingResponse_executionSummaries :: (Maybe [JobExecutionSummaryForThing]
-> f (Maybe [JobExecutionSummaryForThing]))
-> ListJobExecutionsForThingResponse
-> f ListJobExecutionsForThingResponse
listJobExecutionsForThingResponse_executionSummaries = (ListJobExecutionsForThingResponse
-> Maybe [JobExecutionSummaryForThing])
-> (ListJobExecutionsForThingResponse
-> Maybe [JobExecutionSummaryForThing]
-> ListJobExecutionsForThingResponse)
-> Lens'
ListJobExecutionsForThingResponse
(Maybe [JobExecutionSummaryForThing])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThingResponse' {Maybe [JobExecutionSummaryForThing]
executionSummaries :: Maybe [JobExecutionSummaryForThing]
$sel:executionSummaries:ListJobExecutionsForThingResponse' :: ListJobExecutionsForThingResponse
-> Maybe [JobExecutionSummaryForThing]
executionSummaries} -> Maybe [JobExecutionSummaryForThing]
executionSummaries) (\s :: ListJobExecutionsForThingResponse
s@ListJobExecutionsForThingResponse' {} Maybe [JobExecutionSummaryForThing]
a -> ListJobExecutionsForThingResponse
s {$sel:executionSummaries:ListJobExecutionsForThingResponse' :: Maybe [JobExecutionSummaryForThing]
executionSummaries = Maybe [JobExecutionSummaryForThing]
a} :: ListJobExecutionsForThingResponse) ((Maybe [JobExecutionSummaryForThing]
-> f (Maybe [JobExecutionSummaryForThing]))
-> ListJobExecutionsForThingResponse
-> f ListJobExecutionsForThingResponse)
-> ((Maybe [JobExecutionSummaryForThing]
-> f (Maybe [JobExecutionSummaryForThing]))
-> Maybe [JobExecutionSummaryForThing]
-> f (Maybe [JobExecutionSummaryForThing]))
-> (Maybe [JobExecutionSummaryForThing]
-> f (Maybe [JobExecutionSummaryForThing]))
-> ListJobExecutionsForThingResponse
-> f ListJobExecutionsForThingResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[JobExecutionSummaryForThing]
[JobExecutionSummaryForThing]
[JobExecutionSummaryForThing]
[JobExecutionSummaryForThing]
-> Iso
(Maybe [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing])
(Maybe [JobExecutionSummaryForThing])
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
[JobExecutionSummaryForThing]
[JobExecutionSummaryForThing]
[JobExecutionSummaryForThing]
[JobExecutionSummaryForThing]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listJobExecutionsForThingResponse_nextToken :: Lens.Lens' ListJobExecutionsForThingResponse (Prelude.Maybe Prelude.Text)
listJobExecutionsForThingResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListJobExecutionsForThingResponse
-> f ListJobExecutionsForThingResponse
listJobExecutionsForThingResponse_nextToken = (ListJobExecutionsForThingResponse -> Maybe Text)
-> (ListJobExecutionsForThingResponse
-> Maybe Text -> ListJobExecutionsForThingResponse)
-> Lens' ListJobExecutionsForThingResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThingResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobExecutionsForThingResponse' :: ListJobExecutionsForThingResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobExecutionsForThingResponse
s@ListJobExecutionsForThingResponse' {} Maybe Text
a -> ListJobExecutionsForThingResponse
s {$sel:nextToken:ListJobExecutionsForThingResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobExecutionsForThingResponse)
listJobExecutionsForThingResponse_httpStatus :: Lens.Lens' ListJobExecutionsForThingResponse Prelude.Int
listJobExecutionsForThingResponse_httpStatus :: (Int -> f Int)
-> ListJobExecutionsForThingResponse
-> f ListJobExecutionsForThingResponse
listJobExecutionsForThingResponse_httpStatus = (ListJobExecutionsForThingResponse -> Int)
-> (ListJobExecutionsForThingResponse
-> Int -> ListJobExecutionsForThingResponse)
-> Lens
ListJobExecutionsForThingResponse
ListJobExecutionsForThingResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForThingResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListJobExecutionsForThingResponse' :: ListJobExecutionsForThingResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListJobExecutionsForThingResponse
s@ListJobExecutionsForThingResponse' {} Int
a -> ListJobExecutionsForThingResponse
s {$sel:httpStatus:ListJobExecutionsForThingResponse' :: Int
httpStatus = Int
a} :: ListJobExecutionsForThingResponse)
instance
Prelude.NFData
ListJobExecutionsForThingResponse