{-# 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.GetSegmentDetection
-- 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)
--
-- Gets the segment detection results of a Amazon Rekognition Video
-- analysis started by StartSegmentDetection.
--
-- Segment detection with Amazon Rekognition Video is an asynchronous
-- operation. You start segment detection by calling StartSegmentDetection
-- which returns a job identifier (@JobId@). When the segment detection
-- operation finishes, Amazon Rekognition publishes a completion status to
-- the Amazon Simple Notification Service topic registered in the initial
-- call to @StartSegmentDetection@. To get the results of the segment
-- detection operation, first check that the status value published to the
-- Amazon SNS topic is @SUCCEEDED@. if so, call @GetSegmentDetection@ and
-- pass the job identifier (@JobId@) from the initial call of
-- @StartSegmentDetection@.
--
-- @GetSegmentDetection@ returns detected segments in an array (@Segments@)
-- of SegmentDetection objects. @Segments@ is sorted by the segment types
-- specified in the @SegmentTypes@ input parameter of
-- @StartSegmentDetection@. Each element of the array includes the detected
-- segment, the precentage confidence in the acuracy of the detected
-- segment, the type of the segment, and the frame in which the segment was
-- detected.
--
-- Use @SelectedSegmentTypes@ to find out the type of segment detection
-- requested in the call to @StartSegmentDetection@.
--
-- Use the @MaxResults@ parameter to limit the number of segment detections
-- returned. If there are more results than specified in @MaxResults@, the
-- value of @NextToken@ in the operation response contains a pagination
-- token for getting the next set of results. To get the next page of
-- results, call @GetSegmentDetection@ and populate the @NextToken@ request
-- parameter with the token value returned from the previous call to
-- @GetSegmentDetection@.
--
-- For more information, see Detecting Video Segments in Stored Video in
-- the Amazon Rekognition Developer Guide.
module Amazonka.Rekognition.GetSegmentDetection
  ( -- * Creating a Request
    GetSegmentDetection (..),
    newGetSegmentDetection,

    -- * Request Lenses
    getSegmentDetection_nextToken,
    getSegmentDetection_maxResults,
    getSegmentDetection_jobId,

    -- * Destructuring the Response
    GetSegmentDetectionResponse (..),
    newGetSegmentDetectionResponse,

    -- * Response Lenses
    getSegmentDetectionResponse_selectedSegmentTypes,
    getSegmentDetectionResponse_nextToken,
    getSegmentDetectionResponse_videoMetadata,
    getSegmentDetectionResponse_statusMessage,
    getSegmentDetectionResponse_segments,
    getSegmentDetectionResponse_jobStatus,
    getSegmentDetectionResponse_audioMetadata,
    getSegmentDetectionResponse_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:/ 'newGetSegmentDetection' smart constructor.
data GetSegmentDetection = GetSegmentDetection'
  { -- | If the response is truncated, Amazon Rekognition Video returns this
    -- token that you can use in the subsequent request to retrieve the next
    -- set of text.
    GetSegmentDetection -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of results to return per paginated call. The largest
    -- value you can specify is 1000.
    GetSegmentDetection -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Job identifier for the text detection operation for which you want
    -- results returned. You get the job identifer from an initial call to
    -- @StartSegmentDetection@.
    GetSegmentDetection -> Text
jobId :: Prelude.Text
  }
  deriving (GetSegmentDetection -> GetSegmentDetection -> Bool
(GetSegmentDetection -> GetSegmentDetection -> Bool)
-> (GetSegmentDetection -> GetSegmentDetection -> Bool)
-> Eq GetSegmentDetection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSegmentDetection -> GetSegmentDetection -> Bool
$c/= :: GetSegmentDetection -> GetSegmentDetection -> Bool
== :: GetSegmentDetection -> GetSegmentDetection -> Bool
$c== :: GetSegmentDetection -> GetSegmentDetection -> Bool
Prelude.Eq, ReadPrec [GetSegmentDetection]
ReadPrec GetSegmentDetection
Int -> ReadS GetSegmentDetection
ReadS [GetSegmentDetection]
(Int -> ReadS GetSegmentDetection)
-> ReadS [GetSegmentDetection]
-> ReadPrec GetSegmentDetection
-> ReadPrec [GetSegmentDetection]
-> Read GetSegmentDetection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSegmentDetection]
$creadListPrec :: ReadPrec [GetSegmentDetection]
readPrec :: ReadPrec GetSegmentDetection
$creadPrec :: ReadPrec GetSegmentDetection
readList :: ReadS [GetSegmentDetection]
$creadList :: ReadS [GetSegmentDetection]
readsPrec :: Int -> ReadS GetSegmentDetection
$creadsPrec :: Int -> ReadS GetSegmentDetection
Prelude.Read, Int -> GetSegmentDetection -> ShowS
[GetSegmentDetection] -> ShowS
GetSegmentDetection -> String
(Int -> GetSegmentDetection -> ShowS)
-> (GetSegmentDetection -> String)
-> ([GetSegmentDetection] -> ShowS)
-> Show GetSegmentDetection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSegmentDetection] -> ShowS
$cshowList :: [GetSegmentDetection] -> ShowS
show :: GetSegmentDetection -> String
$cshow :: GetSegmentDetection -> String
showsPrec :: Int -> GetSegmentDetection -> ShowS
$cshowsPrec :: Int -> GetSegmentDetection -> ShowS
Prelude.Show, (forall x. GetSegmentDetection -> Rep GetSegmentDetection x)
-> (forall x. Rep GetSegmentDetection x -> GetSegmentDetection)
-> Generic GetSegmentDetection
forall x. Rep GetSegmentDetection x -> GetSegmentDetection
forall x. GetSegmentDetection -> Rep GetSegmentDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSegmentDetection x -> GetSegmentDetection
$cfrom :: forall x. GetSegmentDetection -> Rep GetSegmentDetection x
Prelude.Generic)

-- |
-- Create a value of 'GetSegmentDetection' 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:
--
-- 'nextToken', 'getSegmentDetection_nextToken' - If the response is truncated, Amazon Rekognition Video returns this
-- token that you can use in the subsequent request to retrieve the next
-- set of text.
--
-- 'maxResults', 'getSegmentDetection_maxResults' - Maximum number of results to return per paginated call. The largest
-- value you can specify is 1000.
--
-- 'jobId', 'getSegmentDetection_jobId' - Job identifier for the text detection operation for which you want
-- results returned. You get the job identifer from an initial call to
-- @StartSegmentDetection@.
newGetSegmentDetection ::
  -- | 'jobId'
  Prelude.Text ->
  GetSegmentDetection
newGetSegmentDetection :: Text -> GetSegmentDetection
newGetSegmentDetection Text
pJobId_ =
  GetSegmentDetection' :: Maybe Text -> Maybe Natural -> Text -> GetSegmentDetection
GetSegmentDetection'
    { $sel:nextToken:GetSegmentDetection' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetSegmentDetection' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:GetSegmentDetection' :: Text
jobId = Text
pJobId_
    }

-- | If the response is truncated, Amazon Rekognition Video returns this
-- token that you can use in the subsequent request to retrieve the next
-- set of text.
getSegmentDetection_nextToken :: Lens.Lens' GetSegmentDetection (Prelude.Maybe Prelude.Text)
getSegmentDetection_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetSegmentDetection -> f GetSegmentDetection
getSegmentDetection_nextToken = (GetSegmentDetection -> Maybe Text)
-> (GetSegmentDetection -> Maybe Text -> GetSegmentDetection)
-> Lens
     GetSegmentDetection GetSegmentDetection (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetection' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetSegmentDetection' :: GetSegmentDetection -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetSegmentDetection
s@GetSegmentDetection' {} Maybe Text
a -> GetSegmentDetection
s {$sel:nextToken:GetSegmentDetection' :: Maybe Text
nextToken = Maybe Text
a} :: GetSegmentDetection)

-- | Maximum number of results to return per paginated call. The largest
-- value you can specify is 1000.
getSegmentDetection_maxResults :: Lens.Lens' GetSegmentDetection (Prelude.Maybe Prelude.Natural)
getSegmentDetection_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetSegmentDetection -> f GetSegmentDetection
getSegmentDetection_maxResults = (GetSegmentDetection -> Maybe Natural)
-> (GetSegmentDetection -> Maybe Natural -> GetSegmentDetection)
-> Lens
     GetSegmentDetection
     GetSegmentDetection
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetection' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetSegmentDetection' :: GetSegmentDetection -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetSegmentDetection
s@GetSegmentDetection' {} Maybe Natural
a -> GetSegmentDetection
s {$sel:maxResults:GetSegmentDetection' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetSegmentDetection)

-- | Job identifier for the text detection operation for which you want
-- results returned. You get the job identifer from an initial call to
-- @StartSegmentDetection@.
getSegmentDetection_jobId :: Lens.Lens' GetSegmentDetection Prelude.Text
getSegmentDetection_jobId :: (Text -> f Text) -> GetSegmentDetection -> f GetSegmentDetection
getSegmentDetection_jobId = (GetSegmentDetection -> Text)
-> (GetSegmentDetection -> Text -> GetSegmentDetection)
-> Lens GetSegmentDetection GetSegmentDetection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetection' {Text
jobId :: Text
$sel:jobId:GetSegmentDetection' :: GetSegmentDetection -> Text
jobId} -> Text
jobId) (\s :: GetSegmentDetection
s@GetSegmentDetection' {} Text
a -> GetSegmentDetection
s {$sel:jobId:GetSegmentDetection' :: Text
jobId = Text
a} :: GetSegmentDetection)

instance Core.AWSRequest GetSegmentDetection where
  type
    AWSResponse GetSegmentDetection =
      GetSegmentDetectionResponse
  request :: GetSegmentDetection -> Request GetSegmentDetection
request = Service -> GetSegmentDetection -> Request GetSegmentDetection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetSegmentDetection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetSegmentDetection)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetSegmentDetection))
-> Logger
-> Service
-> Proxy GetSegmentDetection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetSegmentDetection)))
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 [SegmentTypeInfo]
-> Maybe Text
-> Maybe [VideoMetadata]
-> Maybe Text
-> Maybe [SegmentDetection]
-> Maybe VideoJobStatus
-> Maybe [AudioMetadata]
-> Int
-> GetSegmentDetectionResponse
GetSegmentDetectionResponse'
            (Maybe [SegmentTypeInfo]
 -> Maybe Text
 -> Maybe [VideoMetadata]
 -> Maybe Text
 -> Maybe [SegmentDetection]
 -> Maybe VideoJobStatus
 -> Maybe [AudioMetadata]
 -> Int
 -> GetSegmentDetectionResponse)
-> Either String (Maybe [SegmentTypeInfo])
-> Either
     String
     (Maybe Text
      -> Maybe [VideoMetadata]
      -> Maybe Text
      -> Maybe [SegmentDetection]
      -> Maybe VideoJobStatus
      -> Maybe [AudioMetadata]
      -> Int
      -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [SegmentTypeInfo]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SelectedSegmentTypes"
                            Either String (Maybe (Maybe [SegmentTypeInfo]))
-> Maybe [SegmentTypeInfo]
-> Either String (Maybe [SegmentTypeInfo])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SegmentTypeInfo]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe [VideoMetadata]
   -> Maybe Text
   -> Maybe [SegmentDetection]
   -> Maybe VideoJobStatus
   -> Maybe [AudioMetadata]
   -> Int
   -> GetSegmentDetectionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [VideoMetadata]
      -> Maybe Text
      -> Maybe [SegmentDetection]
      -> Maybe VideoJobStatus
      -> Maybe [AudioMetadata]
      -> Int
      -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Applicative f => 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
"NextToken")
            Either
  String
  (Maybe [VideoMetadata]
   -> Maybe Text
   -> Maybe [SegmentDetection]
   -> Maybe VideoJobStatus
   -> Maybe [AudioMetadata]
   -> Int
   -> GetSegmentDetectionResponse)
-> Either String (Maybe [VideoMetadata])
-> Either
     String
     (Maybe Text
      -> Maybe [SegmentDetection]
      -> Maybe VideoJobStatus
      -> Maybe [AudioMetadata]
      -> Int
      -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [VideoMetadata]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VideoMetadata" Either String (Maybe (Maybe [VideoMetadata]))
-> Maybe [VideoMetadata] -> Either String (Maybe [VideoMetadata])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [VideoMetadata]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe [SegmentDetection]
   -> Maybe VideoJobStatus
   -> Maybe [AudioMetadata]
   -> Int
   -> GetSegmentDetectionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [SegmentDetection]
      -> Maybe VideoJobStatus
      -> Maybe [AudioMetadata]
      -> Int
      -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Applicative f => 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
"StatusMessage")
            Either
  String
  (Maybe [SegmentDetection]
   -> Maybe VideoJobStatus
   -> Maybe [AudioMetadata]
   -> Int
   -> GetSegmentDetectionResponse)
-> Either String (Maybe [SegmentDetection])
-> Either
     String
     (Maybe VideoJobStatus
      -> Maybe [AudioMetadata] -> Int -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [SegmentDetection]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Segments" Either String (Maybe (Maybe [SegmentDetection]))
-> Maybe [SegmentDetection]
-> Either String (Maybe [SegmentDetection])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SegmentDetection]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe VideoJobStatus
   -> Maybe [AudioMetadata] -> Int -> GetSegmentDetectionResponse)
-> Either String (Maybe VideoJobStatus)
-> Either
     String
     (Maybe [AudioMetadata] -> Int -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe VideoJobStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobStatus")
            Either
  String
  (Maybe [AudioMetadata] -> Int -> GetSegmentDetectionResponse)
-> Either String (Maybe [AudioMetadata])
-> Either String (Int -> GetSegmentDetectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [AudioMetadata]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AudioMetadata" Either String (Maybe (Maybe [AudioMetadata]))
-> Maybe [AudioMetadata] -> Either String (Maybe [AudioMetadata])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AudioMetadata]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetSegmentDetectionResponse)
-> Either String Int -> Either String GetSegmentDetectionResponse
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 GetSegmentDetection

instance Prelude.NFData GetSegmentDetection

instance Core.ToHeaders GetSegmentDetection where
  toHeaders :: GetSegmentDetection -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetSegmentDetection -> 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.GetSegmentDetection" ::
                          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 GetSegmentDetection where
  toJSON :: GetSegmentDetection -> Value
toJSON GetSegmentDetection' {Maybe Natural
Maybe Text
Text
jobId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:jobId:GetSegmentDetection' :: GetSegmentDetection -> Text
$sel:maxResults:GetSegmentDetection' :: GetSegmentDetection -> Maybe Natural
$sel:nextToken:GetSegmentDetection' :: GetSegmentDetection -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" 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
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"JobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId)
          ]
      )

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

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

-- | /See:/ 'newGetSegmentDetectionResponse' smart constructor.
data GetSegmentDetectionResponse = GetSegmentDetectionResponse'
  { -- | An array containing the segment types requested in the call to
    -- @StartSegmentDetection@.
    GetSegmentDetectionResponse -> Maybe [SegmentTypeInfo]
selectedSegmentTypes :: Prelude.Maybe [SegmentTypeInfo],
    -- | If the previous response was incomplete (because there are more labels
    -- to retrieve), Amazon Rekognition Video returns a pagination token in the
    -- response. You can use this pagination token to retrieve the next set of
    -- text.
    GetSegmentDetectionResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Currently, Amazon Rekognition Video returns a single object in the
    -- @VideoMetadata@ array. The object contains information about the video
    -- stream in the input file that Amazon Rekognition Video chose to analyze.
    -- The @VideoMetadata@ object includes the video codec, video format and
    -- other information. Video metadata is returned in each page of
    -- information returned by @GetSegmentDetection@.
    GetSegmentDetectionResponse -> Maybe [VideoMetadata]
videoMetadata :: Prelude.Maybe [VideoMetadata],
    -- | If the job fails, @StatusMessage@ provides a descriptive error message.
    GetSegmentDetectionResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | An array of segments detected in a video. The array is sorted by the
    -- segment types (TECHNICAL_CUE or SHOT) specified in the @SegmentTypes@
    -- input parameter of @StartSegmentDetection@. Within each segment type the
    -- array is sorted by timestamp values.
    GetSegmentDetectionResponse -> Maybe [SegmentDetection]
segments :: Prelude.Maybe [SegmentDetection],
    -- | Current status of the segment detection job.
    GetSegmentDetectionResponse -> Maybe VideoJobStatus
jobStatus :: Prelude.Maybe VideoJobStatus,
    -- | An array of objects. There can be multiple audio streams. Each
    -- @AudioMetadata@ object contains metadata for a single audio stream.
    -- Audio information in an @AudioMetadata@ objects includes the audio
    -- codec, the number of audio channels, the duration of the audio stream,
    -- and the sample rate. Audio metadata is returned in each page of
    -- information returned by @GetSegmentDetection@.
    GetSegmentDetectionResponse -> Maybe [AudioMetadata]
audioMetadata :: Prelude.Maybe [AudioMetadata],
    -- | The response's http status code.
    GetSegmentDetectionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetSegmentDetectionResponse -> GetSegmentDetectionResponse -> Bool
(GetSegmentDetectionResponse
 -> GetSegmentDetectionResponse -> Bool)
-> (GetSegmentDetectionResponse
    -> GetSegmentDetectionResponse -> Bool)
-> Eq GetSegmentDetectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSegmentDetectionResponse -> GetSegmentDetectionResponse -> Bool
$c/= :: GetSegmentDetectionResponse -> GetSegmentDetectionResponse -> Bool
== :: GetSegmentDetectionResponse -> GetSegmentDetectionResponse -> Bool
$c== :: GetSegmentDetectionResponse -> GetSegmentDetectionResponse -> Bool
Prelude.Eq, ReadPrec [GetSegmentDetectionResponse]
ReadPrec GetSegmentDetectionResponse
Int -> ReadS GetSegmentDetectionResponse
ReadS [GetSegmentDetectionResponse]
(Int -> ReadS GetSegmentDetectionResponse)
-> ReadS [GetSegmentDetectionResponse]
-> ReadPrec GetSegmentDetectionResponse
-> ReadPrec [GetSegmentDetectionResponse]
-> Read GetSegmentDetectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSegmentDetectionResponse]
$creadListPrec :: ReadPrec [GetSegmentDetectionResponse]
readPrec :: ReadPrec GetSegmentDetectionResponse
$creadPrec :: ReadPrec GetSegmentDetectionResponse
readList :: ReadS [GetSegmentDetectionResponse]
$creadList :: ReadS [GetSegmentDetectionResponse]
readsPrec :: Int -> ReadS GetSegmentDetectionResponse
$creadsPrec :: Int -> ReadS GetSegmentDetectionResponse
Prelude.Read, Int -> GetSegmentDetectionResponse -> ShowS
[GetSegmentDetectionResponse] -> ShowS
GetSegmentDetectionResponse -> String
(Int -> GetSegmentDetectionResponse -> ShowS)
-> (GetSegmentDetectionResponse -> String)
-> ([GetSegmentDetectionResponse] -> ShowS)
-> Show GetSegmentDetectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSegmentDetectionResponse] -> ShowS
$cshowList :: [GetSegmentDetectionResponse] -> ShowS
show :: GetSegmentDetectionResponse -> String
$cshow :: GetSegmentDetectionResponse -> String
showsPrec :: Int -> GetSegmentDetectionResponse -> ShowS
$cshowsPrec :: Int -> GetSegmentDetectionResponse -> ShowS
Prelude.Show, (forall x.
 GetSegmentDetectionResponse -> Rep GetSegmentDetectionResponse x)
-> (forall x.
    Rep GetSegmentDetectionResponse x -> GetSegmentDetectionResponse)
-> Generic GetSegmentDetectionResponse
forall x.
Rep GetSegmentDetectionResponse x -> GetSegmentDetectionResponse
forall x.
GetSegmentDetectionResponse -> Rep GetSegmentDetectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetSegmentDetectionResponse x -> GetSegmentDetectionResponse
$cfrom :: forall x.
GetSegmentDetectionResponse -> Rep GetSegmentDetectionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetSegmentDetectionResponse' 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:
--
-- 'selectedSegmentTypes', 'getSegmentDetectionResponse_selectedSegmentTypes' - An array containing the segment types requested in the call to
-- @StartSegmentDetection@.
--
-- 'nextToken', 'getSegmentDetectionResponse_nextToken' - If the previous response was incomplete (because there are more labels
-- to retrieve), Amazon Rekognition Video returns a pagination token in the
-- response. You can use this pagination token to retrieve the next set of
-- text.
--
-- 'videoMetadata', 'getSegmentDetectionResponse_videoMetadata' - Currently, Amazon Rekognition Video returns a single object in the
-- @VideoMetadata@ array. The object contains information about the video
-- stream in the input file that Amazon Rekognition Video chose to analyze.
-- The @VideoMetadata@ object includes the video codec, video format and
-- other information. Video metadata is returned in each page of
-- information returned by @GetSegmentDetection@.
--
-- 'statusMessage', 'getSegmentDetectionResponse_statusMessage' - If the job fails, @StatusMessage@ provides a descriptive error message.
--
-- 'segments', 'getSegmentDetectionResponse_segments' - An array of segments detected in a video. The array is sorted by the
-- segment types (TECHNICAL_CUE or SHOT) specified in the @SegmentTypes@
-- input parameter of @StartSegmentDetection@. Within each segment type the
-- array is sorted by timestamp values.
--
-- 'jobStatus', 'getSegmentDetectionResponse_jobStatus' - Current status of the segment detection job.
--
-- 'audioMetadata', 'getSegmentDetectionResponse_audioMetadata' - An array of objects. There can be multiple audio streams. Each
-- @AudioMetadata@ object contains metadata for a single audio stream.
-- Audio information in an @AudioMetadata@ objects includes the audio
-- codec, the number of audio channels, the duration of the audio stream,
-- and the sample rate. Audio metadata is returned in each page of
-- information returned by @GetSegmentDetection@.
--
-- 'httpStatus', 'getSegmentDetectionResponse_httpStatus' - The response's http status code.
newGetSegmentDetectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetSegmentDetectionResponse
newGetSegmentDetectionResponse :: Int -> GetSegmentDetectionResponse
newGetSegmentDetectionResponse Int
pHttpStatus_ =
  GetSegmentDetectionResponse' :: Maybe [SegmentTypeInfo]
-> Maybe Text
-> Maybe [VideoMetadata]
-> Maybe Text
-> Maybe [SegmentDetection]
-> Maybe VideoJobStatus
-> Maybe [AudioMetadata]
-> Int
-> GetSegmentDetectionResponse
GetSegmentDetectionResponse'
    { $sel:selectedSegmentTypes:GetSegmentDetectionResponse' :: Maybe [SegmentTypeInfo]
selectedSegmentTypes =
        Maybe [SegmentTypeInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetSegmentDetectionResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:videoMetadata:GetSegmentDetectionResponse' :: Maybe [VideoMetadata]
videoMetadata = Maybe [VideoMetadata]
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:GetSegmentDetectionResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:segments:GetSegmentDetectionResponse' :: Maybe [SegmentDetection]
segments = Maybe [SegmentDetection]
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:GetSegmentDetectionResponse' :: Maybe VideoJobStatus
jobStatus = Maybe VideoJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:audioMetadata:GetSegmentDetectionResponse' :: Maybe [AudioMetadata]
audioMetadata = Maybe [AudioMetadata]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetSegmentDetectionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array containing the segment types requested in the call to
-- @StartSegmentDetection@.
getSegmentDetectionResponse_selectedSegmentTypes :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe [SegmentTypeInfo])
getSegmentDetectionResponse_selectedSegmentTypes :: (Maybe [SegmentTypeInfo] -> f (Maybe [SegmentTypeInfo]))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_selectedSegmentTypes = (GetSegmentDetectionResponse -> Maybe [SegmentTypeInfo])
-> (GetSegmentDetectionResponse
    -> Maybe [SegmentTypeInfo] -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe [SegmentTypeInfo])
     (Maybe [SegmentTypeInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe [SegmentTypeInfo]
selectedSegmentTypes :: Maybe [SegmentTypeInfo]
$sel:selectedSegmentTypes:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe [SegmentTypeInfo]
selectedSegmentTypes} -> Maybe [SegmentTypeInfo]
selectedSegmentTypes) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe [SegmentTypeInfo]
a -> GetSegmentDetectionResponse
s {$sel:selectedSegmentTypes:GetSegmentDetectionResponse' :: Maybe [SegmentTypeInfo]
selectedSegmentTypes = Maybe [SegmentTypeInfo]
a} :: GetSegmentDetectionResponse) ((Maybe [SegmentTypeInfo] -> f (Maybe [SegmentTypeInfo]))
 -> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse)
-> ((Maybe [SegmentTypeInfo] -> f (Maybe [SegmentTypeInfo]))
    -> Maybe [SegmentTypeInfo] -> f (Maybe [SegmentTypeInfo]))
-> (Maybe [SegmentTypeInfo] -> f (Maybe [SegmentTypeInfo]))
-> GetSegmentDetectionResponse
-> f GetSegmentDetectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SegmentTypeInfo]
  [SegmentTypeInfo]
  [SegmentTypeInfo]
  [SegmentTypeInfo]
-> Iso
     (Maybe [SegmentTypeInfo])
     (Maybe [SegmentTypeInfo])
     (Maybe [SegmentTypeInfo])
     (Maybe [SegmentTypeInfo])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [SegmentTypeInfo]
  [SegmentTypeInfo]
  [SegmentTypeInfo]
  [SegmentTypeInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the previous response was incomplete (because there are more labels
-- to retrieve), Amazon Rekognition Video returns a pagination token in the
-- response. You can use this pagination token to retrieve the next set of
-- text.
getSegmentDetectionResponse_nextToken :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe Prelude.Text)
getSegmentDetectionResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_nextToken = (GetSegmentDetectionResponse -> Maybe Text)
-> (GetSegmentDetectionResponse
    -> Maybe Text -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe Text
a -> GetSegmentDetectionResponse
s {$sel:nextToken:GetSegmentDetectionResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetSegmentDetectionResponse)

-- | Currently, Amazon Rekognition Video returns a single object in the
-- @VideoMetadata@ array. The object contains information about the video
-- stream in the input file that Amazon Rekognition Video chose to analyze.
-- The @VideoMetadata@ object includes the video codec, video format and
-- other information. Video metadata is returned in each page of
-- information returned by @GetSegmentDetection@.
getSegmentDetectionResponse_videoMetadata :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe [VideoMetadata])
getSegmentDetectionResponse_videoMetadata :: (Maybe [VideoMetadata] -> f (Maybe [VideoMetadata]))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_videoMetadata = (GetSegmentDetectionResponse -> Maybe [VideoMetadata])
-> (GetSegmentDetectionResponse
    -> Maybe [VideoMetadata] -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe [VideoMetadata])
     (Maybe [VideoMetadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe [VideoMetadata]
videoMetadata :: Maybe [VideoMetadata]
$sel:videoMetadata:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe [VideoMetadata]
videoMetadata} -> Maybe [VideoMetadata]
videoMetadata) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe [VideoMetadata]
a -> GetSegmentDetectionResponse
s {$sel:videoMetadata:GetSegmentDetectionResponse' :: Maybe [VideoMetadata]
videoMetadata = Maybe [VideoMetadata]
a} :: GetSegmentDetectionResponse) ((Maybe [VideoMetadata] -> f (Maybe [VideoMetadata]))
 -> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse)
-> ((Maybe [VideoMetadata] -> f (Maybe [VideoMetadata]))
    -> Maybe [VideoMetadata] -> f (Maybe [VideoMetadata]))
-> (Maybe [VideoMetadata] -> f (Maybe [VideoMetadata]))
-> GetSegmentDetectionResponse
-> f GetSegmentDetectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [VideoMetadata] [VideoMetadata] [VideoMetadata] [VideoMetadata]
-> Iso
     (Maybe [VideoMetadata])
     (Maybe [VideoMetadata])
     (Maybe [VideoMetadata])
     (Maybe [VideoMetadata])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [VideoMetadata] [VideoMetadata] [VideoMetadata] [VideoMetadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the job fails, @StatusMessage@ provides a descriptive error message.
getSegmentDetectionResponse_statusMessage :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe Prelude.Text)
getSegmentDetectionResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_statusMessage = (GetSegmentDetectionResponse -> Maybe Text)
-> (GetSegmentDetectionResponse
    -> Maybe Text -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe Text
a -> GetSegmentDetectionResponse
s {$sel:statusMessage:GetSegmentDetectionResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: GetSegmentDetectionResponse)

-- | An array of segments detected in a video. The array is sorted by the
-- segment types (TECHNICAL_CUE or SHOT) specified in the @SegmentTypes@
-- input parameter of @StartSegmentDetection@. Within each segment type the
-- array is sorted by timestamp values.
getSegmentDetectionResponse_segments :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe [SegmentDetection])
getSegmentDetectionResponse_segments :: (Maybe [SegmentDetection] -> f (Maybe [SegmentDetection]))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_segments = (GetSegmentDetectionResponse -> Maybe [SegmentDetection])
-> (GetSegmentDetectionResponse
    -> Maybe [SegmentDetection] -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe [SegmentDetection])
     (Maybe [SegmentDetection])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe [SegmentDetection]
segments :: Maybe [SegmentDetection]
$sel:segments:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe [SegmentDetection]
segments} -> Maybe [SegmentDetection]
segments) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe [SegmentDetection]
a -> GetSegmentDetectionResponse
s {$sel:segments:GetSegmentDetectionResponse' :: Maybe [SegmentDetection]
segments = Maybe [SegmentDetection]
a} :: GetSegmentDetectionResponse) ((Maybe [SegmentDetection] -> f (Maybe [SegmentDetection]))
 -> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse)
-> ((Maybe [SegmentDetection] -> f (Maybe [SegmentDetection]))
    -> Maybe [SegmentDetection] -> f (Maybe [SegmentDetection]))
-> (Maybe [SegmentDetection] -> f (Maybe [SegmentDetection]))
-> GetSegmentDetectionResponse
-> f GetSegmentDetectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SegmentDetection]
  [SegmentDetection]
  [SegmentDetection]
  [SegmentDetection]
-> Iso
     (Maybe [SegmentDetection])
     (Maybe [SegmentDetection])
     (Maybe [SegmentDetection])
     (Maybe [SegmentDetection])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [SegmentDetection]
  [SegmentDetection]
  [SegmentDetection]
  [SegmentDetection]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Current status of the segment detection job.
getSegmentDetectionResponse_jobStatus :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe VideoJobStatus)
getSegmentDetectionResponse_jobStatus :: (Maybe VideoJobStatus -> f (Maybe VideoJobStatus))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_jobStatus = (GetSegmentDetectionResponse -> Maybe VideoJobStatus)
-> (GetSegmentDetectionResponse
    -> Maybe VideoJobStatus -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe VideoJobStatus)
     (Maybe VideoJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe VideoJobStatus
jobStatus :: Maybe VideoJobStatus
$sel:jobStatus:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe VideoJobStatus
jobStatus} -> Maybe VideoJobStatus
jobStatus) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe VideoJobStatus
a -> GetSegmentDetectionResponse
s {$sel:jobStatus:GetSegmentDetectionResponse' :: Maybe VideoJobStatus
jobStatus = Maybe VideoJobStatus
a} :: GetSegmentDetectionResponse)

-- | An array of objects. There can be multiple audio streams. Each
-- @AudioMetadata@ object contains metadata for a single audio stream.
-- Audio information in an @AudioMetadata@ objects includes the audio
-- codec, the number of audio channels, the duration of the audio stream,
-- and the sample rate. Audio metadata is returned in each page of
-- information returned by @GetSegmentDetection@.
getSegmentDetectionResponse_audioMetadata :: Lens.Lens' GetSegmentDetectionResponse (Prelude.Maybe [AudioMetadata])
getSegmentDetectionResponse_audioMetadata :: (Maybe [AudioMetadata] -> f (Maybe [AudioMetadata]))
-> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse
getSegmentDetectionResponse_audioMetadata = (GetSegmentDetectionResponse -> Maybe [AudioMetadata])
-> (GetSegmentDetectionResponse
    -> Maybe [AudioMetadata] -> GetSegmentDetectionResponse)
-> Lens
     GetSegmentDetectionResponse
     GetSegmentDetectionResponse
     (Maybe [AudioMetadata])
     (Maybe [AudioMetadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSegmentDetectionResponse' {Maybe [AudioMetadata]
audioMetadata :: Maybe [AudioMetadata]
$sel:audioMetadata:GetSegmentDetectionResponse' :: GetSegmentDetectionResponse -> Maybe [AudioMetadata]
audioMetadata} -> Maybe [AudioMetadata]
audioMetadata) (\s :: GetSegmentDetectionResponse
s@GetSegmentDetectionResponse' {} Maybe [AudioMetadata]
a -> GetSegmentDetectionResponse
s {$sel:audioMetadata:GetSegmentDetectionResponse' :: Maybe [AudioMetadata]
audioMetadata = Maybe [AudioMetadata]
a} :: GetSegmentDetectionResponse) ((Maybe [AudioMetadata] -> f (Maybe [AudioMetadata]))
 -> GetSegmentDetectionResponse -> f GetSegmentDetectionResponse)
-> ((Maybe [AudioMetadata] -> f (Maybe [AudioMetadata]))
    -> Maybe [AudioMetadata] -> f (Maybe [AudioMetadata]))
-> (Maybe [AudioMetadata] -> f (Maybe [AudioMetadata]))
-> GetSegmentDetectionResponse
-> f GetSegmentDetectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AudioMetadata] [AudioMetadata] [AudioMetadata] [AudioMetadata]
-> Iso
     (Maybe [AudioMetadata])
     (Maybe [AudioMetadata])
     (Maybe [AudioMetadata])
     (Maybe [AudioMetadata])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [AudioMetadata] [AudioMetadata] [AudioMetadata] [AudioMetadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetSegmentDetectionResponse