{-# 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.StartCelebrityRecognition
-- 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 asynchronous recognition of celebrities in a stored video.
--
-- Amazon Rekognition Video can detect celebrities in a video must be
-- stored in an Amazon S3 bucket. Use Video to specify the bucket name and
-- the filename of the video. @StartCelebrityRecognition@ returns a job
-- identifier (@JobId@) which you use to get the results of the analysis.
-- When celebrity recognition analysis is finished, Amazon Rekognition
-- Video publishes a completion status to the Amazon Simple Notification
-- Service topic that you specify in @NotificationChannel@. To get the
-- results of the celebrity recognition analysis, first check that the
-- status value published to the Amazon SNS topic is @SUCCEEDED@. If so,
-- call GetCelebrityRecognition and pass the job identifier (@JobId@) from
-- the initial call to @StartCelebrityRecognition@.
--
-- For more information, see Recognizing Celebrities in the Amazon
-- Rekognition Developer Guide.
module Amazonka.Rekognition.StartCelebrityRecognition
  ( -- * Creating a Request
    StartCelebrityRecognition (..),
    newStartCelebrityRecognition,

    -- * Request Lenses
    startCelebrityRecognition_jobTag,
    startCelebrityRecognition_notificationChannel,
    startCelebrityRecognition_clientRequestToken,
    startCelebrityRecognition_video,

    -- * Destructuring the Response
    StartCelebrityRecognitionResponse (..),
    newStartCelebrityRecognitionResponse,

    -- * Response Lenses
    startCelebrityRecognitionResponse_jobId,
    startCelebrityRecognitionResponse_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:/ 'newStartCelebrityRecognition' smart constructor.
data StartCelebrityRecognition = StartCelebrityRecognition'
  { -- | 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.
    StartCelebrityRecognition -> Maybe Text
jobTag :: Prelude.Maybe Prelude.Text,
    -- | The Amazon SNS topic ARN that you want Amazon Rekognition Video to
    -- publish the completion status of the celebrity recognition analysis to.
    -- The Amazon SNS topic must have a topic name that begins with
    -- /AmazonRekognition/ if you are using the AmazonRekognitionServiceRole
    -- permissions policy.
    StartCelebrityRecognition -> Maybe NotificationChannel
notificationChannel :: Prelude.Maybe NotificationChannel,
    -- | Idempotent token used to identify the start request. If you use the same
    -- token with multiple @StartCelebrityRecognition@ requests, the same
    -- @JobId@ is returned. Use @ClientRequestToken@ to prevent the same job
    -- from being accidently started more than once.
    StartCelebrityRecognition -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The video in which you want to recognize celebrities. The video must be
    -- stored in an Amazon S3 bucket.
    StartCelebrityRecognition -> Video
video :: Video
  }
  deriving (StartCelebrityRecognition -> StartCelebrityRecognition -> Bool
(StartCelebrityRecognition -> StartCelebrityRecognition -> Bool)
-> (StartCelebrityRecognition -> StartCelebrityRecognition -> Bool)
-> Eq StartCelebrityRecognition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartCelebrityRecognition -> StartCelebrityRecognition -> Bool
$c/= :: StartCelebrityRecognition -> StartCelebrityRecognition -> Bool
== :: StartCelebrityRecognition -> StartCelebrityRecognition -> Bool
$c== :: StartCelebrityRecognition -> StartCelebrityRecognition -> Bool
Prelude.Eq, ReadPrec [StartCelebrityRecognition]
ReadPrec StartCelebrityRecognition
Int -> ReadS StartCelebrityRecognition
ReadS [StartCelebrityRecognition]
(Int -> ReadS StartCelebrityRecognition)
-> ReadS [StartCelebrityRecognition]
-> ReadPrec StartCelebrityRecognition
-> ReadPrec [StartCelebrityRecognition]
-> Read StartCelebrityRecognition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartCelebrityRecognition]
$creadListPrec :: ReadPrec [StartCelebrityRecognition]
readPrec :: ReadPrec StartCelebrityRecognition
$creadPrec :: ReadPrec StartCelebrityRecognition
readList :: ReadS [StartCelebrityRecognition]
$creadList :: ReadS [StartCelebrityRecognition]
readsPrec :: Int -> ReadS StartCelebrityRecognition
$creadsPrec :: Int -> ReadS StartCelebrityRecognition
Prelude.Read, Int -> StartCelebrityRecognition -> ShowS
[StartCelebrityRecognition] -> ShowS
StartCelebrityRecognition -> String
(Int -> StartCelebrityRecognition -> ShowS)
-> (StartCelebrityRecognition -> String)
-> ([StartCelebrityRecognition] -> ShowS)
-> Show StartCelebrityRecognition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartCelebrityRecognition] -> ShowS
$cshowList :: [StartCelebrityRecognition] -> ShowS
show :: StartCelebrityRecognition -> String
$cshow :: StartCelebrityRecognition -> String
showsPrec :: Int -> StartCelebrityRecognition -> ShowS
$cshowsPrec :: Int -> StartCelebrityRecognition -> ShowS
Prelude.Show, (forall x.
 StartCelebrityRecognition -> Rep StartCelebrityRecognition x)
-> (forall x.
    Rep StartCelebrityRecognition x -> StartCelebrityRecognition)
-> Generic StartCelebrityRecognition
forall x.
Rep StartCelebrityRecognition x -> StartCelebrityRecognition
forall x.
StartCelebrityRecognition -> Rep StartCelebrityRecognition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartCelebrityRecognition x -> StartCelebrityRecognition
$cfrom :: forall x.
StartCelebrityRecognition -> Rep StartCelebrityRecognition x
Prelude.Generic)

-- |
-- Create a value of 'StartCelebrityRecognition' 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', 'startCelebrityRecognition_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', 'startCelebrityRecognition_notificationChannel' - The Amazon SNS topic ARN that you want Amazon Rekognition Video to
-- publish the completion status of the celebrity recognition analysis to.
-- The Amazon SNS topic must have a topic name that begins with
-- /AmazonRekognition/ if you are using the AmazonRekognitionServiceRole
-- permissions policy.
--
-- 'clientRequestToken', 'startCelebrityRecognition_clientRequestToken' - Idempotent token used to identify the start request. If you use the same
-- token with multiple @StartCelebrityRecognition@ requests, the same
-- @JobId@ is returned. Use @ClientRequestToken@ to prevent the same job
-- from being accidently started more than once.
--
-- 'video', 'startCelebrityRecognition_video' - The video in which you want to recognize celebrities. The video must be
-- stored in an Amazon S3 bucket.
newStartCelebrityRecognition ::
  -- | 'video'
  Video ->
  StartCelebrityRecognition
newStartCelebrityRecognition :: Video -> StartCelebrityRecognition
newStartCelebrityRecognition Video
pVideo_ =
  StartCelebrityRecognition' :: Maybe Text
-> Maybe NotificationChannel
-> Maybe Text
-> Video
-> StartCelebrityRecognition
StartCelebrityRecognition'
    { $sel:jobTag:StartCelebrityRecognition' :: Maybe Text
jobTag =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationChannel:StartCelebrityRecognition' :: Maybe NotificationChannel
notificationChannel = Maybe NotificationChannel
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartCelebrityRecognition' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:video:StartCelebrityRecognition' :: 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.
startCelebrityRecognition_jobTag :: Lens.Lens' StartCelebrityRecognition (Prelude.Maybe Prelude.Text)
startCelebrityRecognition_jobTag :: (Maybe Text -> f (Maybe Text))
-> StartCelebrityRecognition -> f StartCelebrityRecognition
startCelebrityRecognition_jobTag = (StartCelebrityRecognition -> Maybe Text)
-> (StartCelebrityRecognition
    -> Maybe Text -> StartCelebrityRecognition)
-> Lens
     StartCelebrityRecognition
     StartCelebrityRecognition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCelebrityRecognition' {Maybe Text
jobTag :: Maybe Text
$sel:jobTag:StartCelebrityRecognition' :: StartCelebrityRecognition -> Maybe Text
jobTag} -> Maybe Text
jobTag) (\s :: StartCelebrityRecognition
s@StartCelebrityRecognition' {} Maybe Text
a -> StartCelebrityRecognition
s {$sel:jobTag:StartCelebrityRecognition' :: Maybe Text
jobTag = Maybe Text
a} :: StartCelebrityRecognition)

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

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

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

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

instance Prelude.NFData StartCelebrityRecognition

instance Core.ToHeaders StartCelebrityRecognition where
  toHeaders :: StartCelebrityRecognition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartCelebrityRecognition -> 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.StartCelebrityRecognition" ::
                          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 StartCelebrityRecognition where
  toJSON :: StartCelebrityRecognition -> Value
toJSON StartCelebrityRecognition' {Maybe Text
Maybe NotificationChannel
Video
video :: Video
clientRequestToken :: Maybe Text
notificationChannel :: Maybe NotificationChannel
jobTag :: Maybe Text
$sel:video:StartCelebrityRecognition' :: StartCelebrityRecognition -> Video
$sel:clientRequestToken:StartCelebrityRecognition' :: StartCelebrityRecognition -> Maybe Text
$sel:notificationChannel:StartCelebrityRecognition' :: StartCelebrityRecognition -> Maybe NotificationChannel
$sel:jobTag:StartCelebrityRecognition' :: StartCelebrityRecognition -> 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 StartCelebrityRecognition where
  toPath :: StartCelebrityRecognition -> ByteString
toPath = ByteString -> StartCelebrityRecognition -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'StartCelebrityRecognitionResponse' 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', 'startCelebrityRecognitionResponse_jobId' - The identifier for the celebrity recognition analysis job. Use @JobId@
-- to identify the job in a subsequent call to @GetCelebrityRecognition@.
--
-- 'httpStatus', 'startCelebrityRecognitionResponse_httpStatus' - The response's http status code.
newStartCelebrityRecognitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartCelebrityRecognitionResponse
newStartCelebrityRecognitionResponse :: Int -> StartCelebrityRecognitionResponse
newStartCelebrityRecognitionResponse Int
pHttpStatus_ =
  StartCelebrityRecognitionResponse' :: Maybe Text -> Int -> StartCelebrityRecognitionResponse
StartCelebrityRecognitionResponse'
    { $sel:jobId:StartCelebrityRecognitionResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartCelebrityRecognitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier for the celebrity recognition analysis job. Use @JobId@
-- to identify the job in a subsequent call to @GetCelebrityRecognition@.
startCelebrityRecognitionResponse_jobId :: Lens.Lens' StartCelebrityRecognitionResponse (Prelude.Maybe Prelude.Text)
startCelebrityRecognitionResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartCelebrityRecognitionResponse
-> f StartCelebrityRecognitionResponse
startCelebrityRecognitionResponse_jobId = (StartCelebrityRecognitionResponse -> Maybe Text)
-> (StartCelebrityRecognitionResponse
    -> Maybe Text -> StartCelebrityRecognitionResponse)
-> Lens
     StartCelebrityRecognitionResponse
     StartCelebrityRecognitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCelebrityRecognitionResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartCelebrityRecognitionResponse' :: StartCelebrityRecognitionResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartCelebrityRecognitionResponse
s@StartCelebrityRecognitionResponse' {} Maybe Text
a -> StartCelebrityRecognitionResponse
s {$sel:jobId:StartCelebrityRecognitionResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartCelebrityRecognitionResponse)

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

instance
  Prelude.NFData
    StartCelebrityRecognitionResponse