{-# 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.StartFaceSearch
-- 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 search for faces in a collection that match the
-- faces of persons detected in a stored video.
--
-- The video must be stored in an Amazon S3 bucket. Use Video to specify
-- the bucket name and the filename of the video. @StartFaceSearch@ returns
-- a job identifier (@JobId@) which you use to get the search results once
-- the search has completed. When searching is finished, Amazon Rekognition
-- Video publishes a completion status to the Amazon Simple Notification
-- Service topic that you specify in @NotificationChannel@. To get the
-- search results, first check that the status value published to the
-- Amazon SNS topic is @SUCCEEDED@. If so, call GetFaceSearch and pass the
-- job identifier (@JobId@) from the initial call to @StartFaceSearch@. For
-- more information, see procedure-person-search-videos.
module Amazonka.Rekognition.StartFaceSearch
  ( -- * Creating a Request
    StartFaceSearch (..),
    newStartFaceSearch,

    -- * Request Lenses
    startFaceSearch_faceMatchThreshold,
    startFaceSearch_jobTag,
    startFaceSearch_notificationChannel,
    startFaceSearch_clientRequestToken,
    startFaceSearch_video,
    startFaceSearch_collectionId,

    -- * Destructuring the Response
    StartFaceSearchResponse (..),
    newStartFaceSearchResponse,

    -- * Response Lenses
    startFaceSearchResponse_jobId,
    startFaceSearchResponse_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:/ 'newStartFaceSearch' smart constructor.
data StartFaceSearch = StartFaceSearch'
  { -- | The minimum confidence in the person match to return. For example,
    -- don\'t return any matches where confidence in matches is less than 70%.
    -- The default value is 80%.
    StartFaceSearch -> Maybe Double
faceMatchThreshold :: Prelude.Maybe Prelude.Double,
    -- | 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.
    StartFaceSearch -> Maybe Text
jobTag :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon SNS topic to which you want Amazon Rekognition
    -- Video to publish the completion status of the search. The Amazon SNS
    -- topic must have a topic name that begins with /AmazonRekognition/ if you
    -- are using the AmazonRekognitionServiceRole permissions policy to access
    -- the topic.
    StartFaceSearch -> Maybe NotificationChannel
notificationChannel :: Prelude.Maybe NotificationChannel,
    -- | Idempotent token used to identify the start request. If you use the same
    -- token with multiple @StartFaceSearch@ requests, the same @JobId@ is
    -- returned. Use @ClientRequestToken@ to prevent the same job from being
    -- accidently started more than once.
    StartFaceSearch -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The video you want to search. The video must be stored in an Amazon S3
    -- bucket.
    StartFaceSearch -> Video
video :: Video,
    -- | ID of the collection that contains the faces you want to search for.
    StartFaceSearch -> Text
collectionId :: Prelude.Text
  }
  deriving (StartFaceSearch -> StartFaceSearch -> Bool
(StartFaceSearch -> StartFaceSearch -> Bool)
-> (StartFaceSearch -> StartFaceSearch -> Bool)
-> Eq StartFaceSearch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartFaceSearch -> StartFaceSearch -> Bool
$c/= :: StartFaceSearch -> StartFaceSearch -> Bool
== :: StartFaceSearch -> StartFaceSearch -> Bool
$c== :: StartFaceSearch -> StartFaceSearch -> Bool
Prelude.Eq, ReadPrec [StartFaceSearch]
ReadPrec StartFaceSearch
Int -> ReadS StartFaceSearch
ReadS [StartFaceSearch]
(Int -> ReadS StartFaceSearch)
-> ReadS [StartFaceSearch]
-> ReadPrec StartFaceSearch
-> ReadPrec [StartFaceSearch]
-> Read StartFaceSearch
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartFaceSearch]
$creadListPrec :: ReadPrec [StartFaceSearch]
readPrec :: ReadPrec StartFaceSearch
$creadPrec :: ReadPrec StartFaceSearch
readList :: ReadS [StartFaceSearch]
$creadList :: ReadS [StartFaceSearch]
readsPrec :: Int -> ReadS StartFaceSearch
$creadsPrec :: Int -> ReadS StartFaceSearch
Prelude.Read, Int -> StartFaceSearch -> ShowS
[StartFaceSearch] -> ShowS
StartFaceSearch -> String
(Int -> StartFaceSearch -> ShowS)
-> (StartFaceSearch -> String)
-> ([StartFaceSearch] -> ShowS)
-> Show StartFaceSearch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartFaceSearch] -> ShowS
$cshowList :: [StartFaceSearch] -> ShowS
show :: StartFaceSearch -> String
$cshow :: StartFaceSearch -> String
showsPrec :: Int -> StartFaceSearch -> ShowS
$cshowsPrec :: Int -> StartFaceSearch -> ShowS
Prelude.Show, (forall x. StartFaceSearch -> Rep StartFaceSearch x)
-> (forall x. Rep StartFaceSearch x -> StartFaceSearch)
-> Generic StartFaceSearch
forall x. Rep StartFaceSearch x -> StartFaceSearch
forall x. StartFaceSearch -> Rep StartFaceSearch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartFaceSearch x -> StartFaceSearch
$cfrom :: forall x. StartFaceSearch -> Rep StartFaceSearch x
Prelude.Generic)

-- |
-- Create a value of 'StartFaceSearch' 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:
--
-- 'faceMatchThreshold', 'startFaceSearch_faceMatchThreshold' - The minimum confidence in the person match to return. For example,
-- don\'t return any matches where confidence in matches is less than 70%.
-- The default value is 80%.
--
-- 'jobTag', 'startFaceSearch_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', 'startFaceSearch_notificationChannel' - The ARN of the Amazon SNS topic to which you want Amazon Rekognition
-- Video to publish the completion status of the search. The Amazon SNS
-- topic must have a topic name that begins with /AmazonRekognition/ if you
-- are using the AmazonRekognitionServiceRole permissions policy to access
-- the topic.
--
-- 'clientRequestToken', 'startFaceSearch_clientRequestToken' - Idempotent token used to identify the start request. If you use the same
-- token with multiple @StartFaceSearch@ requests, the same @JobId@ is
-- returned. Use @ClientRequestToken@ to prevent the same job from being
-- accidently started more than once.
--
-- 'video', 'startFaceSearch_video' - The video you want to search. The video must be stored in an Amazon S3
-- bucket.
--
-- 'collectionId', 'startFaceSearch_collectionId' - ID of the collection that contains the faces you want to search for.
newStartFaceSearch ::
  -- | 'video'
  Video ->
  -- | 'collectionId'
  Prelude.Text ->
  StartFaceSearch
newStartFaceSearch :: Video -> Text -> StartFaceSearch
newStartFaceSearch Video
pVideo_ Text
pCollectionId_ =
  StartFaceSearch' :: Maybe Double
-> Maybe Text
-> Maybe NotificationChannel
-> Maybe Text
-> Video
-> Text
-> StartFaceSearch
StartFaceSearch'
    { $sel:faceMatchThreshold:StartFaceSearch' :: Maybe Double
faceMatchThreshold =
        Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:jobTag:StartFaceSearch' :: Maybe Text
jobTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationChannel:StartFaceSearch' :: Maybe NotificationChannel
notificationChannel = Maybe NotificationChannel
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartFaceSearch' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:video:StartFaceSearch' :: Video
video = Video
pVideo_,
      $sel:collectionId:StartFaceSearch' :: Text
collectionId = Text
pCollectionId_
    }

-- | The minimum confidence in the person match to return. For example,
-- don\'t return any matches where confidence in matches is less than 70%.
-- The default value is 80%.
startFaceSearch_faceMatchThreshold :: Lens.Lens' StartFaceSearch (Prelude.Maybe Prelude.Double)
startFaceSearch_faceMatchThreshold :: (Maybe Double -> f (Maybe Double))
-> StartFaceSearch -> f StartFaceSearch
startFaceSearch_faceMatchThreshold = (StartFaceSearch -> Maybe Double)
-> (StartFaceSearch -> Maybe Double -> StartFaceSearch)
-> Lens
     StartFaceSearch StartFaceSearch (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFaceSearch' {Maybe Double
faceMatchThreshold :: Maybe Double
$sel:faceMatchThreshold:StartFaceSearch' :: StartFaceSearch -> Maybe Double
faceMatchThreshold} -> Maybe Double
faceMatchThreshold) (\s :: StartFaceSearch
s@StartFaceSearch' {} Maybe Double
a -> StartFaceSearch
s {$sel:faceMatchThreshold:StartFaceSearch' :: Maybe Double
faceMatchThreshold = Maybe Double
a} :: StartFaceSearch)

-- | 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.
startFaceSearch_jobTag :: Lens.Lens' StartFaceSearch (Prelude.Maybe Prelude.Text)
startFaceSearch_jobTag :: (Maybe Text -> f (Maybe Text))
-> StartFaceSearch -> f StartFaceSearch
startFaceSearch_jobTag = (StartFaceSearch -> Maybe Text)
-> (StartFaceSearch -> Maybe Text -> StartFaceSearch)
-> Lens StartFaceSearch StartFaceSearch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFaceSearch' {Maybe Text
jobTag :: Maybe Text
$sel:jobTag:StartFaceSearch' :: StartFaceSearch -> Maybe Text
jobTag} -> Maybe Text
jobTag) (\s :: StartFaceSearch
s@StartFaceSearch' {} Maybe Text
a -> StartFaceSearch
s {$sel:jobTag:StartFaceSearch' :: Maybe Text
jobTag = Maybe Text
a} :: StartFaceSearch)

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

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

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

-- | ID of the collection that contains the faces you want to search for.
startFaceSearch_collectionId :: Lens.Lens' StartFaceSearch Prelude.Text
startFaceSearch_collectionId :: (Text -> f Text) -> StartFaceSearch -> f StartFaceSearch
startFaceSearch_collectionId = (StartFaceSearch -> Text)
-> (StartFaceSearch -> Text -> StartFaceSearch)
-> Lens StartFaceSearch StartFaceSearch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFaceSearch' {Text
collectionId :: Text
$sel:collectionId:StartFaceSearch' :: StartFaceSearch -> Text
collectionId} -> Text
collectionId) (\s :: StartFaceSearch
s@StartFaceSearch' {} Text
a -> StartFaceSearch
s {$sel:collectionId:StartFaceSearch' :: Text
collectionId = Text
a} :: StartFaceSearch)

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

instance Prelude.NFData StartFaceSearch

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

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

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

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

-- |
-- Create a value of 'StartFaceSearchResponse' 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', 'startFaceSearchResponse_jobId' - The identifier for the search job. Use @JobId@ to identify the job in a
-- subsequent call to @GetFaceSearch@.
--
-- 'httpStatus', 'startFaceSearchResponse_httpStatus' - The response's http status code.
newStartFaceSearchResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartFaceSearchResponse
newStartFaceSearchResponse :: Int -> StartFaceSearchResponse
newStartFaceSearchResponse Int
pHttpStatus_ =
  StartFaceSearchResponse' :: Maybe Text -> Int -> StartFaceSearchResponse
StartFaceSearchResponse'
    { $sel:jobId:StartFaceSearchResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartFaceSearchResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance Prelude.NFData StartFaceSearchResponse