{-# 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.StartLabelDetection
-- 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 detection of labels in a stored video.
--
-- Amazon Rekognition Video can detect labels in a video. Labels are
-- instances of real-world entities. This includes objects like flower,
-- tree, and table; events like wedding, graduation, and birthday party;
-- concepts like landscape, evening, and nature; and activities like a
-- person getting out of a car or a person skiing.
--
-- The video must be stored in an Amazon S3 bucket. Use Video to specify
-- the bucket name and the filename of the video. @StartLabelDetection@
-- returns a job identifier (@JobId@) which you use to get the results of
-- the operation. When label detection 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 label detection operation, first check that
-- the status value published to the Amazon SNS topic is @SUCCEEDED@. If
-- so, call GetLabelDetection and pass the job identifier (@JobId@) from
-- the initial call to @StartLabelDetection@.
module Amazonka.Rekognition.StartLabelDetection
  ( -- * Creating a Request
    StartLabelDetection (..),
    newStartLabelDetection,

    -- * Request Lenses
    startLabelDetection_jobTag,
    startLabelDetection_notificationChannel,
    startLabelDetection_clientRequestToken,
    startLabelDetection_minConfidence,
    startLabelDetection_video,

    -- * Destructuring the Response
    StartLabelDetectionResponse (..),
    newStartLabelDetectionResponse,

    -- * Response Lenses
    startLabelDetectionResponse_jobId,
    startLabelDetectionResponse_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:/ 'newStartLabelDetection' smart constructor.
data StartLabelDetection = StartLabelDetection'
  { -- | 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.
    StartLabelDetection -> Maybe Text
jobTag :: Prelude.Maybe Prelude.Text,
    -- | The Amazon SNS topic ARN you want Amazon Rekognition Video to publish
    -- the completion status of the label detection operation to. The Amazon
    -- SNS topic must have a topic name that begins with /AmazonRekognition/ if
    -- you are using the AmazonRekognitionServiceRole permissions policy.
    StartLabelDetection -> Maybe NotificationChannel
notificationChannel :: Prelude.Maybe NotificationChannel,
    -- | Idempotent token used to identify the start request. If you use the same
    -- token with multiple @StartLabelDetection@ requests, the same @JobId@ is
    -- returned. Use @ClientRequestToken@ to prevent the same job from being
    -- accidently started more than once.
    StartLabelDetection -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Specifies the minimum confidence that Amazon Rekognition Video must have
    -- in order to return a detected label. Confidence represents how certain
    -- Amazon Rekognition is that a label is correctly identified.0 is the
    -- lowest confidence. 100 is the highest confidence. Amazon Rekognition
    -- Video doesn\'t return any labels with a confidence level lower than this
    -- specified value.
    --
    -- If you don\'t specify @MinConfidence@, the operation returns labels with
    -- confidence values greater than or equal to 50 percent.
    StartLabelDetection -> Maybe Double
minConfidence :: Prelude.Maybe Prelude.Double,
    -- | The video in which you want to detect labels. The video must be stored
    -- in an Amazon S3 bucket.
    StartLabelDetection -> Video
video :: Video
  }
  deriving (StartLabelDetection -> StartLabelDetection -> Bool
(StartLabelDetection -> StartLabelDetection -> Bool)
-> (StartLabelDetection -> StartLabelDetection -> Bool)
-> Eq StartLabelDetection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartLabelDetection -> StartLabelDetection -> Bool
$c/= :: StartLabelDetection -> StartLabelDetection -> Bool
== :: StartLabelDetection -> StartLabelDetection -> Bool
$c== :: StartLabelDetection -> StartLabelDetection -> Bool
Prelude.Eq, ReadPrec [StartLabelDetection]
ReadPrec StartLabelDetection
Int -> ReadS StartLabelDetection
ReadS [StartLabelDetection]
(Int -> ReadS StartLabelDetection)
-> ReadS [StartLabelDetection]
-> ReadPrec StartLabelDetection
-> ReadPrec [StartLabelDetection]
-> Read StartLabelDetection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartLabelDetection]
$creadListPrec :: ReadPrec [StartLabelDetection]
readPrec :: ReadPrec StartLabelDetection
$creadPrec :: ReadPrec StartLabelDetection
readList :: ReadS [StartLabelDetection]
$creadList :: ReadS [StartLabelDetection]
readsPrec :: Int -> ReadS StartLabelDetection
$creadsPrec :: Int -> ReadS StartLabelDetection
Prelude.Read, Int -> StartLabelDetection -> ShowS
[StartLabelDetection] -> ShowS
StartLabelDetection -> String
(Int -> StartLabelDetection -> ShowS)
-> (StartLabelDetection -> String)
-> ([StartLabelDetection] -> ShowS)
-> Show StartLabelDetection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartLabelDetection] -> ShowS
$cshowList :: [StartLabelDetection] -> ShowS
show :: StartLabelDetection -> String
$cshow :: StartLabelDetection -> String
showsPrec :: Int -> StartLabelDetection -> ShowS
$cshowsPrec :: Int -> StartLabelDetection -> ShowS
Prelude.Show, (forall x. StartLabelDetection -> Rep StartLabelDetection x)
-> (forall x. Rep StartLabelDetection x -> StartLabelDetection)
-> Generic StartLabelDetection
forall x. Rep StartLabelDetection x -> StartLabelDetection
forall x. StartLabelDetection -> Rep StartLabelDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartLabelDetection x -> StartLabelDetection
$cfrom :: forall x. StartLabelDetection -> Rep StartLabelDetection x
Prelude.Generic)

-- |
-- Create a value of 'StartLabelDetection' 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', 'startLabelDetection_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', 'startLabelDetection_notificationChannel' - The Amazon SNS topic ARN you want Amazon Rekognition Video to publish
-- the completion status of the label 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', 'startLabelDetection_clientRequestToken' - Idempotent token used to identify the start request. If you use the same
-- token with multiple @StartLabelDetection@ requests, the same @JobId@ is
-- returned. Use @ClientRequestToken@ to prevent the same job from being
-- accidently started more than once.
--
-- 'minConfidence', 'startLabelDetection_minConfidence' - Specifies the minimum confidence that Amazon Rekognition Video must have
-- in order to return a detected label. Confidence represents how certain
-- Amazon Rekognition is that a label is correctly identified.0 is the
-- lowest confidence. 100 is the highest confidence. Amazon Rekognition
-- Video doesn\'t return any labels with a confidence level lower than this
-- specified value.
--
-- If you don\'t specify @MinConfidence@, the operation returns labels with
-- confidence values greater than or equal to 50 percent.
--
-- 'video', 'startLabelDetection_video' - The video in which you want to detect labels. The video must be stored
-- in an Amazon S3 bucket.
newStartLabelDetection ::
  -- | 'video'
  Video ->
  StartLabelDetection
newStartLabelDetection :: Video -> StartLabelDetection
newStartLabelDetection Video
pVideo_ =
  StartLabelDetection' :: Maybe Text
-> Maybe NotificationChannel
-> Maybe Text
-> Maybe Double
-> Video
-> StartLabelDetection
StartLabelDetection'
    { $sel:jobTag:StartLabelDetection' :: Maybe Text
jobTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationChannel:StartLabelDetection' :: Maybe NotificationChannel
notificationChannel = Maybe NotificationChannel
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartLabelDetection' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:minConfidence:StartLabelDetection' :: Maybe Double
minConfidence = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:video:StartLabelDetection' :: 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.
startLabelDetection_jobTag :: Lens.Lens' StartLabelDetection (Prelude.Maybe Prelude.Text)
startLabelDetection_jobTag :: (Maybe Text -> f (Maybe Text))
-> StartLabelDetection -> f StartLabelDetection
startLabelDetection_jobTag = (StartLabelDetection -> Maybe Text)
-> (StartLabelDetection -> Maybe Text -> StartLabelDetection)
-> Lens
     StartLabelDetection StartLabelDetection (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartLabelDetection' {Maybe Text
jobTag :: Maybe Text
$sel:jobTag:StartLabelDetection' :: StartLabelDetection -> Maybe Text
jobTag} -> Maybe Text
jobTag) (\s :: StartLabelDetection
s@StartLabelDetection' {} Maybe Text
a -> StartLabelDetection
s {$sel:jobTag:StartLabelDetection' :: Maybe Text
jobTag = Maybe Text
a} :: StartLabelDetection)

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

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

-- | Specifies the minimum confidence that Amazon Rekognition Video must have
-- in order to return a detected label. Confidence represents how certain
-- Amazon Rekognition is that a label is correctly identified.0 is the
-- lowest confidence. 100 is the highest confidence. Amazon Rekognition
-- Video doesn\'t return any labels with a confidence level lower than this
-- specified value.
--
-- If you don\'t specify @MinConfidence@, the operation returns labels with
-- confidence values greater than or equal to 50 percent.
startLabelDetection_minConfidence :: Lens.Lens' StartLabelDetection (Prelude.Maybe Prelude.Double)
startLabelDetection_minConfidence :: (Maybe Double -> f (Maybe Double))
-> StartLabelDetection -> f StartLabelDetection
startLabelDetection_minConfidence = (StartLabelDetection -> Maybe Double)
-> (StartLabelDetection -> Maybe Double -> StartLabelDetection)
-> Lens
     StartLabelDetection
     StartLabelDetection
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartLabelDetection' {Maybe Double
minConfidence :: Maybe Double
$sel:minConfidence:StartLabelDetection' :: StartLabelDetection -> Maybe Double
minConfidence} -> Maybe Double
minConfidence) (\s :: StartLabelDetection
s@StartLabelDetection' {} Maybe Double
a -> StartLabelDetection
s {$sel:minConfidence:StartLabelDetection' :: Maybe Double
minConfidence = Maybe Double
a} :: StartLabelDetection)

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

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

instance Prelude.NFData StartLabelDetection

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

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

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

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

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

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

instance Prelude.NFData StartLabelDetectionResponse