{-# 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.StartPersonTracking
-- 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)
--
-- Starts the asynchronous tracking of a person\'s path in a stored video.
--
-- Amazon Rekognition Video can track the path of people in a video stored
-- in an Amazon S3 bucket. Use Video to specify the bucket name and the
-- filename of the video. @StartPersonTracking@ returns a job identifier
-- (@JobId@) which you use to get the results of the operation. When label
-- detection is finished, Amazon Rekognition publishes a completion status
-- to the Amazon Simple Notification Service topic that you specify in
-- @NotificationChannel@.
--
-- To get the results of the person detection operation, first check that
-- the status value published to the Amazon SNS topic is @SUCCEEDED@. If
-- so, call GetPersonTracking and pass the job identifier (@JobId@) from
-- the initial call to @StartPersonTracking@.
module Amazonka.Rekognition.StartPersonTracking
  ( -- * Creating a Request
    StartPersonTracking (..),
    newStartPersonTracking,

    -- * Request Lenses
    startPersonTracking_jobTag,
    startPersonTracking_notificationChannel,
    startPersonTracking_clientRequestToken,
    startPersonTracking_video,

    -- * Destructuring the Response
    StartPersonTrackingResponse (..),
    newStartPersonTrackingResponse,

    -- * Response Lenses
    startPersonTrackingResponse_jobId,
    startPersonTrackingResponse_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:/ 'newStartPersonTracking' smart constructor.
data StartPersonTracking = StartPersonTracking'
  { -- | An identifier you specify that\'s returned in the completion
    -- notification that\'s published to your Amazon Simple Notification
    -- Service topic. For example, you can use @JobTag@ to group related jobs
    -- and identify them in the completion notification.
    StartPersonTracking -> Maybe Text
jobTag :: Prelude.Maybe Prelude.Text,
    -- | The Amazon SNS topic ARN you want Amazon Rekognition Video to publish
    -- the completion status of the people detection operation to. The Amazon
    -- SNS topic must have a topic name that begins with /AmazonRekognition/ if
    -- you are using the AmazonRekognitionServiceRole permissions policy.
    StartPersonTracking -> Maybe NotificationChannel
notificationChannel :: Prelude.Maybe NotificationChannel,
    -- | Idempotent token used to identify the start request. If you use the same
    -- token with multiple @StartPersonTracking@ requests, the same @JobId@ is
    -- returned. Use @ClientRequestToken@ to prevent the same job from being
    -- accidently started more than once.
    StartPersonTracking -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The video in which you want to detect people. The video must be stored
    -- in an Amazon S3 bucket.
    StartPersonTracking -> Video
video :: Video
  }
  deriving (StartPersonTracking -> StartPersonTracking -> Bool
(StartPersonTracking -> StartPersonTracking -> Bool)
-> (StartPersonTracking -> StartPersonTracking -> Bool)
-> Eq StartPersonTracking
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPersonTracking -> StartPersonTracking -> Bool
$c/= :: StartPersonTracking -> StartPersonTracking -> Bool
== :: StartPersonTracking -> StartPersonTracking -> Bool
$c== :: StartPersonTracking -> StartPersonTracking -> Bool
Prelude.Eq, ReadPrec [StartPersonTracking]
ReadPrec StartPersonTracking
Int -> ReadS StartPersonTracking
ReadS [StartPersonTracking]
(Int -> ReadS StartPersonTracking)
-> ReadS [StartPersonTracking]
-> ReadPrec StartPersonTracking
-> ReadPrec [StartPersonTracking]
-> Read StartPersonTracking
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPersonTracking]
$creadListPrec :: ReadPrec [StartPersonTracking]
readPrec :: ReadPrec StartPersonTracking
$creadPrec :: ReadPrec StartPersonTracking
readList :: ReadS [StartPersonTracking]
$creadList :: ReadS [StartPersonTracking]
readsPrec :: Int -> ReadS StartPersonTracking
$creadsPrec :: Int -> ReadS StartPersonTracking
Prelude.Read, Int -> StartPersonTracking -> ShowS
[StartPersonTracking] -> ShowS
StartPersonTracking -> String
(Int -> StartPersonTracking -> ShowS)
-> (StartPersonTracking -> String)
-> ([StartPersonTracking] -> ShowS)
-> Show StartPersonTracking
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPersonTracking] -> ShowS
$cshowList :: [StartPersonTracking] -> ShowS
show :: StartPersonTracking -> String
$cshow :: StartPersonTracking -> String
showsPrec :: Int -> StartPersonTracking -> ShowS
$cshowsPrec :: Int -> StartPersonTracking -> ShowS
Prelude.Show, (forall x. StartPersonTracking -> Rep StartPersonTracking x)
-> (forall x. Rep StartPersonTracking x -> StartPersonTracking)
-> Generic StartPersonTracking
forall x. Rep StartPersonTracking x -> StartPersonTracking
forall x. StartPersonTracking -> Rep StartPersonTracking x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartPersonTracking x -> StartPersonTracking
$cfrom :: forall x. StartPersonTracking -> Rep StartPersonTracking x
Prelude.Generic)

-- |
-- Create a value of 'StartPersonTracking' 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:
--
-- 'jobTag', 'startPersonTracking_jobTag' - An identifier you specify that\'s returned in the completion
-- notification that\'s published to your Amazon Simple Notification
-- Service topic. For example, you can use @JobTag@ to group related jobs
-- and identify them in the completion notification.
--
-- 'notificationChannel', 'startPersonTracking_notificationChannel' - The Amazon SNS topic ARN you want Amazon Rekognition Video to publish
-- the completion status of the people detection operation to. The Amazon
-- SNS topic must have a topic name that begins with /AmazonRekognition/ if
-- you are using the AmazonRekognitionServiceRole permissions policy.
--
-- 'clientRequestToken', 'startPersonTracking_clientRequestToken' - Idempotent token used to identify the start request. If you use the same
-- token with multiple @StartPersonTracking@ requests, the same @JobId@ is
-- returned. Use @ClientRequestToken@ to prevent the same job from being
-- accidently started more than once.
--
-- 'video', 'startPersonTracking_video' - The video in which you want to detect people. The video must be stored
-- in an Amazon S3 bucket.
newStartPersonTracking ::
  -- | 'video'
  Video ->
  StartPersonTracking
newStartPersonTracking :: Video -> StartPersonTracking
newStartPersonTracking Video
pVideo_ =
  StartPersonTracking' :: Maybe Text
-> Maybe NotificationChannel
-> Maybe Text
-> Video
-> StartPersonTracking
StartPersonTracking'
    { $sel:jobTag:StartPersonTracking' :: Maybe Text
jobTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationChannel:StartPersonTracking' :: Maybe NotificationChannel
notificationChannel = Maybe NotificationChannel
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartPersonTracking' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:video:StartPersonTracking' :: Video
video = Video
pVideo_
    }

-- | An identifier you specify that\'s returned in the completion
-- notification that\'s published to your Amazon Simple Notification
-- Service topic. For example, you can use @JobTag@ to group related jobs
-- and identify them in the completion notification.
startPersonTracking_jobTag :: Lens.Lens' StartPersonTracking (Prelude.Maybe Prelude.Text)
startPersonTracking_jobTag :: (Maybe Text -> f (Maybe Text))
-> StartPersonTracking -> f StartPersonTracking
startPersonTracking_jobTag = (StartPersonTracking -> Maybe Text)
-> (StartPersonTracking -> Maybe Text -> StartPersonTracking)
-> Lens
     StartPersonTracking StartPersonTracking (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPersonTracking' {Maybe Text
jobTag :: Maybe Text
$sel:jobTag:StartPersonTracking' :: StartPersonTracking -> Maybe Text
jobTag} -> Maybe Text
jobTag) (\s :: StartPersonTracking
s@StartPersonTracking' {} Maybe Text
a -> StartPersonTracking
s {$sel:jobTag:StartPersonTracking' :: Maybe Text
jobTag = Maybe Text
a} :: StartPersonTracking)

-- | The Amazon SNS topic ARN you want Amazon Rekognition Video to publish
-- the completion status of the people detection operation to. The Amazon
-- SNS topic must have a topic name that begins with /AmazonRekognition/ if
-- you are using the AmazonRekognitionServiceRole permissions policy.
startPersonTracking_notificationChannel :: Lens.Lens' StartPersonTracking (Prelude.Maybe NotificationChannel)
startPersonTracking_notificationChannel :: (Maybe NotificationChannel -> f (Maybe NotificationChannel))
-> StartPersonTracking -> f StartPersonTracking
startPersonTracking_notificationChannel = (StartPersonTracking -> Maybe NotificationChannel)
-> (StartPersonTracking
    -> Maybe NotificationChannel -> StartPersonTracking)
-> Lens
     StartPersonTracking
     StartPersonTracking
     (Maybe NotificationChannel)
     (Maybe NotificationChannel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPersonTracking' {Maybe NotificationChannel
notificationChannel :: Maybe NotificationChannel
$sel:notificationChannel:StartPersonTracking' :: StartPersonTracking -> Maybe NotificationChannel
notificationChannel} -> Maybe NotificationChannel
notificationChannel) (\s :: StartPersonTracking
s@StartPersonTracking' {} Maybe NotificationChannel
a -> StartPersonTracking
s {$sel:notificationChannel:StartPersonTracking' :: Maybe NotificationChannel
notificationChannel = Maybe NotificationChannel
a} :: StartPersonTracking)

-- | Idempotent token used to identify the start request. If you use the same
-- token with multiple @StartPersonTracking@ requests, the same @JobId@ is
-- returned. Use @ClientRequestToken@ to prevent the same job from being
-- accidently started more than once.
startPersonTracking_clientRequestToken :: Lens.Lens' StartPersonTracking (Prelude.Maybe Prelude.Text)
startPersonTracking_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartPersonTracking -> f StartPersonTracking
startPersonTracking_clientRequestToken = (StartPersonTracking -> Maybe Text)
-> (StartPersonTracking -> Maybe Text -> StartPersonTracking)
-> Lens
     StartPersonTracking StartPersonTracking (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPersonTracking' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartPersonTracking' :: StartPersonTracking -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartPersonTracking
s@StartPersonTracking' {} Maybe Text
a -> StartPersonTracking
s {$sel:clientRequestToken:StartPersonTracking' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartPersonTracking)

-- | The video in which you want to detect people. The video must be stored
-- in an Amazon S3 bucket.
startPersonTracking_video :: Lens.Lens' StartPersonTracking Video
startPersonTracking_video :: (Video -> f Video) -> StartPersonTracking -> f StartPersonTracking
startPersonTracking_video = (StartPersonTracking -> Video)
-> (StartPersonTracking -> Video -> StartPersonTracking)
-> Lens StartPersonTracking StartPersonTracking Video Video
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPersonTracking' {Video
video :: Video
$sel:video:StartPersonTracking' :: StartPersonTracking -> Video
video} -> Video
video) (\s :: StartPersonTracking
s@StartPersonTracking' {} Video
a -> StartPersonTracking
s {$sel:video:StartPersonTracking' :: Video
video = Video
a} :: StartPersonTracking)

instance Core.AWSRequest StartPersonTracking where
  type
    AWSResponse StartPersonTracking =
      StartPersonTrackingResponse
  request :: StartPersonTracking -> Request StartPersonTracking
request = Service -> StartPersonTracking -> Request StartPersonTracking
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartPersonTracking
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartPersonTracking)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartPersonTracking))
-> Logger
-> Service
-> Proxy StartPersonTracking
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartPersonTracking)))
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 Text -> Int -> StartPersonTrackingResponse
StartPersonTrackingResponse'
            (Maybe Text -> Int -> StartPersonTrackingResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartPersonTrackingResponse)
forall (f :: * -> *) a b. Functor 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
"JobId")
            Either String (Int -> StartPersonTrackingResponse)
-> Either String Int -> Either String StartPersonTrackingResponse
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 StartPersonTracking

instance Prelude.NFData StartPersonTracking

instance Core.ToHeaders StartPersonTracking where
  toHeaders :: StartPersonTracking -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartPersonTracking -> 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.StartPersonTracking" ::
                          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 StartPersonTracking where
  toJSON :: StartPersonTracking -> Value
toJSON StartPersonTracking' {Maybe Text
Maybe NotificationChannel
Video
video :: Video
clientRequestToken :: Maybe Text
notificationChannel :: Maybe NotificationChannel
jobTag :: Maybe Text
$sel:video:StartPersonTracking' :: StartPersonTracking -> Video
$sel:clientRequestToken:StartPersonTracking' :: StartPersonTracking -> Maybe Text
$sel:notificationChannel:StartPersonTracking' :: StartPersonTracking -> Maybe NotificationChannel
$sel:jobTag:StartPersonTracking' :: StartPersonTracking -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"JobTag" 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
jobTag,
            (Text
"NotificationChannel" Text -> NotificationChannel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NotificationChannel -> Pair)
-> Maybe NotificationChannel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationChannel
notificationChannel,
            (Text
"ClientRequestToken" 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
clientRequestToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Video" Text -> Video -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Video
video)
          ]
      )

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

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

-- | /See:/ 'newStartPersonTrackingResponse' smart constructor.
data StartPersonTrackingResponse = StartPersonTrackingResponse'
  { -- | The identifier for the person detection job. Use @JobId@ to identify the
    -- job in a subsequent call to @GetPersonTracking@.
    StartPersonTrackingResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StartPersonTrackingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartPersonTrackingResponse -> StartPersonTrackingResponse -> Bool
(StartPersonTrackingResponse
 -> StartPersonTrackingResponse -> Bool)
-> (StartPersonTrackingResponse
    -> StartPersonTrackingResponse -> Bool)
-> Eq StartPersonTrackingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPersonTrackingResponse -> StartPersonTrackingResponse -> Bool
$c/= :: StartPersonTrackingResponse -> StartPersonTrackingResponse -> Bool
== :: StartPersonTrackingResponse -> StartPersonTrackingResponse -> Bool
$c== :: StartPersonTrackingResponse -> StartPersonTrackingResponse -> Bool
Prelude.Eq, ReadPrec [StartPersonTrackingResponse]
ReadPrec StartPersonTrackingResponse
Int -> ReadS StartPersonTrackingResponse
ReadS [StartPersonTrackingResponse]
(Int -> ReadS StartPersonTrackingResponse)
-> ReadS [StartPersonTrackingResponse]
-> ReadPrec StartPersonTrackingResponse
-> ReadPrec [StartPersonTrackingResponse]
-> Read StartPersonTrackingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPersonTrackingResponse]
$creadListPrec :: ReadPrec [StartPersonTrackingResponse]
readPrec :: ReadPrec StartPersonTrackingResponse
$creadPrec :: ReadPrec StartPersonTrackingResponse
readList :: ReadS [StartPersonTrackingResponse]
$creadList :: ReadS [StartPersonTrackingResponse]
readsPrec :: Int -> ReadS StartPersonTrackingResponse
$creadsPrec :: Int -> ReadS StartPersonTrackingResponse
Prelude.Read, Int -> StartPersonTrackingResponse -> ShowS
[StartPersonTrackingResponse] -> ShowS
StartPersonTrackingResponse -> String
(Int -> StartPersonTrackingResponse -> ShowS)
-> (StartPersonTrackingResponse -> String)
-> ([StartPersonTrackingResponse] -> ShowS)
-> Show StartPersonTrackingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPersonTrackingResponse] -> ShowS
$cshowList :: [StartPersonTrackingResponse] -> ShowS
show :: StartPersonTrackingResponse -> String
$cshow :: StartPersonTrackingResponse -> String
showsPrec :: Int -> StartPersonTrackingResponse -> ShowS
$cshowsPrec :: Int -> StartPersonTrackingResponse -> ShowS
Prelude.Show, (forall x.
 StartPersonTrackingResponse -> Rep StartPersonTrackingResponse x)
-> (forall x.
    Rep StartPersonTrackingResponse x -> StartPersonTrackingResponse)
-> Generic StartPersonTrackingResponse
forall x.
Rep StartPersonTrackingResponse x -> StartPersonTrackingResponse
forall x.
StartPersonTrackingResponse -> Rep StartPersonTrackingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartPersonTrackingResponse x -> StartPersonTrackingResponse
$cfrom :: forall x.
StartPersonTrackingResponse -> Rep StartPersonTrackingResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartPersonTrackingResponse' 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:
--
-- 'jobId', 'startPersonTrackingResponse_jobId' - The identifier for the person detection job. Use @JobId@ to identify the
-- job in a subsequent call to @GetPersonTracking@.
--
-- 'httpStatus', 'startPersonTrackingResponse_httpStatus' - The response's http status code.
newStartPersonTrackingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartPersonTrackingResponse
newStartPersonTrackingResponse :: Int -> StartPersonTrackingResponse
newStartPersonTrackingResponse Int
pHttpStatus_ =
  StartPersonTrackingResponse' :: Maybe Text -> Int -> StartPersonTrackingResponse
StartPersonTrackingResponse'
    { $sel:jobId:StartPersonTrackingResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartPersonTrackingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier for the person detection job. Use @JobId@ to identify the
-- job in a subsequent call to @GetPersonTracking@.
startPersonTrackingResponse_jobId :: Lens.Lens' StartPersonTrackingResponse (Prelude.Maybe Prelude.Text)
startPersonTrackingResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartPersonTrackingResponse -> f StartPersonTrackingResponse
startPersonTrackingResponse_jobId = (StartPersonTrackingResponse -> Maybe Text)
-> (StartPersonTrackingResponse
    -> Maybe Text -> StartPersonTrackingResponse)
-> Lens
     StartPersonTrackingResponse
     StartPersonTrackingResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPersonTrackingResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartPersonTrackingResponse' :: StartPersonTrackingResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartPersonTrackingResponse
s@StartPersonTrackingResponse' {} Maybe Text
a -> StartPersonTrackingResponse
s {$sel:jobId:StartPersonTrackingResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartPersonTrackingResponse)

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

instance Prelude.NFData StartPersonTrackingResponse