{-# 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.DescribeStreamProcessor
-- 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)
--
-- Provides information about a stream processor created by
-- CreateStreamProcessor. You can get information about the input and
-- output streams, the input parameters for the face recognition being
-- performed, and the current status of the stream processor.
module Amazonka.Rekognition.DescribeStreamProcessor
  ( -- * Creating a Request
    DescribeStreamProcessor (..),
    newDescribeStreamProcessor,

    -- * Request Lenses
    describeStreamProcessor_name,

    -- * Destructuring the Response
    DescribeStreamProcessorResponse (..),
    newDescribeStreamProcessorResponse,

    -- * Response Lenses
    describeStreamProcessorResponse_status,
    describeStreamProcessorResponse_settings,
    describeStreamProcessorResponse_input,
    describeStreamProcessorResponse_output,
    describeStreamProcessorResponse_streamProcessorArn,
    describeStreamProcessorResponse_statusMessage,
    describeStreamProcessorResponse_name,
    describeStreamProcessorResponse_creationTimestamp,
    describeStreamProcessorResponse_lastUpdateTimestamp,
    describeStreamProcessorResponse_roleArn,
    describeStreamProcessorResponse_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:/ 'newDescribeStreamProcessor' smart constructor.
data DescribeStreamProcessor = DescribeStreamProcessor'
  { -- | Name of the stream processor for which you want information.
    DescribeStreamProcessor -> Text
name :: Prelude.Text
  }
  deriving (DescribeStreamProcessor -> DescribeStreamProcessor -> Bool
(DescribeStreamProcessor -> DescribeStreamProcessor -> Bool)
-> (DescribeStreamProcessor -> DescribeStreamProcessor -> Bool)
-> Eq DescribeStreamProcessor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStreamProcessor -> DescribeStreamProcessor -> Bool
$c/= :: DescribeStreamProcessor -> DescribeStreamProcessor -> Bool
== :: DescribeStreamProcessor -> DescribeStreamProcessor -> Bool
$c== :: DescribeStreamProcessor -> DescribeStreamProcessor -> Bool
Prelude.Eq, ReadPrec [DescribeStreamProcessor]
ReadPrec DescribeStreamProcessor
Int -> ReadS DescribeStreamProcessor
ReadS [DescribeStreamProcessor]
(Int -> ReadS DescribeStreamProcessor)
-> ReadS [DescribeStreamProcessor]
-> ReadPrec DescribeStreamProcessor
-> ReadPrec [DescribeStreamProcessor]
-> Read DescribeStreamProcessor
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStreamProcessor]
$creadListPrec :: ReadPrec [DescribeStreamProcessor]
readPrec :: ReadPrec DescribeStreamProcessor
$creadPrec :: ReadPrec DescribeStreamProcessor
readList :: ReadS [DescribeStreamProcessor]
$creadList :: ReadS [DescribeStreamProcessor]
readsPrec :: Int -> ReadS DescribeStreamProcessor
$creadsPrec :: Int -> ReadS DescribeStreamProcessor
Prelude.Read, Int -> DescribeStreamProcessor -> ShowS
[DescribeStreamProcessor] -> ShowS
DescribeStreamProcessor -> String
(Int -> DescribeStreamProcessor -> ShowS)
-> (DescribeStreamProcessor -> String)
-> ([DescribeStreamProcessor] -> ShowS)
-> Show DescribeStreamProcessor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStreamProcessor] -> ShowS
$cshowList :: [DescribeStreamProcessor] -> ShowS
show :: DescribeStreamProcessor -> String
$cshow :: DescribeStreamProcessor -> String
showsPrec :: Int -> DescribeStreamProcessor -> ShowS
$cshowsPrec :: Int -> DescribeStreamProcessor -> ShowS
Prelude.Show, (forall x.
 DescribeStreamProcessor -> Rep DescribeStreamProcessor x)
-> (forall x.
    Rep DescribeStreamProcessor x -> DescribeStreamProcessor)
-> Generic DescribeStreamProcessor
forall x. Rep DescribeStreamProcessor x -> DescribeStreamProcessor
forall x. DescribeStreamProcessor -> Rep DescribeStreamProcessor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeStreamProcessor x -> DescribeStreamProcessor
$cfrom :: forall x. DescribeStreamProcessor -> Rep DescribeStreamProcessor x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStreamProcessor' 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:
--
-- 'name', 'describeStreamProcessor_name' - Name of the stream processor for which you want information.
newDescribeStreamProcessor ::
  -- | 'name'
  Prelude.Text ->
  DescribeStreamProcessor
newDescribeStreamProcessor :: Text -> DescribeStreamProcessor
newDescribeStreamProcessor Text
pName_ =
  DescribeStreamProcessor' :: Text -> DescribeStreamProcessor
DescribeStreamProcessor' {$sel:name:DescribeStreamProcessor' :: Text
name = Text
pName_}

-- | Name of the stream processor for which you want information.
describeStreamProcessor_name :: Lens.Lens' DescribeStreamProcessor Prelude.Text
describeStreamProcessor_name :: (Text -> f Text)
-> DescribeStreamProcessor -> f DescribeStreamProcessor
describeStreamProcessor_name = (DescribeStreamProcessor -> Text)
-> (DescribeStreamProcessor -> Text -> DescribeStreamProcessor)
-> Lens DescribeStreamProcessor DescribeStreamProcessor Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessor' {Text
name :: Text
$sel:name:DescribeStreamProcessor' :: DescribeStreamProcessor -> Text
name} -> Text
name) (\s :: DescribeStreamProcessor
s@DescribeStreamProcessor' {} Text
a -> DescribeStreamProcessor
s {$sel:name:DescribeStreamProcessor' :: Text
name = Text
a} :: DescribeStreamProcessor)

instance Core.AWSRequest DescribeStreamProcessor where
  type
    AWSResponse DescribeStreamProcessor =
      DescribeStreamProcessorResponse
  request :: DescribeStreamProcessor -> Request DescribeStreamProcessor
request = Service
-> DescribeStreamProcessor -> Request DescribeStreamProcessor
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeStreamProcessor
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeStreamProcessor)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeStreamProcessor))
-> Logger
-> Service
-> Proxy DescribeStreamProcessor
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeStreamProcessor)))
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 StreamProcessorStatus
-> Maybe StreamProcessorSettings
-> Maybe StreamProcessorInput
-> Maybe StreamProcessorOutput
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeStreamProcessorResponse
DescribeStreamProcessorResponse'
            (Maybe StreamProcessorStatus
 -> Maybe StreamProcessorSettings
 -> Maybe StreamProcessorInput
 -> Maybe StreamProcessorOutput
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> DescribeStreamProcessorResponse)
-> Either String (Maybe StreamProcessorStatus)
-> Either
     String
     (Maybe StreamProcessorSettings
      -> Maybe StreamProcessorInput
      -> Maybe StreamProcessorOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe StreamProcessorStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe StreamProcessorSettings
   -> Maybe StreamProcessorInput
   -> Maybe StreamProcessorOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe StreamProcessorSettings)
-> Either
     String
     (Maybe StreamProcessorInput
      -> Maybe StreamProcessorOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe StreamProcessorSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Settings")
            Either
  String
  (Maybe StreamProcessorInput
   -> Maybe StreamProcessorOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe StreamProcessorInput)
-> Either
     String
     (Maybe StreamProcessorOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe StreamProcessorInput)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Input")
            Either
  String
  (Maybe StreamProcessorOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe StreamProcessorOutput)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe StreamProcessorOutput)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Output")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
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
"StreamProcessorArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
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
"StatusMessage")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeStreamProcessorResponse)
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
"Name")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeStreamProcessorResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text -> Int -> DescribeStreamProcessorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTimestamp")
            Either
  String
  (Maybe POSIX
   -> Maybe Text -> Int -> DescribeStreamProcessorResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe Text -> Int -> DescribeStreamProcessorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdateTimestamp")
            Either
  String (Maybe Text -> Int -> DescribeStreamProcessorResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeStreamProcessorResponse)
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
"RoleArn")
            Either String (Int -> DescribeStreamProcessorResponse)
-> Either String Int
-> Either String DescribeStreamProcessorResponse
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 DescribeStreamProcessor

instance Prelude.NFData DescribeStreamProcessor

instance Core.ToHeaders DescribeStreamProcessor where
  toHeaders :: DescribeStreamProcessor -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeStreamProcessor -> 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.DescribeStreamProcessor" ::
                          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 DescribeStreamProcessor where
  toJSON :: DescribeStreamProcessor -> Value
toJSON DescribeStreamProcessor' {Text
name :: Text
$sel:name:DescribeStreamProcessor' :: DescribeStreamProcessor -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
      )

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

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

-- | /See:/ 'newDescribeStreamProcessorResponse' smart constructor.
data DescribeStreamProcessorResponse = DescribeStreamProcessorResponse'
  { -- | Current status of the stream processor.
    DescribeStreamProcessorResponse -> Maybe StreamProcessorStatus
status :: Prelude.Maybe StreamProcessorStatus,
    -- | Face recognition input parameters that are being used by the stream
    -- processor. Includes the collection to use for face recognition and the
    -- face attributes to detect.
    DescribeStreamProcessorResponse -> Maybe StreamProcessorSettings
settings :: Prelude.Maybe StreamProcessorSettings,
    -- | Kinesis video stream that provides the source streaming video.
    DescribeStreamProcessorResponse -> Maybe StreamProcessorInput
input :: Prelude.Maybe StreamProcessorInput,
    -- | Kinesis data stream to which Amazon Rekognition Video puts the analysis
    -- results.
    DescribeStreamProcessorResponse -> Maybe StreamProcessorOutput
output :: Prelude.Maybe StreamProcessorOutput,
    -- | ARN of the stream processor.
    DescribeStreamProcessorResponse -> Maybe Text
streamProcessorArn :: Prelude.Maybe Prelude.Text,
    -- | Detailed status message about the stream processor.
    DescribeStreamProcessorResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | Name of the stream processor.
    DescribeStreamProcessorResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Date and time the stream processor was created
    DescribeStreamProcessorResponse -> Maybe POSIX
creationTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The time, in Unix format, the stream processor was last updated. For
    -- example, when the stream processor moves from a running state to a
    -- failed state, or when the user starts or stops the stream processor.
    DescribeStreamProcessorResponse -> Maybe POSIX
lastUpdateTimestamp :: Prelude.Maybe Core.POSIX,
    -- | ARN of the IAM role that allows access to the stream processor.
    DescribeStreamProcessorResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeStreamProcessorResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeStreamProcessorResponse
-> DescribeStreamProcessorResponse -> Bool
(DescribeStreamProcessorResponse
 -> DescribeStreamProcessorResponse -> Bool)
-> (DescribeStreamProcessorResponse
    -> DescribeStreamProcessorResponse -> Bool)
-> Eq DescribeStreamProcessorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStreamProcessorResponse
-> DescribeStreamProcessorResponse -> Bool
$c/= :: DescribeStreamProcessorResponse
-> DescribeStreamProcessorResponse -> Bool
== :: DescribeStreamProcessorResponse
-> DescribeStreamProcessorResponse -> Bool
$c== :: DescribeStreamProcessorResponse
-> DescribeStreamProcessorResponse -> Bool
Prelude.Eq, ReadPrec [DescribeStreamProcessorResponse]
ReadPrec DescribeStreamProcessorResponse
Int -> ReadS DescribeStreamProcessorResponse
ReadS [DescribeStreamProcessorResponse]
(Int -> ReadS DescribeStreamProcessorResponse)
-> ReadS [DescribeStreamProcessorResponse]
-> ReadPrec DescribeStreamProcessorResponse
-> ReadPrec [DescribeStreamProcessorResponse]
-> Read DescribeStreamProcessorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStreamProcessorResponse]
$creadListPrec :: ReadPrec [DescribeStreamProcessorResponse]
readPrec :: ReadPrec DescribeStreamProcessorResponse
$creadPrec :: ReadPrec DescribeStreamProcessorResponse
readList :: ReadS [DescribeStreamProcessorResponse]
$creadList :: ReadS [DescribeStreamProcessorResponse]
readsPrec :: Int -> ReadS DescribeStreamProcessorResponse
$creadsPrec :: Int -> ReadS DescribeStreamProcessorResponse
Prelude.Read, Int -> DescribeStreamProcessorResponse -> ShowS
[DescribeStreamProcessorResponse] -> ShowS
DescribeStreamProcessorResponse -> String
(Int -> DescribeStreamProcessorResponse -> ShowS)
-> (DescribeStreamProcessorResponse -> String)
-> ([DescribeStreamProcessorResponse] -> ShowS)
-> Show DescribeStreamProcessorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStreamProcessorResponse] -> ShowS
$cshowList :: [DescribeStreamProcessorResponse] -> ShowS
show :: DescribeStreamProcessorResponse -> String
$cshow :: DescribeStreamProcessorResponse -> String
showsPrec :: Int -> DescribeStreamProcessorResponse -> ShowS
$cshowsPrec :: Int -> DescribeStreamProcessorResponse -> ShowS
Prelude.Show, (forall x.
 DescribeStreamProcessorResponse
 -> Rep DescribeStreamProcessorResponse x)
-> (forall x.
    Rep DescribeStreamProcessorResponse x
    -> DescribeStreamProcessorResponse)
-> Generic DescribeStreamProcessorResponse
forall x.
Rep DescribeStreamProcessorResponse x
-> DescribeStreamProcessorResponse
forall x.
DescribeStreamProcessorResponse
-> Rep DescribeStreamProcessorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStreamProcessorResponse x
-> DescribeStreamProcessorResponse
$cfrom :: forall x.
DescribeStreamProcessorResponse
-> Rep DescribeStreamProcessorResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStreamProcessorResponse' 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:
--
-- 'status', 'describeStreamProcessorResponse_status' - Current status of the stream processor.
--
-- 'settings', 'describeStreamProcessorResponse_settings' - Face recognition input parameters that are being used by the stream
-- processor. Includes the collection to use for face recognition and the
-- face attributes to detect.
--
-- 'input', 'describeStreamProcessorResponse_input' - Kinesis video stream that provides the source streaming video.
--
-- 'output', 'describeStreamProcessorResponse_output' - Kinesis data stream to which Amazon Rekognition Video puts the analysis
-- results.
--
-- 'streamProcessorArn', 'describeStreamProcessorResponse_streamProcessorArn' - ARN of the stream processor.
--
-- 'statusMessage', 'describeStreamProcessorResponse_statusMessage' - Detailed status message about the stream processor.
--
-- 'name', 'describeStreamProcessorResponse_name' - Name of the stream processor.
--
-- 'creationTimestamp', 'describeStreamProcessorResponse_creationTimestamp' - Date and time the stream processor was created
--
-- 'lastUpdateTimestamp', 'describeStreamProcessorResponse_lastUpdateTimestamp' - The time, in Unix format, the stream processor was last updated. For
-- example, when the stream processor moves from a running state to a
-- failed state, or when the user starts or stops the stream processor.
--
-- 'roleArn', 'describeStreamProcessorResponse_roleArn' - ARN of the IAM role that allows access to the stream processor.
--
-- 'httpStatus', 'describeStreamProcessorResponse_httpStatus' - The response's http status code.
newDescribeStreamProcessorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeStreamProcessorResponse
newDescribeStreamProcessorResponse :: Int -> DescribeStreamProcessorResponse
newDescribeStreamProcessorResponse Int
pHttpStatus_ =
  DescribeStreamProcessorResponse' :: Maybe StreamProcessorStatus
-> Maybe StreamProcessorSettings
-> Maybe StreamProcessorInput
-> Maybe StreamProcessorOutput
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeStreamProcessorResponse
DescribeStreamProcessorResponse'
    { $sel:status:DescribeStreamProcessorResponse' :: Maybe StreamProcessorStatus
status =
        Maybe StreamProcessorStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:settings:DescribeStreamProcessorResponse' :: Maybe StreamProcessorSettings
settings = Maybe StreamProcessorSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:input:DescribeStreamProcessorResponse' :: Maybe StreamProcessorInput
input = Maybe StreamProcessorInput
forall a. Maybe a
Prelude.Nothing,
      $sel:output:DescribeStreamProcessorResponse' :: Maybe StreamProcessorOutput
output = Maybe StreamProcessorOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:streamProcessorArn:DescribeStreamProcessorResponse' :: Maybe Text
streamProcessorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:DescribeStreamProcessorResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeStreamProcessorResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:DescribeStreamProcessorResponse' :: Maybe POSIX
creationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateTimestamp:DescribeStreamProcessorResponse' :: Maybe POSIX
lastUpdateTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DescribeStreamProcessorResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeStreamProcessorResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Current status of the stream processor.
describeStreamProcessorResponse_status :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe StreamProcessorStatus)
describeStreamProcessorResponse_status :: (Maybe StreamProcessorStatus -> f (Maybe StreamProcessorStatus))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_status = (DescribeStreamProcessorResponse -> Maybe StreamProcessorStatus)
-> (DescribeStreamProcessorResponse
    -> Maybe StreamProcessorStatus -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe StreamProcessorStatus)
     (Maybe StreamProcessorStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe StreamProcessorStatus
status :: Maybe StreamProcessorStatus
$sel:status:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe StreamProcessorStatus
status} -> Maybe StreamProcessorStatus
status) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe StreamProcessorStatus
a -> DescribeStreamProcessorResponse
s {$sel:status:DescribeStreamProcessorResponse' :: Maybe StreamProcessorStatus
status = Maybe StreamProcessorStatus
a} :: DescribeStreamProcessorResponse)

-- | Face recognition input parameters that are being used by the stream
-- processor. Includes the collection to use for face recognition and the
-- face attributes to detect.
describeStreamProcessorResponse_settings :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe StreamProcessorSettings)
describeStreamProcessorResponse_settings :: (Maybe StreamProcessorSettings
 -> f (Maybe StreamProcessorSettings))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_settings = (DescribeStreamProcessorResponse -> Maybe StreamProcessorSettings)
-> (DescribeStreamProcessorResponse
    -> Maybe StreamProcessorSettings
    -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe StreamProcessorSettings)
     (Maybe StreamProcessorSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe StreamProcessorSettings
settings :: Maybe StreamProcessorSettings
$sel:settings:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe StreamProcessorSettings
settings} -> Maybe StreamProcessorSettings
settings) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe StreamProcessorSettings
a -> DescribeStreamProcessorResponse
s {$sel:settings:DescribeStreamProcessorResponse' :: Maybe StreamProcessorSettings
settings = Maybe StreamProcessorSettings
a} :: DescribeStreamProcessorResponse)

-- | Kinesis video stream that provides the source streaming video.
describeStreamProcessorResponse_input :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe StreamProcessorInput)
describeStreamProcessorResponse_input :: (Maybe StreamProcessorInput -> f (Maybe StreamProcessorInput))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_input = (DescribeStreamProcessorResponse -> Maybe StreamProcessorInput)
-> (DescribeStreamProcessorResponse
    -> Maybe StreamProcessorInput -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe StreamProcessorInput)
     (Maybe StreamProcessorInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe StreamProcessorInput
input :: Maybe StreamProcessorInput
$sel:input:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe StreamProcessorInput
input} -> Maybe StreamProcessorInput
input) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe StreamProcessorInput
a -> DescribeStreamProcessorResponse
s {$sel:input:DescribeStreamProcessorResponse' :: Maybe StreamProcessorInput
input = Maybe StreamProcessorInput
a} :: DescribeStreamProcessorResponse)

-- | Kinesis data stream to which Amazon Rekognition Video puts the analysis
-- results.
describeStreamProcessorResponse_output :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe StreamProcessorOutput)
describeStreamProcessorResponse_output :: (Maybe StreamProcessorOutput -> f (Maybe StreamProcessorOutput))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_output = (DescribeStreamProcessorResponse -> Maybe StreamProcessorOutput)
-> (DescribeStreamProcessorResponse
    -> Maybe StreamProcessorOutput -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe StreamProcessorOutput)
     (Maybe StreamProcessorOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe StreamProcessorOutput
output :: Maybe StreamProcessorOutput
$sel:output:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe StreamProcessorOutput
output} -> Maybe StreamProcessorOutput
output) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe StreamProcessorOutput
a -> DescribeStreamProcessorResponse
s {$sel:output:DescribeStreamProcessorResponse' :: Maybe StreamProcessorOutput
output = Maybe StreamProcessorOutput
a} :: DescribeStreamProcessorResponse)

-- | ARN of the stream processor.
describeStreamProcessorResponse_streamProcessorArn :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe Prelude.Text)
describeStreamProcessorResponse_streamProcessorArn :: (Maybe Text -> f (Maybe Text))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_streamProcessorArn = (DescribeStreamProcessorResponse -> Maybe Text)
-> (DescribeStreamProcessorResponse
    -> Maybe Text -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe Text
streamProcessorArn :: Maybe Text
$sel:streamProcessorArn:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe Text
streamProcessorArn} -> Maybe Text
streamProcessorArn) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe Text
a -> DescribeStreamProcessorResponse
s {$sel:streamProcessorArn:DescribeStreamProcessorResponse' :: Maybe Text
streamProcessorArn = Maybe Text
a} :: DescribeStreamProcessorResponse)

-- | Detailed status message about the stream processor.
describeStreamProcessorResponse_statusMessage :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe Prelude.Text)
describeStreamProcessorResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_statusMessage = (DescribeStreamProcessorResponse -> Maybe Text)
-> (DescribeStreamProcessorResponse
    -> Maybe Text -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe Text
a -> DescribeStreamProcessorResponse
s {$sel:statusMessage:DescribeStreamProcessorResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: DescribeStreamProcessorResponse)

-- | Name of the stream processor.
describeStreamProcessorResponse_name :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe Prelude.Text)
describeStreamProcessorResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_name = (DescribeStreamProcessorResponse -> Maybe Text)
-> (DescribeStreamProcessorResponse
    -> Maybe Text -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe Text
a -> DescribeStreamProcessorResponse
s {$sel:name:DescribeStreamProcessorResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeStreamProcessorResponse)

-- | Date and time the stream processor was created
describeStreamProcessorResponse_creationTimestamp :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe Prelude.UTCTime)
describeStreamProcessorResponse_creationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_creationTimestamp = (DescribeStreamProcessorResponse -> Maybe POSIX)
-> (DescribeStreamProcessorResponse
    -> Maybe POSIX -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe POSIX
creationTimestamp :: Maybe POSIX
$sel:creationTimestamp:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe POSIX
creationTimestamp} -> Maybe POSIX
creationTimestamp) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe POSIX
a -> DescribeStreamProcessorResponse
s {$sel:creationTimestamp:DescribeStreamProcessorResponse' :: Maybe POSIX
creationTimestamp = Maybe POSIX
a} :: DescribeStreamProcessorResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeStreamProcessorResponse
 -> f DescribeStreamProcessorResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time, in Unix format, the stream processor was last updated. For
-- example, when the stream processor moves from a running state to a
-- failed state, or when the user starts or stops the stream processor.
describeStreamProcessorResponse_lastUpdateTimestamp :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe Prelude.UTCTime)
describeStreamProcessorResponse_lastUpdateTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_lastUpdateTimestamp = (DescribeStreamProcessorResponse -> Maybe POSIX)
-> (DescribeStreamProcessorResponse
    -> Maybe POSIX -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe POSIX
lastUpdateTimestamp :: Maybe POSIX
$sel:lastUpdateTimestamp:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe POSIX
lastUpdateTimestamp} -> Maybe POSIX
lastUpdateTimestamp) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe POSIX
a -> DescribeStreamProcessorResponse
s {$sel:lastUpdateTimestamp:DescribeStreamProcessorResponse' :: Maybe POSIX
lastUpdateTimestamp = Maybe POSIX
a} :: DescribeStreamProcessorResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeStreamProcessorResponse
 -> f DescribeStreamProcessorResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | ARN of the IAM role that allows access to the stream processor.
describeStreamProcessorResponse_roleArn :: Lens.Lens' DescribeStreamProcessorResponse (Prelude.Maybe Prelude.Text)
describeStreamProcessorResponse_roleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeStreamProcessorResponse
-> f DescribeStreamProcessorResponse
describeStreamProcessorResponse_roleArn = (DescribeStreamProcessorResponse -> Maybe Text)
-> (DescribeStreamProcessorResponse
    -> Maybe Text -> DescribeStreamProcessorResponse)
-> Lens
     DescribeStreamProcessorResponse
     DescribeStreamProcessorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStreamProcessorResponse' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DescribeStreamProcessorResponse' :: DescribeStreamProcessorResponse -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DescribeStreamProcessorResponse
s@DescribeStreamProcessorResponse' {} Maybe Text
a -> DescribeStreamProcessorResponse
s {$sel:roleArn:DescribeStreamProcessorResponse' :: Maybe Text
roleArn = Maybe Text
a} :: DescribeStreamProcessorResponse)

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

instance
  Prelude.NFData
    DescribeStreamProcessorResponse