{-# 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.ListJobs
(
ListJobs (..),
newListJobs,
listJobs_status,
listJobs_thingGroupId,
listJobs_namespaceId,
listJobs_nextToken,
listJobs_thingGroupName,
listJobs_maxResults,
listJobs_targetSelection,
ListJobsResponse (..),
newListJobsResponse,
listJobsResponse_jobs,
listJobsResponse_nextToken,
listJobsResponse_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 ListJobs = ListJobs'
{
ListJobs -> Maybe JobStatus
status :: Prelude.Maybe JobStatus,
ListJobs -> Maybe Text
thingGroupId :: Prelude.Maybe Prelude.Text,
ListJobs -> Maybe Text
namespaceId :: Prelude.Maybe Prelude.Text,
ListJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListJobs -> Maybe Text
thingGroupName :: Prelude.Maybe Prelude.Text,
ListJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListJobs -> Maybe TargetSelection
targetSelection :: Prelude.Maybe TargetSelection
}
deriving (ListJobs -> ListJobs -> Bool
(ListJobs -> ListJobs -> Bool)
-> (ListJobs -> ListJobs -> Bool) -> Eq ListJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobs -> ListJobs -> Bool
$c/= :: ListJobs -> ListJobs -> Bool
== :: ListJobs -> ListJobs -> Bool
$c== :: ListJobs -> ListJobs -> Bool
Prelude.Eq, ReadPrec [ListJobs]
ReadPrec ListJobs
Int -> ReadS ListJobs
ReadS [ListJobs]
(Int -> ReadS ListJobs)
-> ReadS [ListJobs]
-> ReadPrec ListJobs
-> ReadPrec [ListJobs]
-> Read ListJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobs]
$creadListPrec :: ReadPrec [ListJobs]
readPrec :: ReadPrec ListJobs
$creadPrec :: ReadPrec ListJobs
readList :: ReadS [ListJobs]
$creadList :: ReadS [ListJobs]
readsPrec :: Int -> ReadS ListJobs
$creadsPrec :: Int -> ReadS ListJobs
Prelude.Read, Int -> ListJobs -> ShowS
[ListJobs] -> ShowS
ListJobs -> String
(Int -> ListJobs -> ShowS)
-> (ListJobs -> String) -> ([ListJobs] -> ShowS) -> Show ListJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobs] -> ShowS
$cshowList :: [ListJobs] -> ShowS
show :: ListJobs -> String
$cshow :: ListJobs -> String
showsPrec :: Int -> ListJobs -> ShowS
$cshowsPrec :: Int -> ListJobs -> ShowS
Prelude.Show, (forall x. ListJobs -> Rep ListJobs x)
-> (forall x. Rep ListJobs x -> ListJobs) -> Generic ListJobs
forall x. Rep ListJobs x -> ListJobs
forall x. ListJobs -> Rep ListJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobs x -> ListJobs
$cfrom :: forall x. ListJobs -> Rep ListJobs x
Prelude.Generic)
newListJobs ::
ListJobs
newListJobs :: ListJobs
newListJobs =
ListJobs' :: Maybe JobStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe TargetSelection
-> ListJobs
ListJobs'
{ $sel:status:ListJobs' :: Maybe JobStatus
status = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupId:ListJobs' :: Maybe Text
thingGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceId:ListJobs' :: Maybe Text
namespaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupName:ListJobs' :: Maybe Text
thingGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:targetSelection:ListJobs' :: Maybe TargetSelection
targetSelection = Maybe TargetSelection
forall a. Maybe a
Prelude.Nothing
}
listJobs_status :: Lens.Lens' ListJobs (Prelude.Maybe JobStatus)
listJobs_status :: (Maybe JobStatus -> f (Maybe JobStatus)) -> ListJobs -> f ListJobs
listJobs_status = (ListJobs -> Maybe JobStatus)
-> (ListJobs -> Maybe JobStatus -> ListJobs)
-> Lens ListJobs ListJobs (Maybe JobStatus) (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe JobStatus
status :: Maybe JobStatus
$sel:status:ListJobs' :: ListJobs -> Maybe JobStatus
status} -> Maybe JobStatus
status) (\s :: ListJobs
s@ListJobs' {} Maybe JobStatus
a -> ListJobs
s {$sel:status:ListJobs' :: Maybe JobStatus
status = Maybe JobStatus
a} :: ListJobs)
listJobs_thingGroupId :: Lens.Lens' ListJobs (Prelude.Maybe Prelude.Text)
listJobs_thingGroupId :: (Maybe Text -> f (Maybe Text)) -> ListJobs -> f ListJobs
listJobs_thingGroupId = (ListJobs -> Maybe Text)
-> (ListJobs -> Maybe Text -> ListJobs)
-> Lens ListJobs ListJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe Text
thingGroupId :: Maybe Text
$sel:thingGroupId:ListJobs' :: ListJobs -> Maybe Text
thingGroupId} -> Maybe Text
thingGroupId) (\s :: ListJobs
s@ListJobs' {} Maybe Text
a -> ListJobs
s {$sel:thingGroupId:ListJobs' :: Maybe Text
thingGroupId = Maybe Text
a} :: ListJobs)
listJobs_namespaceId :: Lens.Lens' ListJobs (Prelude.Maybe Prelude.Text)
listJobs_namespaceId :: (Maybe Text -> f (Maybe Text)) -> ListJobs -> f ListJobs
listJobs_namespaceId = (ListJobs -> Maybe Text)
-> (ListJobs -> Maybe Text -> ListJobs)
-> Lens ListJobs ListJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe Text
namespaceId :: Maybe Text
$sel:namespaceId:ListJobs' :: ListJobs -> Maybe Text
namespaceId} -> Maybe Text
namespaceId) (\s :: ListJobs
s@ListJobs' {} Maybe Text
a -> ListJobs
s {$sel:namespaceId:ListJobs' :: Maybe Text
namespaceId = Maybe Text
a} :: ListJobs)
listJobs_nextToken :: Lens.Lens' ListJobs (Prelude.Maybe Prelude.Text)
listJobs_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListJobs -> f ListJobs
listJobs_nextToken = (ListJobs -> Maybe Text)
-> (ListJobs -> Maybe Text -> ListJobs)
-> Lens ListJobs ListJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobs' :: ListJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobs
s@ListJobs' {} Maybe Text
a -> ListJobs
s {$sel:nextToken:ListJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobs)
listJobs_thingGroupName :: Lens.Lens' ListJobs (Prelude.Maybe Prelude.Text)
listJobs_thingGroupName :: (Maybe Text -> f (Maybe Text)) -> ListJobs -> f ListJobs
listJobs_thingGroupName = (ListJobs -> Maybe Text)
-> (ListJobs -> Maybe Text -> ListJobs)
-> Lens ListJobs ListJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe Text
thingGroupName :: Maybe Text
$sel:thingGroupName:ListJobs' :: ListJobs -> Maybe Text
thingGroupName} -> Maybe Text
thingGroupName) (\s :: ListJobs
s@ListJobs' {} Maybe Text
a -> ListJobs
s {$sel:thingGroupName:ListJobs' :: Maybe Text
thingGroupName = Maybe Text
a} :: ListJobs)
listJobs_maxResults :: Lens.Lens' ListJobs (Prelude.Maybe Prelude.Natural)
listJobs_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListJobs -> f ListJobs
listJobs_maxResults = (ListJobs -> Maybe Natural)
-> (ListJobs -> Maybe Natural -> ListJobs)
-> Lens ListJobs ListJobs (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListJobs' :: ListJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListJobs
s@ListJobs' {} Maybe Natural
a -> ListJobs
s {$sel:maxResults:ListJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListJobs)
listJobs_targetSelection :: Lens.Lens' ListJobs (Prelude.Maybe TargetSelection)
listJobs_targetSelection :: (Maybe TargetSelection -> f (Maybe TargetSelection))
-> ListJobs -> f ListJobs
listJobs_targetSelection = (ListJobs -> Maybe TargetSelection)
-> (ListJobs -> Maybe TargetSelection -> ListJobs)
-> Lens
ListJobs ListJobs (Maybe TargetSelection) (Maybe TargetSelection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe TargetSelection
targetSelection :: Maybe TargetSelection
$sel:targetSelection:ListJobs' :: ListJobs -> Maybe TargetSelection
targetSelection} -> Maybe TargetSelection
targetSelection) (\s :: ListJobs
s@ListJobs' {} Maybe TargetSelection
a -> ListJobs
s {$sel:targetSelection:ListJobs' :: Maybe TargetSelection
targetSelection = Maybe TargetSelection
a} :: ListJobs)
instance Core.AWSPager ListJobs where
page :: ListJobs -> AWSResponse ListJobs -> Maybe ListJobs
page ListJobs
rq AWSResponse ListJobs
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListJobs
ListJobsResponse
rs
ListJobsResponse
-> Getting (First Text) ListJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobsResponse -> Const (First Text) ListJobsResponse
Lens' ListJobsResponse (Maybe Text)
listJobsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobsResponse -> Const (First Text) ListJobsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListJobsResponse 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 ListJobs
forall a. Maybe a
Prelude.Nothing
| Maybe [JobSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListJobs
ListJobsResponse
rs
ListJobsResponse
-> Getting (First [JobSummary]) ListJobsResponse [JobSummary]
-> Maybe [JobSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [JobSummary]
-> Const (First [JobSummary]) (Maybe [JobSummary]))
-> ListJobsResponse -> Const (First [JobSummary]) ListJobsResponse
Lens' ListJobsResponse (Maybe [JobSummary])
listJobsResponse_jobs ((Maybe [JobSummary]
-> Const (First [JobSummary]) (Maybe [JobSummary]))
-> ListJobsResponse -> Const (First [JobSummary]) ListJobsResponse)
-> (([JobSummary] -> Const (First [JobSummary]) [JobSummary])
-> Maybe [JobSummary]
-> Const (First [JobSummary]) (Maybe [JobSummary]))
-> Getting (First [JobSummary]) ListJobsResponse [JobSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([JobSummary] -> Const (First [JobSummary]) [JobSummary])
-> Maybe [JobSummary]
-> Const (First [JobSummary]) (Maybe [JobSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListJobs
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListJobs -> Maybe ListJobs
forall a. a -> Maybe a
Prelude.Just (ListJobs -> Maybe ListJobs) -> ListJobs -> Maybe ListJobs
forall a b. (a -> b) -> a -> b
Prelude.$
ListJobs
rq
ListJobs -> (ListJobs -> ListJobs) -> ListJobs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListJobs -> Identity ListJobs
Lens ListJobs ListJobs (Maybe Text) (Maybe Text)
listJobs_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListJobs -> Identity ListJobs)
-> Maybe Text -> ListJobs -> ListJobs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListJobs
ListJobsResponse
rs
ListJobsResponse
-> Getting (First Text) ListJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobsResponse -> Const (First Text) ListJobsResponse
Lens' ListJobsResponse (Maybe Text)
listJobsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListJobsResponse -> Const (First Text) ListJobsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListJobsResponse 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 ListJobs where
type AWSResponse ListJobs = ListJobsResponse
request :: ListJobs -> Request ListJobs
request = Service -> ListJobs -> Request ListJobs
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListJobs)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListJobs))
-> Logger
-> Service
-> Proxy ListJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListJobs)))
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 [JobSummary] -> Maybe Text -> Int -> ListJobsResponse
ListJobsResponse'
(Maybe [JobSummary] -> Maybe Text -> Int -> ListJobsResponse)
-> Either String (Maybe [JobSummary])
-> Either String (Maybe Text -> Int -> ListJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [JobSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobs" Either String (Maybe (Maybe [JobSummary]))
-> Maybe [JobSummary] -> Either String (Maybe [JobSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [JobSummary]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> ListJobsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListJobsResponse)
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 -> ListJobsResponse)
-> Either String Int -> Either String ListJobsResponse
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 ListJobs
instance Prelude.NFData ListJobs
instance Core.ToHeaders ListJobs where
toHeaders :: ListJobs -> ResponseHeaders
toHeaders = ResponseHeaders -> ListJobs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListJobs where
toPath :: ListJobs -> ByteString
toPath = ByteString -> ListJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/jobs"
instance Core.ToQuery ListJobs where
toQuery :: ListJobs -> QueryString
toQuery ListJobs' {Maybe Natural
Maybe Text
Maybe JobStatus
Maybe TargetSelection
targetSelection :: Maybe TargetSelection
maxResults :: Maybe Natural
thingGroupName :: Maybe Text
nextToken :: Maybe Text
namespaceId :: Maybe Text
thingGroupId :: Maybe Text
status :: Maybe JobStatus
$sel:targetSelection:ListJobs' :: ListJobs -> Maybe TargetSelection
$sel:maxResults:ListJobs' :: ListJobs -> Maybe Natural
$sel:thingGroupName:ListJobs' :: ListJobs -> Maybe Text
$sel:nextToken:ListJobs' :: ListJobs -> Maybe Text
$sel:namespaceId:ListJobs' :: ListJobs -> Maybe Text
$sel:thingGroupId:ListJobs' :: ListJobs -> Maybe Text
$sel:status:ListJobs' :: ListJobs -> Maybe JobStatus
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"status" ByteString -> Maybe JobStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe JobStatus
status,
ByteString
"thingGroupId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
thingGroupId,
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
"thingGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
thingGroupName,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
ByteString
"targetSelection" ByteString -> Maybe TargetSelection -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe TargetSelection
targetSelection
]
data ListJobsResponse = ListJobsResponse'
{
ListJobsResponse -> Maybe [JobSummary]
jobs :: Prelude.Maybe [JobSummary],
ListJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListJobsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListJobsResponse -> ListJobsResponse -> Bool
(ListJobsResponse -> ListJobsResponse -> Bool)
-> (ListJobsResponse -> ListJobsResponse -> Bool)
-> Eq ListJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobsResponse -> ListJobsResponse -> Bool
$c/= :: ListJobsResponse -> ListJobsResponse -> Bool
== :: ListJobsResponse -> ListJobsResponse -> Bool
$c== :: ListJobsResponse -> ListJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListJobsResponse]
ReadPrec ListJobsResponse
Int -> ReadS ListJobsResponse
ReadS [ListJobsResponse]
(Int -> ReadS ListJobsResponse)
-> ReadS [ListJobsResponse]
-> ReadPrec ListJobsResponse
-> ReadPrec [ListJobsResponse]
-> Read ListJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobsResponse]
$creadListPrec :: ReadPrec [ListJobsResponse]
readPrec :: ReadPrec ListJobsResponse
$creadPrec :: ReadPrec ListJobsResponse
readList :: ReadS [ListJobsResponse]
$creadList :: ReadS [ListJobsResponse]
readsPrec :: Int -> ReadS ListJobsResponse
$creadsPrec :: Int -> ReadS ListJobsResponse
Prelude.Read, Int -> ListJobsResponse -> ShowS
[ListJobsResponse] -> ShowS
ListJobsResponse -> String
(Int -> ListJobsResponse -> ShowS)
-> (ListJobsResponse -> String)
-> ([ListJobsResponse] -> ShowS)
-> Show ListJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobsResponse] -> ShowS
$cshowList :: [ListJobsResponse] -> ShowS
show :: ListJobsResponse -> String
$cshow :: ListJobsResponse -> String
showsPrec :: Int -> ListJobsResponse -> ShowS
$cshowsPrec :: Int -> ListJobsResponse -> ShowS
Prelude.Show, (forall x. ListJobsResponse -> Rep ListJobsResponse x)
-> (forall x. Rep ListJobsResponse x -> ListJobsResponse)
-> Generic ListJobsResponse
forall x. Rep ListJobsResponse x -> ListJobsResponse
forall x. ListJobsResponse -> Rep ListJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobsResponse x -> ListJobsResponse
$cfrom :: forall x. ListJobsResponse -> Rep ListJobsResponse x
Prelude.Generic)
newListJobsResponse ::
Prelude.Int ->
ListJobsResponse
newListJobsResponse :: Int -> ListJobsResponse
newListJobsResponse Int
pHttpStatus_ =
ListJobsResponse' :: Maybe [JobSummary] -> Maybe Text -> Int -> ListJobsResponse
ListJobsResponse'
{ $sel:jobs:ListJobsResponse' :: Maybe [JobSummary]
jobs = Maybe [JobSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listJobsResponse_jobs :: Lens.Lens' ListJobsResponse (Prelude.Maybe [JobSummary])
listJobsResponse_jobs :: (Maybe [JobSummary] -> f (Maybe [JobSummary]))
-> ListJobsResponse -> f ListJobsResponse
listJobsResponse_jobs = (ListJobsResponse -> Maybe [JobSummary])
-> (ListJobsResponse -> Maybe [JobSummary] -> ListJobsResponse)
-> Lens' ListJobsResponse (Maybe [JobSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobsResponse' {Maybe [JobSummary]
jobs :: Maybe [JobSummary]
$sel:jobs:ListJobsResponse' :: ListJobsResponse -> Maybe [JobSummary]
jobs} -> Maybe [JobSummary]
jobs) (\s :: ListJobsResponse
s@ListJobsResponse' {} Maybe [JobSummary]
a -> ListJobsResponse
s {$sel:jobs:ListJobsResponse' :: Maybe [JobSummary]
jobs = Maybe [JobSummary]
a} :: ListJobsResponse) ((Maybe [JobSummary] -> f (Maybe [JobSummary]))
-> ListJobsResponse -> f ListJobsResponse)
-> ((Maybe [JobSummary] -> f (Maybe [JobSummary]))
-> Maybe [JobSummary] -> f (Maybe [JobSummary]))
-> (Maybe [JobSummary] -> f (Maybe [JobSummary]))
-> ListJobsResponse
-> f ListJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [JobSummary] [JobSummary] [JobSummary] [JobSummary]
-> Iso
(Maybe [JobSummary])
(Maybe [JobSummary])
(Maybe [JobSummary])
(Maybe [JobSummary])
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 [JobSummary] [JobSummary] [JobSummary] [JobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listJobsResponse_nextToken :: Lens.Lens' ListJobsResponse (Prelude.Maybe Prelude.Text)
listJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListJobsResponse -> f ListJobsResponse
listJobsResponse_nextToken = (ListJobsResponse -> Maybe Text)
-> (ListJobsResponse -> Maybe Text -> ListJobsResponse)
-> Lens' ListJobsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobsResponse' :: ListJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobsResponse
s@ListJobsResponse' {} Maybe Text
a -> ListJobsResponse
s {$sel:nextToken:ListJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobsResponse)
listJobsResponse_httpStatus :: Lens.Lens' ListJobsResponse Prelude.Int
listJobsResponse_httpStatus :: (Int -> f Int) -> ListJobsResponse -> f ListJobsResponse
listJobsResponse_httpStatus = (ListJobsResponse -> Int)
-> (ListJobsResponse -> Int -> ListJobsResponse)
-> Lens ListJobsResponse ListJobsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListJobsResponse' :: ListJobsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListJobsResponse
s@ListJobsResponse' {} Int
a -> ListJobsResponse
s {$sel:httpStatus:ListJobsResponse' :: Int
httpStatus = Int
a} :: ListJobsResponse)
instance Prelude.NFData ListJobsResponse