{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Comprehend.ListEventsDetectionJobs
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of the events detection jobs that you have submitted.
module Amazonka.Comprehend.ListEventsDetectionJobs
  ( -- * Creating a Request
    ListEventsDetectionJobs (..),
    newListEventsDetectionJobs,

    -- * Request Lenses
    listEventsDetectionJobs_nextToken,
    listEventsDetectionJobs_filter,
    listEventsDetectionJobs_maxResults,

    -- * Destructuring the Response
    ListEventsDetectionJobsResponse (..),
    newListEventsDetectionJobsResponse,

    -- * Response Lenses
    listEventsDetectionJobsResponse_eventsDetectionJobPropertiesList,
    listEventsDetectionJobsResponse_nextToken,
    listEventsDetectionJobsResponse_httpStatus,
  )
where

import Amazonka.Comprehend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListEventsDetectionJobs' smart constructor.
data ListEventsDetectionJobs = ListEventsDetectionJobs'
  { -- | Identifies the next page of results to return.
    ListEventsDetectionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Filters the jobs that are returned. You can filter jobs on their name,
    -- status, or the date and time that they were submitted. You can only set
    -- one filter at a time.
    ListEventsDetectionJobs -> Maybe EventsDetectionJobFilter
filter' :: Prelude.Maybe EventsDetectionJobFilter,
    -- | The maximum number of results to return in each page.
    ListEventsDetectionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool
(ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool)
-> (ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool)
-> Eq ListEventsDetectionJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool
$c/= :: ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool
== :: ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool
$c== :: ListEventsDetectionJobs -> ListEventsDetectionJobs -> Bool
Prelude.Eq, ReadPrec [ListEventsDetectionJobs]
ReadPrec ListEventsDetectionJobs
Int -> ReadS ListEventsDetectionJobs
ReadS [ListEventsDetectionJobs]
(Int -> ReadS ListEventsDetectionJobs)
-> ReadS [ListEventsDetectionJobs]
-> ReadPrec ListEventsDetectionJobs
-> ReadPrec [ListEventsDetectionJobs]
-> Read ListEventsDetectionJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEventsDetectionJobs]
$creadListPrec :: ReadPrec [ListEventsDetectionJobs]
readPrec :: ReadPrec ListEventsDetectionJobs
$creadPrec :: ReadPrec ListEventsDetectionJobs
readList :: ReadS [ListEventsDetectionJobs]
$creadList :: ReadS [ListEventsDetectionJobs]
readsPrec :: Int -> ReadS ListEventsDetectionJobs
$creadsPrec :: Int -> ReadS ListEventsDetectionJobs
Prelude.Read, Int -> ListEventsDetectionJobs -> ShowS
[ListEventsDetectionJobs] -> ShowS
ListEventsDetectionJobs -> String
(Int -> ListEventsDetectionJobs -> ShowS)
-> (ListEventsDetectionJobs -> String)
-> ([ListEventsDetectionJobs] -> ShowS)
-> Show ListEventsDetectionJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEventsDetectionJobs] -> ShowS
$cshowList :: [ListEventsDetectionJobs] -> ShowS
show :: ListEventsDetectionJobs -> String
$cshow :: ListEventsDetectionJobs -> String
showsPrec :: Int -> ListEventsDetectionJobs -> ShowS
$cshowsPrec :: Int -> ListEventsDetectionJobs -> ShowS
Prelude.Show, (forall x.
 ListEventsDetectionJobs -> Rep ListEventsDetectionJobs x)
-> (forall x.
    Rep ListEventsDetectionJobs x -> ListEventsDetectionJobs)
-> Generic ListEventsDetectionJobs
forall x. Rep ListEventsDetectionJobs x -> ListEventsDetectionJobs
forall x. ListEventsDetectionJobs -> Rep ListEventsDetectionJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEventsDetectionJobs x -> ListEventsDetectionJobs
$cfrom :: forall x. ListEventsDetectionJobs -> Rep ListEventsDetectionJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListEventsDetectionJobs' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listEventsDetectionJobs_nextToken' - Identifies the next page of results to return.
--
-- 'filter'', 'listEventsDetectionJobs_filter' - Filters the jobs that are returned. You can filter jobs on their name,
-- status, or the date and time that they were submitted. You can only set
-- one filter at a time.
--
-- 'maxResults', 'listEventsDetectionJobs_maxResults' - The maximum number of results to return in each page.
newListEventsDetectionJobs ::
  ListEventsDetectionJobs
newListEventsDetectionJobs :: ListEventsDetectionJobs
newListEventsDetectionJobs =
  ListEventsDetectionJobs' :: Maybe Text
-> Maybe EventsDetectionJobFilter
-> Maybe Natural
-> ListEventsDetectionJobs
ListEventsDetectionJobs'
    { $sel:nextToken:ListEventsDetectionJobs' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filter':ListEventsDetectionJobs' :: Maybe EventsDetectionJobFilter
filter' = Maybe EventsDetectionJobFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListEventsDetectionJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Identifies the next page of results to return.
listEventsDetectionJobs_nextToken :: Lens.Lens' ListEventsDetectionJobs (Prelude.Maybe Prelude.Text)
listEventsDetectionJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEventsDetectionJobs -> f ListEventsDetectionJobs
listEventsDetectionJobs_nextToken = (ListEventsDetectionJobs -> Maybe Text)
-> (ListEventsDetectionJobs
    -> Maybe Text -> ListEventsDetectionJobs)
-> Lens
     ListEventsDetectionJobs
     ListEventsDetectionJobs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventsDetectionJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEventsDetectionJobs' :: ListEventsDetectionJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEventsDetectionJobs
s@ListEventsDetectionJobs' {} Maybe Text
a -> ListEventsDetectionJobs
s {$sel:nextToken:ListEventsDetectionJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListEventsDetectionJobs)

-- | Filters the jobs that are returned. You can filter jobs on their name,
-- status, or the date and time that they were submitted. You can only set
-- one filter at a time.
listEventsDetectionJobs_filter :: Lens.Lens' ListEventsDetectionJobs (Prelude.Maybe EventsDetectionJobFilter)
listEventsDetectionJobs_filter :: (Maybe EventsDetectionJobFilter
 -> f (Maybe EventsDetectionJobFilter))
-> ListEventsDetectionJobs -> f ListEventsDetectionJobs
listEventsDetectionJobs_filter = (ListEventsDetectionJobs -> Maybe EventsDetectionJobFilter)
-> (ListEventsDetectionJobs
    -> Maybe EventsDetectionJobFilter -> ListEventsDetectionJobs)
-> Lens
     ListEventsDetectionJobs
     ListEventsDetectionJobs
     (Maybe EventsDetectionJobFilter)
     (Maybe EventsDetectionJobFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventsDetectionJobs' {Maybe EventsDetectionJobFilter
filter' :: Maybe EventsDetectionJobFilter
$sel:filter':ListEventsDetectionJobs' :: ListEventsDetectionJobs -> Maybe EventsDetectionJobFilter
filter'} -> Maybe EventsDetectionJobFilter
filter') (\s :: ListEventsDetectionJobs
s@ListEventsDetectionJobs' {} Maybe EventsDetectionJobFilter
a -> ListEventsDetectionJobs
s {$sel:filter':ListEventsDetectionJobs' :: Maybe EventsDetectionJobFilter
filter' = Maybe EventsDetectionJobFilter
a} :: ListEventsDetectionJobs)

-- | The maximum number of results to return in each page.
listEventsDetectionJobs_maxResults :: Lens.Lens' ListEventsDetectionJobs (Prelude.Maybe Prelude.Natural)
listEventsDetectionJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListEventsDetectionJobs -> f ListEventsDetectionJobs
listEventsDetectionJobs_maxResults = (ListEventsDetectionJobs -> Maybe Natural)
-> (ListEventsDetectionJobs
    -> Maybe Natural -> ListEventsDetectionJobs)
-> Lens
     ListEventsDetectionJobs
     ListEventsDetectionJobs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventsDetectionJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEventsDetectionJobs' :: ListEventsDetectionJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEventsDetectionJobs
s@ListEventsDetectionJobs' {} Maybe Natural
a -> ListEventsDetectionJobs
s {$sel:maxResults:ListEventsDetectionJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEventsDetectionJobs)

instance Core.AWSRequest ListEventsDetectionJobs where
  type
    AWSResponse ListEventsDetectionJobs =
      ListEventsDetectionJobsResponse
  request :: ListEventsDetectionJobs -> Request ListEventsDetectionJobs
request = Service
-> ListEventsDetectionJobs -> Request ListEventsDetectionJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListEventsDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEventsDetectionJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListEventsDetectionJobs))
-> Logger
-> Service
-> Proxy ListEventsDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEventsDetectionJobs)))
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 [EventsDetectionJobProperties]
-> Maybe Text -> Int -> ListEventsDetectionJobsResponse
ListEventsDetectionJobsResponse'
            (Maybe [EventsDetectionJobProperties]
 -> Maybe Text -> Int -> ListEventsDetectionJobsResponse)
-> Either String (Maybe [EventsDetectionJobProperties])
-> Either
     String (Maybe Text -> Int -> ListEventsDetectionJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [EventsDetectionJobProperties]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EventsDetectionJobPropertiesList"
                            Either String (Maybe (Maybe [EventsDetectionJobProperties]))
-> Maybe [EventsDetectionJobProperties]
-> Either String (Maybe [EventsDetectionJobProperties])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EventsDetectionJobProperties]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> ListEventsDetectionJobsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListEventsDetectionJobsResponse)
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 -> ListEventsDetectionJobsResponse)
-> Either String Int
-> Either String ListEventsDetectionJobsResponse
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 ListEventsDetectionJobs

instance Prelude.NFData ListEventsDetectionJobs

instance Core.ToHeaders ListEventsDetectionJobs where
  toHeaders :: ListEventsDetectionJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEventsDetectionJobs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Comprehend_20171127.ListEventsDetectionJobs" ::
                          Prelude.ByteString
                      ),
            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.ToJSON ListEventsDetectionJobs where
  toJSON :: ListEventsDetectionJobs -> Value
toJSON ListEventsDetectionJobs' {Maybe Natural
Maybe Text
Maybe EventsDetectionJobFilter
maxResults :: Maybe Natural
filter' :: Maybe EventsDetectionJobFilter
nextToken :: Maybe Text
$sel:maxResults:ListEventsDetectionJobs' :: ListEventsDetectionJobs -> Maybe Natural
$sel:filter':ListEventsDetectionJobs' :: ListEventsDetectionJobs -> Maybe EventsDetectionJobFilter
$sel:nextToken:ListEventsDetectionJobs' :: ListEventsDetectionJobs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Filter" Text -> EventsDetectionJobFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EventsDetectionJobFilter -> Pair)
-> Maybe EventsDetectionJobFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventsDetectionJobFilter
filter',
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

instance Core.ToPath ListEventsDetectionJobs where
  toPath :: ListEventsDetectionJobs -> ByteString
toPath = ByteString -> ListEventsDetectionJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListEventsDetectionJobs where
  toQuery :: ListEventsDetectionJobs -> QueryString
toQuery = QueryString -> ListEventsDetectionJobs -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListEventsDetectionJobsResponse' smart constructor.
data ListEventsDetectionJobsResponse = ListEventsDetectionJobsResponse'
  { -- | A list containing the properties of each job that is returned.
    ListEventsDetectionJobsResponse
-> Maybe [EventsDetectionJobProperties]
eventsDetectionJobPropertiesList :: Prelude.Maybe [EventsDetectionJobProperties],
    -- | Identifies the next page of results to return.
    ListEventsDetectionJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListEventsDetectionJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListEventsDetectionJobsResponse
-> ListEventsDetectionJobsResponse -> Bool
(ListEventsDetectionJobsResponse
 -> ListEventsDetectionJobsResponse -> Bool)
-> (ListEventsDetectionJobsResponse
    -> ListEventsDetectionJobsResponse -> Bool)
-> Eq ListEventsDetectionJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEventsDetectionJobsResponse
-> ListEventsDetectionJobsResponse -> Bool
$c/= :: ListEventsDetectionJobsResponse
-> ListEventsDetectionJobsResponse -> Bool
== :: ListEventsDetectionJobsResponse
-> ListEventsDetectionJobsResponse -> Bool
$c== :: ListEventsDetectionJobsResponse
-> ListEventsDetectionJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListEventsDetectionJobsResponse]
ReadPrec ListEventsDetectionJobsResponse
Int -> ReadS ListEventsDetectionJobsResponse
ReadS [ListEventsDetectionJobsResponse]
(Int -> ReadS ListEventsDetectionJobsResponse)
-> ReadS [ListEventsDetectionJobsResponse]
-> ReadPrec ListEventsDetectionJobsResponse
-> ReadPrec [ListEventsDetectionJobsResponse]
-> Read ListEventsDetectionJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEventsDetectionJobsResponse]
$creadListPrec :: ReadPrec [ListEventsDetectionJobsResponse]
readPrec :: ReadPrec ListEventsDetectionJobsResponse
$creadPrec :: ReadPrec ListEventsDetectionJobsResponse
readList :: ReadS [ListEventsDetectionJobsResponse]
$creadList :: ReadS [ListEventsDetectionJobsResponse]
readsPrec :: Int -> ReadS ListEventsDetectionJobsResponse
$creadsPrec :: Int -> ReadS ListEventsDetectionJobsResponse
Prelude.Read, Int -> ListEventsDetectionJobsResponse -> ShowS
[ListEventsDetectionJobsResponse] -> ShowS
ListEventsDetectionJobsResponse -> String
(Int -> ListEventsDetectionJobsResponse -> ShowS)
-> (ListEventsDetectionJobsResponse -> String)
-> ([ListEventsDetectionJobsResponse] -> ShowS)
-> Show ListEventsDetectionJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEventsDetectionJobsResponse] -> ShowS
$cshowList :: [ListEventsDetectionJobsResponse] -> ShowS
show :: ListEventsDetectionJobsResponse -> String
$cshow :: ListEventsDetectionJobsResponse -> String
showsPrec :: Int -> ListEventsDetectionJobsResponse -> ShowS
$cshowsPrec :: Int -> ListEventsDetectionJobsResponse -> ShowS
Prelude.Show, (forall x.
 ListEventsDetectionJobsResponse
 -> Rep ListEventsDetectionJobsResponse x)
-> (forall x.
    Rep ListEventsDetectionJobsResponse x
    -> ListEventsDetectionJobsResponse)
-> Generic ListEventsDetectionJobsResponse
forall x.
Rep ListEventsDetectionJobsResponse x
-> ListEventsDetectionJobsResponse
forall x.
ListEventsDetectionJobsResponse
-> Rep ListEventsDetectionJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEventsDetectionJobsResponse x
-> ListEventsDetectionJobsResponse
$cfrom :: forall x.
ListEventsDetectionJobsResponse
-> Rep ListEventsDetectionJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEventsDetectionJobsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'eventsDetectionJobPropertiesList', 'listEventsDetectionJobsResponse_eventsDetectionJobPropertiesList' - A list containing the properties of each job that is returned.
--
-- 'nextToken', 'listEventsDetectionJobsResponse_nextToken' - Identifies the next page of results to return.
--
-- 'httpStatus', 'listEventsDetectionJobsResponse_httpStatus' - The response's http status code.
newListEventsDetectionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEventsDetectionJobsResponse
newListEventsDetectionJobsResponse :: Int -> ListEventsDetectionJobsResponse
newListEventsDetectionJobsResponse Int
pHttpStatus_ =
  ListEventsDetectionJobsResponse' :: Maybe [EventsDetectionJobProperties]
-> Maybe Text -> Int -> ListEventsDetectionJobsResponse
ListEventsDetectionJobsResponse'
    { $sel:eventsDetectionJobPropertiesList:ListEventsDetectionJobsResponse' :: Maybe [EventsDetectionJobProperties]
eventsDetectionJobPropertiesList =
        Maybe [EventsDetectionJobProperties]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEventsDetectionJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEventsDetectionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list containing the properties of each job that is returned.
listEventsDetectionJobsResponse_eventsDetectionJobPropertiesList :: Lens.Lens' ListEventsDetectionJobsResponse (Prelude.Maybe [EventsDetectionJobProperties])
listEventsDetectionJobsResponse_eventsDetectionJobPropertiesList :: (Maybe [EventsDetectionJobProperties]
 -> f (Maybe [EventsDetectionJobProperties]))
-> ListEventsDetectionJobsResponse
-> f ListEventsDetectionJobsResponse
listEventsDetectionJobsResponse_eventsDetectionJobPropertiesList = (ListEventsDetectionJobsResponse
 -> Maybe [EventsDetectionJobProperties])
-> (ListEventsDetectionJobsResponse
    -> Maybe [EventsDetectionJobProperties]
    -> ListEventsDetectionJobsResponse)
-> Lens
     ListEventsDetectionJobsResponse
     ListEventsDetectionJobsResponse
     (Maybe [EventsDetectionJobProperties])
     (Maybe [EventsDetectionJobProperties])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventsDetectionJobsResponse' {Maybe [EventsDetectionJobProperties]
eventsDetectionJobPropertiesList :: Maybe [EventsDetectionJobProperties]
$sel:eventsDetectionJobPropertiesList:ListEventsDetectionJobsResponse' :: ListEventsDetectionJobsResponse
-> Maybe [EventsDetectionJobProperties]
eventsDetectionJobPropertiesList} -> Maybe [EventsDetectionJobProperties]
eventsDetectionJobPropertiesList) (\s :: ListEventsDetectionJobsResponse
s@ListEventsDetectionJobsResponse' {} Maybe [EventsDetectionJobProperties]
a -> ListEventsDetectionJobsResponse
s {$sel:eventsDetectionJobPropertiesList:ListEventsDetectionJobsResponse' :: Maybe [EventsDetectionJobProperties]
eventsDetectionJobPropertiesList = Maybe [EventsDetectionJobProperties]
a} :: ListEventsDetectionJobsResponse) ((Maybe [EventsDetectionJobProperties]
  -> f (Maybe [EventsDetectionJobProperties]))
 -> ListEventsDetectionJobsResponse
 -> f ListEventsDetectionJobsResponse)
-> ((Maybe [EventsDetectionJobProperties]
     -> f (Maybe [EventsDetectionJobProperties]))
    -> Maybe [EventsDetectionJobProperties]
    -> f (Maybe [EventsDetectionJobProperties]))
-> (Maybe [EventsDetectionJobProperties]
    -> f (Maybe [EventsDetectionJobProperties]))
-> ListEventsDetectionJobsResponse
-> f ListEventsDetectionJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EventsDetectionJobProperties]
  [EventsDetectionJobProperties]
  [EventsDetectionJobProperties]
  [EventsDetectionJobProperties]
-> Iso
     (Maybe [EventsDetectionJobProperties])
     (Maybe [EventsDetectionJobProperties])
     (Maybe [EventsDetectionJobProperties])
     (Maybe [EventsDetectionJobProperties])
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
  [EventsDetectionJobProperties]
  [EventsDetectionJobProperties]
  [EventsDetectionJobProperties]
  [EventsDetectionJobProperties]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Identifies the next page of results to return.
listEventsDetectionJobsResponse_nextToken :: Lens.Lens' ListEventsDetectionJobsResponse (Prelude.Maybe Prelude.Text)
listEventsDetectionJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEventsDetectionJobsResponse
-> f ListEventsDetectionJobsResponse
listEventsDetectionJobsResponse_nextToken = (ListEventsDetectionJobsResponse -> Maybe Text)
-> (ListEventsDetectionJobsResponse
    -> Maybe Text -> ListEventsDetectionJobsResponse)
-> Lens
     ListEventsDetectionJobsResponse
     ListEventsDetectionJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventsDetectionJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEventsDetectionJobsResponse' :: ListEventsDetectionJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEventsDetectionJobsResponse
s@ListEventsDetectionJobsResponse' {} Maybe Text
a -> ListEventsDetectionJobsResponse
s {$sel:nextToken:ListEventsDetectionJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEventsDetectionJobsResponse)

-- | The response's http status code.
listEventsDetectionJobsResponse_httpStatus :: Lens.Lens' ListEventsDetectionJobsResponse Prelude.Int
listEventsDetectionJobsResponse_httpStatus :: (Int -> f Int)
-> ListEventsDetectionJobsResponse
-> f ListEventsDetectionJobsResponse
listEventsDetectionJobsResponse_httpStatus = (ListEventsDetectionJobsResponse -> Int)
-> (ListEventsDetectionJobsResponse
    -> Int -> ListEventsDetectionJobsResponse)
-> Lens
     ListEventsDetectionJobsResponse
     ListEventsDetectionJobsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventsDetectionJobsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListEventsDetectionJobsResponse' :: ListEventsDetectionJobsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListEventsDetectionJobsResponse
s@ListEventsDetectionJobsResponse' {} Int
a -> ListEventsDetectionJobsResponse
s {$sel:httpStatus:ListEventsDetectionJobsResponse' :: Int
httpStatus = Int
a} :: ListEventsDetectionJobsResponse)

instance
  Prelude.NFData
    ListEventsDetectionJobsResponse