{-# 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.StartContentModeration
-- 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 inappropriate, unwanted, or offensive
-- content in a stored video. For a list of moderation labels in Amazon
-- Rekognition, see
-- <https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api Using the image and video moderation APIs>.
--
-- Amazon Rekognition Video can moderate content in a video stored in an
-- Amazon S3 bucket. Use Video to specify the bucket name and the filename
-- of the video. @StartContentModeration@ returns a job identifier
-- (@JobId@) which you use to get the results of the analysis. When content
-- 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 content analysis, first check that the status
-- value published to the Amazon SNS topic is @SUCCEEDED@. If so, call
-- GetContentModeration and pass the job identifier (@JobId@) from the
-- initial call to @StartContentModeration@.
--
-- For more information, see Content moderation in the Amazon Rekognition
-- Developer Guide.
module Amazonka.Rekognition.StartContentModeration
  ( -- * Creating a Request
    StartContentModeration (..),
    newStartContentModeration,

    -- * Request Lenses
    startContentModeration_jobTag,
    startContentModeration_notificationChannel,
    startContentModeration_clientRequestToken,
    startContentModeration_minConfidence,
    startContentModeration_video,

    -- * Destructuring the Response
    StartContentModerationResponse (..),
    newStartContentModerationResponse,

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

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

-- | The Amazon SNS topic ARN that you want Amazon Rekognition Video to
-- publish the completion status of the content analysis to. 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.
startContentModeration_notificationChannel :: Lens.Lens' StartContentModeration (Prelude.Maybe NotificationChannel)
startContentModeration_notificationChannel :: (Maybe NotificationChannel -> f (Maybe NotificationChannel))
-> StartContentModeration -> f StartContentModeration
startContentModeration_notificationChannel = (StartContentModeration -> Maybe NotificationChannel)
-> (StartContentModeration
    -> Maybe NotificationChannel -> StartContentModeration)
-> Lens
     StartContentModeration
     StartContentModeration
     (Maybe NotificationChannel)
     (Maybe NotificationChannel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartContentModeration' {Maybe NotificationChannel
notificationChannel :: Maybe NotificationChannel
$sel:notificationChannel:StartContentModeration' :: StartContentModeration -> Maybe NotificationChannel
notificationChannel} -> Maybe NotificationChannel
notificationChannel) (\s :: StartContentModeration
s@StartContentModeration' {} Maybe NotificationChannel
a -> StartContentModeration
s {$sel:notificationChannel:StartContentModeration' :: Maybe NotificationChannel
notificationChannel = Maybe NotificationChannel
a} :: StartContentModeration)

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

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

-- | The video in which you want to detect inappropriate, unwanted, or
-- offensive content. The video must be stored in an Amazon S3 bucket.
startContentModeration_video :: Lens.Lens' StartContentModeration Video
startContentModeration_video :: (Video -> f Video)
-> StartContentModeration -> f StartContentModeration
startContentModeration_video = (StartContentModeration -> Video)
-> (StartContentModeration -> Video -> StartContentModeration)
-> Lens StartContentModeration StartContentModeration Video Video
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartContentModeration' {Video
video :: Video
$sel:video:StartContentModeration' :: StartContentModeration -> Video
video} -> Video
video) (\s :: StartContentModeration
s@StartContentModeration' {} Video
a -> StartContentModeration
s {$sel:video:StartContentModeration' :: Video
video = Video
a} :: StartContentModeration)

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

instance Prelude.NFData StartContentModeration

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

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

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

-- |
-- Create a value of 'StartContentModerationResponse' 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', 'startContentModerationResponse_jobId' - The identifier for the content analysis job. Use @JobId@ to identify the
-- job in a subsequent call to @GetContentModeration@.
--
-- 'httpStatus', 'startContentModerationResponse_httpStatus' - The response's http status code.
newStartContentModerationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartContentModerationResponse
newStartContentModerationResponse :: Int -> StartContentModerationResponse
newStartContentModerationResponse Int
pHttpStatus_ =
  StartContentModerationResponse' :: Maybe Text -> Int -> StartContentModerationResponse
StartContentModerationResponse'
    { $sel:jobId:StartContentModerationResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartContentModerationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    StartContentModerationResponse