{-# 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.MediaPackage.ListHarvestJobs
(
ListHarvestJobs (..),
newListHarvestJobs,
listHarvestJobs_includeStatus,
listHarvestJobs_nextToken,
listHarvestJobs_includeChannelId,
listHarvestJobs_maxResults,
ListHarvestJobsResponse (..),
newListHarvestJobsResponse,
listHarvestJobsResponse_harvestJobs,
listHarvestJobsResponse_nextToken,
listHarvestJobsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackage.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListHarvestJobs = ListHarvestJobs'
{
ListHarvestJobs -> Maybe Text
includeStatus :: Prelude.Maybe Prelude.Text,
ListHarvestJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListHarvestJobs -> Maybe Text
includeChannelId :: Prelude.Maybe Prelude.Text,
ListHarvestJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListHarvestJobs -> ListHarvestJobs -> Bool
(ListHarvestJobs -> ListHarvestJobs -> Bool)
-> (ListHarvestJobs -> ListHarvestJobs -> Bool)
-> Eq ListHarvestJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHarvestJobs -> ListHarvestJobs -> Bool
$c/= :: ListHarvestJobs -> ListHarvestJobs -> Bool
== :: ListHarvestJobs -> ListHarvestJobs -> Bool
$c== :: ListHarvestJobs -> ListHarvestJobs -> Bool
Prelude.Eq, ReadPrec [ListHarvestJobs]
ReadPrec ListHarvestJobs
Int -> ReadS ListHarvestJobs
ReadS [ListHarvestJobs]
(Int -> ReadS ListHarvestJobs)
-> ReadS [ListHarvestJobs]
-> ReadPrec ListHarvestJobs
-> ReadPrec [ListHarvestJobs]
-> Read ListHarvestJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHarvestJobs]
$creadListPrec :: ReadPrec [ListHarvestJobs]
readPrec :: ReadPrec ListHarvestJobs
$creadPrec :: ReadPrec ListHarvestJobs
readList :: ReadS [ListHarvestJobs]
$creadList :: ReadS [ListHarvestJobs]
readsPrec :: Int -> ReadS ListHarvestJobs
$creadsPrec :: Int -> ReadS ListHarvestJobs
Prelude.Read, Int -> ListHarvestJobs -> ShowS
[ListHarvestJobs] -> ShowS
ListHarvestJobs -> String
(Int -> ListHarvestJobs -> ShowS)
-> (ListHarvestJobs -> String)
-> ([ListHarvestJobs] -> ShowS)
-> Show ListHarvestJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHarvestJobs] -> ShowS
$cshowList :: [ListHarvestJobs] -> ShowS
show :: ListHarvestJobs -> String
$cshow :: ListHarvestJobs -> String
showsPrec :: Int -> ListHarvestJobs -> ShowS
$cshowsPrec :: Int -> ListHarvestJobs -> ShowS
Prelude.Show, (forall x. ListHarvestJobs -> Rep ListHarvestJobs x)
-> (forall x. Rep ListHarvestJobs x -> ListHarvestJobs)
-> Generic ListHarvestJobs
forall x. Rep ListHarvestJobs x -> ListHarvestJobs
forall x. ListHarvestJobs -> Rep ListHarvestJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListHarvestJobs x -> ListHarvestJobs
$cfrom :: forall x. ListHarvestJobs -> Rep ListHarvestJobs x
Prelude.Generic)
newListHarvestJobs ::
ListHarvestJobs
newListHarvestJobs :: ListHarvestJobs
newListHarvestJobs =
ListHarvestJobs' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> ListHarvestJobs
ListHarvestJobs'
{ $sel:includeStatus:ListHarvestJobs' :: Maybe Text
includeStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListHarvestJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:includeChannelId:ListHarvestJobs' :: Maybe Text
includeChannelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListHarvestJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listHarvestJobs_includeStatus :: Lens.Lens' ListHarvestJobs (Prelude.Maybe Prelude.Text)
listHarvestJobs_includeStatus :: (Maybe Text -> f (Maybe Text))
-> ListHarvestJobs -> f ListHarvestJobs
listHarvestJobs_includeStatus = (ListHarvestJobs -> Maybe Text)
-> (ListHarvestJobs -> Maybe Text -> ListHarvestJobs)
-> Lens ListHarvestJobs ListHarvestJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobs' {Maybe Text
includeStatus :: Maybe Text
$sel:includeStatus:ListHarvestJobs' :: ListHarvestJobs -> Maybe Text
includeStatus} -> Maybe Text
includeStatus) (\s :: ListHarvestJobs
s@ListHarvestJobs' {} Maybe Text
a -> ListHarvestJobs
s {$sel:includeStatus:ListHarvestJobs' :: Maybe Text
includeStatus = Maybe Text
a} :: ListHarvestJobs)
listHarvestJobs_nextToken :: Lens.Lens' ListHarvestJobs (Prelude.Maybe Prelude.Text)
listHarvestJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListHarvestJobs -> f ListHarvestJobs
listHarvestJobs_nextToken = (ListHarvestJobs -> Maybe Text)
-> (ListHarvestJobs -> Maybe Text -> ListHarvestJobs)
-> Lens ListHarvestJobs ListHarvestJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHarvestJobs' :: ListHarvestJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHarvestJobs
s@ListHarvestJobs' {} Maybe Text
a -> ListHarvestJobs
s {$sel:nextToken:ListHarvestJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListHarvestJobs)
listHarvestJobs_includeChannelId :: Lens.Lens' ListHarvestJobs (Prelude.Maybe Prelude.Text)
listHarvestJobs_includeChannelId :: (Maybe Text -> f (Maybe Text))
-> ListHarvestJobs -> f ListHarvestJobs
listHarvestJobs_includeChannelId = (ListHarvestJobs -> Maybe Text)
-> (ListHarvestJobs -> Maybe Text -> ListHarvestJobs)
-> Lens ListHarvestJobs ListHarvestJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobs' {Maybe Text
includeChannelId :: Maybe Text
$sel:includeChannelId:ListHarvestJobs' :: ListHarvestJobs -> Maybe Text
includeChannelId} -> Maybe Text
includeChannelId) (\s :: ListHarvestJobs
s@ListHarvestJobs' {} Maybe Text
a -> ListHarvestJobs
s {$sel:includeChannelId:ListHarvestJobs' :: Maybe Text
includeChannelId = Maybe Text
a} :: ListHarvestJobs)
listHarvestJobs_maxResults :: Lens.Lens' ListHarvestJobs (Prelude.Maybe Prelude.Natural)
listHarvestJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListHarvestJobs -> f ListHarvestJobs
listHarvestJobs_maxResults = (ListHarvestJobs -> Maybe Natural)
-> (ListHarvestJobs -> Maybe Natural -> ListHarvestJobs)
-> Lens
ListHarvestJobs ListHarvestJobs (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListHarvestJobs' :: ListHarvestJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListHarvestJobs
s@ListHarvestJobs' {} Maybe Natural
a -> ListHarvestJobs
s {$sel:maxResults:ListHarvestJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListHarvestJobs)
instance Core.AWSPager ListHarvestJobs where
page :: ListHarvestJobs
-> AWSResponse ListHarvestJobs -> Maybe ListHarvestJobs
page ListHarvestJobs
rq AWSResponse ListHarvestJobs
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListHarvestJobs
ListHarvestJobsResponse
rs
ListHarvestJobsResponse
-> Getting (First Text) ListHarvestJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListHarvestJobsResponse
-> Const (First Text) ListHarvestJobsResponse
Lens' ListHarvestJobsResponse (Maybe Text)
listHarvestJobsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListHarvestJobsResponse
-> Const (First Text) ListHarvestJobsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListHarvestJobsResponse 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 ListHarvestJobs
forall a. Maybe a
Prelude.Nothing
| Maybe [HarvestJob] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListHarvestJobs
ListHarvestJobsResponse
rs
ListHarvestJobsResponse
-> Getting
(First [HarvestJob]) ListHarvestJobsResponse [HarvestJob]
-> Maybe [HarvestJob]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [HarvestJob]
-> Const (First [HarvestJob]) (Maybe [HarvestJob]))
-> ListHarvestJobsResponse
-> Const (First [HarvestJob]) ListHarvestJobsResponse
Lens' ListHarvestJobsResponse (Maybe [HarvestJob])
listHarvestJobsResponse_harvestJobs
((Maybe [HarvestJob]
-> Const (First [HarvestJob]) (Maybe [HarvestJob]))
-> ListHarvestJobsResponse
-> Const (First [HarvestJob]) ListHarvestJobsResponse)
-> (([HarvestJob] -> Const (First [HarvestJob]) [HarvestJob])
-> Maybe [HarvestJob]
-> Const (First [HarvestJob]) (Maybe [HarvestJob]))
-> Getting
(First [HarvestJob]) ListHarvestJobsResponse [HarvestJob]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HarvestJob] -> Const (First [HarvestJob]) [HarvestJob])
-> Maybe [HarvestJob]
-> Const (First [HarvestJob]) (Maybe [HarvestJob])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListHarvestJobs
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListHarvestJobs -> Maybe ListHarvestJobs
forall a. a -> Maybe a
Prelude.Just (ListHarvestJobs -> Maybe ListHarvestJobs)
-> ListHarvestJobs -> Maybe ListHarvestJobs
forall a b. (a -> b) -> a -> b
Prelude.$
ListHarvestJobs
rq
ListHarvestJobs
-> (ListHarvestJobs -> ListHarvestJobs) -> ListHarvestJobs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListHarvestJobs -> Identity ListHarvestJobs
Lens ListHarvestJobs ListHarvestJobs (Maybe Text) (Maybe Text)
listHarvestJobs_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListHarvestJobs -> Identity ListHarvestJobs)
-> Maybe Text -> ListHarvestJobs -> ListHarvestJobs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListHarvestJobs
ListHarvestJobsResponse
rs
ListHarvestJobsResponse
-> Getting (First Text) ListHarvestJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListHarvestJobsResponse
-> Const (First Text) ListHarvestJobsResponse
Lens' ListHarvestJobsResponse (Maybe Text)
listHarvestJobsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListHarvestJobsResponse
-> Const (First Text) ListHarvestJobsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListHarvestJobsResponse 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 ListHarvestJobs where
type
AWSResponse ListHarvestJobs =
ListHarvestJobsResponse
request :: ListHarvestJobs -> Request ListHarvestJobs
request = Service -> ListHarvestJobs -> Request ListHarvestJobs
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListHarvestJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListHarvestJobs)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListHarvestJobs))
-> Logger
-> Service
-> Proxy ListHarvestJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListHarvestJobs)))
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 [HarvestJob] -> Maybe Text -> Int -> ListHarvestJobsResponse
ListHarvestJobsResponse'
(Maybe [HarvestJob]
-> Maybe Text -> Int -> ListHarvestJobsResponse)
-> Either String (Maybe [HarvestJob])
-> Either String (Maybe Text -> Int -> ListHarvestJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [HarvestJob]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"harvestJobs" Either String (Maybe (Maybe [HarvestJob]))
-> Maybe [HarvestJob] -> Either String (Maybe [HarvestJob])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [HarvestJob]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> ListHarvestJobsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListHarvestJobsResponse)
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 -> ListHarvestJobsResponse)
-> Either String Int -> Either String ListHarvestJobsResponse
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 ListHarvestJobs
instance Prelude.NFData ListHarvestJobs
instance Core.ToHeaders ListHarvestJobs where
toHeaders :: ListHarvestJobs -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListHarvestJobs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath ListHarvestJobs where
toPath :: ListHarvestJobs -> ByteString
toPath = ByteString -> ListHarvestJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/harvest_jobs"
instance Core.ToQuery ListHarvestJobs where
toQuery :: ListHarvestJobs -> QueryString
toQuery ListHarvestJobs' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
includeChannelId :: Maybe Text
nextToken :: Maybe Text
includeStatus :: Maybe Text
$sel:maxResults:ListHarvestJobs' :: ListHarvestJobs -> Maybe Natural
$sel:includeChannelId:ListHarvestJobs' :: ListHarvestJobs -> Maybe Text
$sel:nextToken:ListHarvestJobs' :: ListHarvestJobs -> Maybe Text
$sel:includeStatus:ListHarvestJobs' :: ListHarvestJobs -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"includeStatus" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
includeStatus,
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"includeChannelId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
includeChannelId,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListHarvestJobsResponse = ListHarvestJobsResponse'
{
ListHarvestJobsResponse -> Maybe [HarvestJob]
harvestJobs :: Prelude.Maybe [HarvestJob],
ListHarvestJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListHarvestJobsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool
(ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool)
-> (ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool)
-> Eq ListHarvestJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool
$c/= :: ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool
== :: ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool
$c== :: ListHarvestJobsResponse -> ListHarvestJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListHarvestJobsResponse]
ReadPrec ListHarvestJobsResponse
Int -> ReadS ListHarvestJobsResponse
ReadS [ListHarvestJobsResponse]
(Int -> ReadS ListHarvestJobsResponse)
-> ReadS [ListHarvestJobsResponse]
-> ReadPrec ListHarvestJobsResponse
-> ReadPrec [ListHarvestJobsResponse]
-> Read ListHarvestJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHarvestJobsResponse]
$creadListPrec :: ReadPrec [ListHarvestJobsResponse]
readPrec :: ReadPrec ListHarvestJobsResponse
$creadPrec :: ReadPrec ListHarvestJobsResponse
readList :: ReadS [ListHarvestJobsResponse]
$creadList :: ReadS [ListHarvestJobsResponse]
readsPrec :: Int -> ReadS ListHarvestJobsResponse
$creadsPrec :: Int -> ReadS ListHarvestJobsResponse
Prelude.Read, Int -> ListHarvestJobsResponse -> ShowS
[ListHarvestJobsResponse] -> ShowS
ListHarvestJobsResponse -> String
(Int -> ListHarvestJobsResponse -> ShowS)
-> (ListHarvestJobsResponse -> String)
-> ([ListHarvestJobsResponse] -> ShowS)
-> Show ListHarvestJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHarvestJobsResponse] -> ShowS
$cshowList :: [ListHarvestJobsResponse] -> ShowS
show :: ListHarvestJobsResponse -> String
$cshow :: ListHarvestJobsResponse -> String
showsPrec :: Int -> ListHarvestJobsResponse -> ShowS
$cshowsPrec :: Int -> ListHarvestJobsResponse -> ShowS
Prelude.Show, (forall x.
ListHarvestJobsResponse -> Rep ListHarvestJobsResponse x)
-> (forall x.
Rep ListHarvestJobsResponse x -> ListHarvestJobsResponse)
-> Generic ListHarvestJobsResponse
forall x. Rep ListHarvestJobsResponse x -> ListHarvestJobsResponse
forall x. ListHarvestJobsResponse -> Rep ListHarvestJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListHarvestJobsResponse x -> ListHarvestJobsResponse
$cfrom :: forall x. ListHarvestJobsResponse -> Rep ListHarvestJobsResponse x
Prelude.Generic)
newListHarvestJobsResponse ::
Prelude.Int ->
ListHarvestJobsResponse
newListHarvestJobsResponse :: Int -> ListHarvestJobsResponse
newListHarvestJobsResponse Int
pHttpStatus_ =
ListHarvestJobsResponse' :: Maybe [HarvestJob] -> Maybe Text -> Int -> ListHarvestJobsResponse
ListHarvestJobsResponse'
{ $sel:harvestJobs:ListHarvestJobsResponse' :: Maybe [HarvestJob]
harvestJobs =
Maybe [HarvestJob]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListHarvestJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListHarvestJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listHarvestJobsResponse_harvestJobs :: Lens.Lens' ListHarvestJobsResponse (Prelude.Maybe [HarvestJob])
listHarvestJobsResponse_harvestJobs :: (Maybe [HarvestJob] -> f (Maybe [HarvestJob]))
-> ListHarvestJobsResponse -> f ListHarvestJobsResponse
listHarvestJobsResponse_harvestJobs = (ListHarvestJobsResponse -> Maybe [HarvestJob])
-> (ListHarvestJobsResponse
-> Maybe [HarvestJob] -> ListHarvestJobsResponse)
-> Lens' ListHarvestJobsResponse (Maybe [HarvestJob])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobsResponse' {Maybe [HarvestJob]
harvestJobs :: Maybe [HarvestJob]
$sel:harvestJobs:ListHarvestJobsResponse' :: ListHarvestJobsResponse -> Maybe [HarvestJob]
harvestJobs} -> Maybe [HarvestJob]
harvestJobs) (\s :: ListHarvestJobsResponse
s@ListHarvestJobsResponse' {} Maybe [HarvestJob]
a -> ListHarvestJobsResponse
s {$sel:harvestJobs:ListHarvestJobsResponse' :: Maybe [HarvestJob]
harvestJobs = Maybe [HarvestJob]
a} :: ListHarvestJobsResponse) ((Maybe [HarvestJob] -> f (Maybe [HarvestJob]))
-> ListHarvestJobsResponse -> f ListHarvestJobsResponse)
-> ((Maybe [HarvestJob] -> f (Maybe [HarvestJob]))
-> Maybe [HarvestJob] -> f (Maybe [HarvestJob]))
-> (Maybe [HarvestJob] -> f (Maybe [HarvestJob]))
-> ListHarvestJobsResponse
-> f ListHarvestJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [HarvestJob] [HarvestJob] [HarvestJob] [HarvestJob]
-> Iso
(Maybe [HarvestJob])
(Maybe [HarvestJob])
(Maybe [HarvestJob])
(Maybe [HarvestJob])
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 [HarvestJob] [HarvestJob] [HarvestJob] [HarvestJob]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listHarvestJobsResponse_nextToken :: Lens.Lens' ListHarvestJobsResponse (Prelude.Maybe Prelude.Text)
listHarvestJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListHarvestJobsResponse -> f ListHarvestJobsResponse
listHarvestJobsResponse_nextToken = (ListHarvestJobsResponse -> Maybe Text)
-> (ListHarvestJobsResponse
-> Maybe Text -> ListHarvestJobsResponse)
-> Lens' ListHarvestJobsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHarvestJobsResponse' :: ListHarvestJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHarvestJobsResponse
s@ListHarvestJobsResponse' {} Maybe Text
a -> ListHarvestJobsResponse
s {$sel:nextToken:ListHarvestJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListHarvestJobsResponse)
listHarvestJobsResponse_httpStatus :: Lens.Lens' ListHarvestJobsResponse Prelude.Int
listHarvestJobsResponse_httpStatus :: (Int -> f Int)
-> ListHarvestJobsResponse -> f ListHarvestJobsResponse
listHarvestJobsResponse_httpStatus = (ListHarvestJobsResponse -> Int)
-> (ListHarvestJobsResponse -> Int -> ListHarvestJobsResponse)
-> Lens ListHarvestJobsResponse ListHarvestJobsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHarvestJobsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListHarvestJobsResponse' :: ListHarvestJobsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListHarvestJobsResponse
s@ListHarvestJobsResponse' {} Int
a -> ListHarvestJobsResponse
s {$sel:httpStatus:ListHarvestJobsResponse' :: Int
httpStatus = Int
a} :: ListHarvestJobsResponse)
instance Prelude.NFData ListHarvestJobsResponse