{-# 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.Rekognition.ListStreamProcessors
-- 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 stream processors that you have created with
-- CreateStreamProcessor.
--
-- This operation returns paginated results.
module Amazonka.Rekognition.ListStreamProcessors
  ( -- * Creating a Request
    ListStreamProcessors (..),
    newListStreamProcessors,

    -- * Request Lenses
    listStreamProcessors_nextToken,
    listStreamProcessors_maxResults,

    -- * Destructuring the Response
    ListStreamProcessorsResponse (..),
    newListStreamProcessorsResponse,

    -- * Response Lenses
    listStreamProcessorsResponse_streamProcessors,
    listStreamProcessorsResponse_nextToken,
    listStreamProcessorsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListStreamProcessors' smart constructor.
data ListStreamProcessors = ListStreamProcessors'
  { -- | If the previous response was incomplete (because there are more stream
    -- processors to retrieve), Amazon Rekognition Video returns a pagination
    -- token in the response. You can use this pagination token to retrieve the
    -- next set of stream processors.
    ListStreamProcessors -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of stream processors you want Amazon Rekognition Video to
    -- return in the response. The default is 1000.
    ListStreamProcessors -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListStreamProcessors -> ListStreamProcessors -> Bool
(ListStreamProcessors -> ListStreamProcessors -> Bool)
-> (ListStreamProcessors -> ListStreamProcessors -> Bool)
-> Eq ListStreamProcessors
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStreamProcessors -> ListStreamProcessors -> Bool
$c/= :: ListStreamProcessors -> ListStreamProcessors -> Bool
== :: ListStreamProcessors -> ListStreamProcessors -> Bool
$c== :: ListStreamProcessors -> ListStreamProcessors -> Bool
Prelude.Eq, ReadPrec [ListStreamProcessors]
ReadPrec ListStreamProcessors
Int -> ReadS ListStreamProcessors
ReadS [ListStreamProcessors]
(Int -> ReadS ListStreamProcessors)
-> ReadS [ListStreamProcessors]
-> ReadPrec ListStreamProcessors
-> ReadPrec [ListStreamProcessors]
-> Read ListStreamProcessors
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStreamProcessors]
$creadListPrec :: ReadPrec [ListStreamProcessors]
readPrec :: ReadPrec ListStreamProcessors
$creadPrec :: ReadPrec ListStreamProcessors
readList :: ReadS [ListStreamProcessors]
$creadList :: ReadS [ListStreamProcessors]
readsPrec :: Int -> ReadS ListStreamProcessors
$creadsPrec :: Int -> ReadS ListStreamProcessors
Prelude.Read, Int -> ListStreamProcessors -> ShowS
[ListStreamProcessors] -> ShowS
ListStreamProcessors -> String
(Int -> ListStreamProcessors -> ShowS)
-> (ListStreamProcessors -> String)
-> ([ListStreamProcessors] -> ShowS)
-> Show ListStreamProcessors
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStreamProcessors] -> ShowS
$cshowList :: [ListStreamProcessors] -> ShowS
show :: ListStreamProcessors -> String
$cshow :: ListStreamProcessors -> String
showsPrec :: Int -> ListStreamProcessors -> ShowS
$cshowsPrec :: Int -> ListStreamProcessors -> ShowS
Prelude.Show, (forall x. ListStreamProcessors -> Rep ListStreamProcessors x)
-> (forall x. Rep ListStreamProcessors x -> ListStreamProcessors)
-> Generic ListStreamProcessors
forall x. Rep ListStreamProcessors x -> ListStreamProcessors
forall x. ListStreamProcessors -> Rep ListStreamProcessors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStreamProcessors x -> ListStreamProcessors
$cfrom :: forall x. ListStreamProcessors -> Rep ListStreamProcessors x
Prelude.Generic)

-- |
-- Create a value of 'ListStreamProcessors' 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', 'listStreamProcessors_nextToken' - If the previous response was incomplete (because there are more stream
-- processors to retrieve), Amazon Rekognition Video returns a pagination
-- token in the response. You can use this pagination token to retrieve the
-- next set of stream processors.
--
-- 'maxResults', 'listStreamProcessors_maxResults' - Maximum number of stream processors you want Amazon Rekognition Video to
-- return in the response. The default is 1000.
newListStreamProcessors ::
  ListStreamProcessors
newListStreamProcessors :: ListStreamProcessors
newListStreamProcessors =
  ListStreamProcessors' :: Maybe Text -> Maybe Natural -> ListStreamProcessors
ListStreamProcessors'
    { $sel:nextToken:ListStreamProcessors' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListStreamProcessors' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | If the previous response was incomplete (because there are more stream
-- processors to retrieve), Amazon Rekognition Video returns a pagination
-- token in the response. You can use this pagination token to retrieve the
-- next set of stream processors.
listStreamProcessors_nextToken :: Lens.Lens' ListStreamProcessors (Prelude.Maybe Prelude.Text)
listStreamProcessors_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListStreamProcessors -> f ListStreamProcessors
listStreamProcessors_nextToken = (ListStreamProcessors -> Maybe Text)
-> (ListStreamProcessors -> Maybe Text -> ListStreamProcessors)
-> Lens
     ListStreamProcessors ListStreamProcessors (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamProcessors' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStreamProcessors' :: ListStreamProcessors -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStreamProcessors
s@ListStreamProcessors' {} Maybe Text
a -> ListStreamProcessors
s {$sel:nextToken:ListStreamProcessors' :: Maybe Text
nextToken = Maybe Text
a} :: ListStreamProcessors)

-- | Maximum number of stream processors you want Amazon Rekognition Video to
-- return in the response. The default is 1000.
listStreamProcessors_maxResults :: Lens.Lens' ListStreamProcessors (Prelude.Maybe Prelude.Natural)
listStreamProcessors_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListStreamProcessors -> f ListStreamProcessors
listStreamProcessors_maxResults = (ListStreamProcessors -> Maybe Natural)
-> (ListStreamProcessors -> Maybe Natural -> ListStreamProcessors)
-> Lens
     ListStreamProcessors
     ListStreamProcessors
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamProcessors' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListStreamProcessors' :: ListStreamProcessors -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListStreamProcessors
s@ListStreamProcessors' {} Maybe Natural
a -> ListStreamProcessors
s {$sel:maxResults:ListStreamProcessors' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListStreamProcessors)

instance Core.AWSPager ListStreamProcessors where
  page :: ListStreamProcessors
-> AWSResponse ListStreamProcessors -> Maybe ListStreamProcessors
page ListStreamProcessors
rq AWSResponse ListStreamProcessors
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListStreamProcessors
ListStreamProcessorsResponse
rs
            ListStreamProcessorsResponse
-> Getting (First Text) ListStreamProcessorsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListStreamProcessorsResponse
-> Const (First Text) ListStreamProcessorsResponse
Lens' ListStreamProcessorsResponse (Maybe Text)
listStreamProcessorsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListStreamProcessorsResponse
 -> Const (First Text) ListStreamProcessorsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListStreamProcessorsResponse 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 ListStreamProcessors
forall a. Maybe a
Prelude.Nothing
    | Maybe [StreamProcessor] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListStreamProcessors
ListStreamProcessorsResponse
rs
            ListStreamProcessorsResponse
-> Getting
     (First [StreamProcessor])
     ListStreamProcessorsResponse
     [StreamProcessor]
-> Maybe [StreamProcessor]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [StreamProcessor]
 -> Const (First [StreamProcessor]) (Maybe [StreamProcessor]))
-> ListStreamProcessorsResponse
-> Const (First [StreamProcessor]) ListStreamProcessorsResponse
Lens' ListStreamProcessorsResponse (Maybe [StreamProcessor])
listStreamProcessorsResponse_streamProcessors
              ((Maybe [StreamProcessor]
  -> Const (First [StreamProcessor]) (Maybe [StreamProcessor]))
 -> ListStreamProcessorsResponse
 -> Const (First [StreamProcessor]) ListStreamProcessorsResponse)
-> (([StreamProcessor]
     -> Const (First [StreamProcessor]) [StreamProcessor])
    -> Maybe [StreamProcessor]
    -> Const (First [StreamProcessor]) (Maybe [StreamProcessor]))
-> Getting
     (First [StreamProcessor])
     ListStreamProcessorsResponse
     [StreamProcessor]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([StreamProcessor]
 -> Const (First [StreamProcessor]) [StreamProcessor])
-> Maybe [StreamProcessor]
-> Const (First [StreamProcessor]) (Maybe [StreamProcessor])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListStreamProcessors
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListStreamProcessors -> Maybe ListStreamProcessors
forall a. a -> Maybe a
Prelude.Just (ListStreamProcessors -> Maybe ListStreamProcessors)
-> ListStreamProcessors -> Maybe ListStreamProcessors
forall a b. (a -> b) -> a -> b
Prelude.$
        ListStreamProcessors
rq
          ListStreamProcessors
-> (ListStreamProcessors -> ListStreamProcessors)
-> ListStreamProcessors
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListStreamProcessors -> Identity ListStreamProcessors
Lens
  ListStreamProcessors ListStreamProcessors (Maybe Text) (Maybe Text)
listStreamProcessors_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListStreamProcessors -> Identity ListStreamProcessors)
-> Maybe Text -> ListStreamProcessors -> ListStreamProcessors
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListStreamProcessors
ListStreamProcessorsResponse
rs
          ListStreamProcessorsResponse
-> Getting (First Text) ListStreamProcessorsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListStreamProcessorsResponse
-> Const (First Text) ListStreamProcessorsResponse
Lens' ListStreamProcessorsResponse (Maybe Text)
listStreamProcessorsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListStreamProcessorsResponse
 -> Const (First Text) ListStreamProcessorsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListStreamProcessorsResponse 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 ListStreamProcessors where
  type
    AWSResponse ListStreamProcessors =
      ListStreamProcessorsResponse
  request :: ListStreamProcessors -> Request ListStreamProcessors
request = Service -> ListStreamProcessors -> Request ListStreamProcessors
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListStreamProcessors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListStreamProcessors)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListStreamProcessors))
-> Logger
-> Service
-> Proxy ListStreamProcessors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListStreamProcessors)))
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 [StreamProcessor]
-> Maybe Text -> Int -> ListStreamProcessorsResponse
ListStreamProcessorsResponse'
            (Maybe [StreamProcessor]
 -> Maybe Text -> Int -> ListStreamProcessorsResponse)
-> Either String (Maybe [StreamProcessor])
-> Either
     String (Maybe Text -> Int -> ListStreamProcessorsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [StreamProcessor]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StreamProcessors"
                            Either String (Maybe (Maybe [StreamProcessor]))
-> Maybe [StreamProcessor]
-> Either String (Maybe [StreamProcessor])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [StreamProcessor]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListStreamProcessorsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListStreamProcessorsResponse)
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 -> ListStreamProcessorsResponse)
-> Either String Int -> Either String ListStreamProcessorsResponse
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 ListStreamProcessors

instance Prelude.NFData ListStreamProcessors

instance Core.ToHeaders ListStreamProcessors where
  toHeaders :: ListStreamProcessors -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListStreamProcessors -> 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
"RekognitionService.ListStreamProcessors" ::
                          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 ListStreamProcessors where
  toJSON :: ListStreamProcessors -> Value
toJSON ListStreamProcessors' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListStreamProcessors' :: ListStreamProcessors -> Maybe Natural
$sel:nextToken:ListStreamProcessors' :: ListStreamProcessors -> 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
"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 ListStreamProcessors where
  toPath :: ListStreamProcessors -> ByteString
toPath = ByteString -> ListStreamProcessors -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListStreamProcessorsResponse' smart constructor.
data ListStreamProcessorsResponse = ListStreamProcessorsResponse'
  { -- | List of stream processors that you have created.
    ListStreamProcessorsResponse -> Maybe [StreamProcessor]
streamProcessors :: Prelude.Maybe [StreamProcessor],
    -- | If the response is truncated, Amazon Rekognition Video returns this
    -- token that you can use in the subsequent request to retrieve the next
    -- set of stream processors.
    ListStreamProcessorsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListStreamProcessorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListStreamProcessorsResponse
-> ListStreamProcessorsResponse -> Bool
(ListStreamProcessorsResponse
 -> ListStreamProcessorsResponse -> Bool)
-> (ListStreamProcessorsResponse
    -> ListStreamProcessorsResponse -> Bool)
-> Eq ListStreamProcessorsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStreamProcessorsResponse
-> ListStreamProcessorsResponse -> Bool
$c/= :: ListStreamProcessorsResponse
-> ListStreamProcessorsResponse -> Bool
== :: ListStreamProcessorsResponse
-> ListStreamProcessorsResponse -> Bool
$c== :: ListStreamProcessorsResponse
-> ListStreamProcessorsResponse -> Bool
Prelude.Eq, ReadPrec [ListStreamProcessorsResponse]
ReadPrec ListStreamProcessorsResponse
Int -> ReadS ListStreamProcessorsResponse
ReadS [ListStreamProcessorsResponse]
(Int -> ReadS ListStreamProcessorsResponse)
-> ReadS [ListStreamProcessorsResponse]
-> ReadPrec ListStreamProcessorsResponse
-> ReadPrec [ListStreamProcessorsResponse]
-> Read ListStreamProcessorsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStreamProcessorsResponse]
$creadListPrec :: ReadPrec [ListStreamProcessorsResponse]
readPrec :: ReadPrec ListStreamProcessorsResponse
$creadPrec :: ReadPrec ListStreamProcessorsResponse
readList :: ReadS [ListStreamProcessorsResponse]
$creadList :: ReadS [ListStreamProcessorsResponse]
readsPrec :: Int -> ReadS ListStreamProcessorsResponse
$creadsPrec :: Int -> ReadS ListStreamProcessorsResponse
Prelude.Read, Int -> ListStreamProcessorsResponse -> ShowS
[ListStreamProcessorsResponse] -> ShowS
ListStreamProcessorsResponse -> String
(Int -> ListStreamProcessorsResponse -> ShowS)
-> (ListStreamProcessorsResponse -> String)
-> ([ListStreamProcessorsResponse] -> ShowS)
-> Show ListStreamProcessorsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStreamProcessorsResponse] -> ShowS
$cshowList :: [ListStreamProcessorsResponse] -> ShowS
show :: ListStreamProcessorsResponse -> String
$cshow :: ListStreamProcessorsResponse -> String
showsPrec :: Int -> ListStreamProcessorsResponse -> ShowS
$cshowsPrec :: Int -> ListStreamProcessorsResponse -> ShowS
Prelude.Show, (forall x.
 ListStreamProcessorsResponse -> Rep ListStreamProcessorsResponse x)
-> (forall x.
    Rep ListStreamProcessorsResponse x -> ListStreamProcessorsResponse)
-> Generic ListStreamProcessorsResponse
forall x.
Rep ListStreamProcessorsResponse x -> ListStreamProcessorsResponse
forall x.
ListStreamProcessorsResponse -> Rep ListStreamProcessorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListStreamProcessorsResponse x -> ListStreamProcessorsResponse
$cfrom :: forall x.
ListStreamProcessorsResponse -> Rep ListStreamProcessorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListStreamProcessorsResponse' 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:
--
-- 'streamProcessors', 'listStreamProcessorsResponse_streamProcessors' - List of stream processors that you have created.
--
-- 'nextToken', 'listStreamProcessorsResponse_nextToken' - If the response is truncated, Amazon Rekognition Video returns this
-- token that you can use in the subsequent request to retrieve the next
-- set of stream processors.
--
-- 'httpStatus', 'listStreamProcessorsResponse_httpStatus' - The response's http status code.
newListStreamProcessorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListStreamProcessorsResponse
newListStreamProcessorsResponse :: Int -> ListStreamProcessorsResponse
newListStreamProcessorsResponse Int
pHttpStatus_ =
  ListStreamProcessorsResponse' :: Maybe [StreamProcessor]
-> Maybe Text -> Int -> ListStreamProcessorsResponse
ListStreamProcessorsResponse'
    { $sel:streamProcessors:ListStreamProcessorsResponse' :: Maybe [StreamProcessor]
streamProcessors =
        Maybe [StreamProcessor]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListStreamProcessorsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListStreamProcessorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | List of stream processors that you have created.
listStreamProcessorsResponse_streamProcessors :: Lens.Lens' ListStreamProcessorsResponse (Prelude.Maybe [StreamProcessor])
listStreamProcessorsResponse_streamProcessors :: (Maybe [StreamProcessor] -> f (Maybe [StreamProcessor]))
-> ListStreamProcessorsResponse -> f ListStreamProcessorsResponse
listStreamProcessorsResponse_streamProcessors = (ListStreamProcessorsResponse -> Maybe [StreamProcessor])
-> (ListStreamProcessorsResponse
    -> Maybe [StreamProcessor] -> ListStreamProcessorsResponse)
-> Lens' ListStreamProcessorsResponse (Maybe [StreamProcessor])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamProcessorsResponse' {Maybe [StreamProcessor]
streamProcessors :: Maybe [StreamProcessor]
$sel:streamProcessors:ListStreamProcessorsResponse' :: ListStreamProcessorsResponse -> Maybe [StreamProcessor]
streamProcessors} -> Maybe [StreamProcessor]
streamProcessors) (\s :: ListStreamProcessorsResponse
s@ListStreamProcessorsResponse' {} Maybe [StreamProcessor]
a -> ListStreamProcessorsResponse
s {$sel:streamProcessors:ListStreamProcessorsResponse' :: Maybe [StreamProcessor]
streamProcessors = Maybe [StreamProcessor]
a} :: ListStreamProcessorsResponse) ((Maybe [StreamProcessor] -> f (Maybe [StreamProcessor]))
 -> ListStreamProcessorsResponse -> f ListStreamProcessorsResponse)
-> ((Maybe [StreamProcessor] -> f (Maybe [StreamProcessor]))
    -> Maybe [StreamProcessor] -> f (Maybe [StreamProcessor]))
-> (Maybe [StreamProcessor] -> f (Maybe [StreamProcessor]))
-> ListStreamProcessorsResponse
-> f ListStreamProcessorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StreamProcessor]
  [StreamProcessor]
  [StreamProcessor]
  [StreamProcessor]
-> Iso
     (Maybe [StreamProcessor])
     (Maybe [StreamProcessor])
     (Maybe [StreamProcessor])
     (Maybe [StreamProcessor])
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
  [StreamProcessor]
  [StreamProcessor]
  [StreamProcessor]
  [StreamProcessor]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the response is truncated, Amazon Rekognition Video returns this
-- token that you can use in the subsequent request to retrieve the next
-- set of stream processors.
listStreamProcessorsResponse_nextToken :: Lens.Lens' ListStreamProcessorsResponse (Prelude.Maybe Prelude.Text)
listStreamProcessorsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListStreamProcessorsResponse -> f ListStreamProcessorsResponse
listStreamProcessorsResponse_nextToken = (ListStreamProcessorsResponse -> Maybe Text)
-> (ListStreamProcessorsResponse
    -> Maybe Text -> ListStreamProcessorsResponse)
-> Lens' ListStreamProcessorsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamProcessorsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStreamProcessorsResponse' :: ListStreamProcessorsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStreamProcessorsResponse
s@ListStreamProcessorsResponse' {} Maybe Text
a -> ListStreamProcessorsResponse
s {$sel:nextToken:ListStreamProcessorsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListStreamProcessorsResponse)

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

instance Prelude.NFData ListStreamProcessorsResponse