{-# 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 #-}
module Amazonka.Rekognition.GetSegmentDetection
(
GetSegmentDetection (..),
newGetSegmentDetection,
getSegmentDetection_nextToken,
getSegmentDetection_maxResults,
getSegmentDetection_jobId,
GetSegmentDetectionResponse (..),
newGetSegmentDetectionResponse,
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
data GetSegmentDetection = GetSegmentDetection'
{
GetSegmentDetection -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetSegmentDetection -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
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)
newGetSegmentDetection ::
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_
}
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)
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)
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
data GetSegmentDetectionResponse = GetSegmentDetectionResponse'
{
GetSegmentDetectionResponse -> Maybe [SegmentTypeInfo]
selectedSegmentTypes :: Prelude.Maybe [SegmentTypeInfo],
GetSegmentDetectionResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetSegmentDetectionResponse -> Maybe [VideoMetadata]
videoMetadata :: Prelude.Maybe [VideoMetadata],
GetSegmentDetectionResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
GetSegmentDetectionResponse -> Maybe [SegmentDetection]
segments :: Prelude.Maybe [SegmentDetection],
GetSegmentDetectionResponse -> Maybe VideoJobStatus
jobStatus :: Prelude.Maybe VideoJobStatus,
GetSegmentDetectionResponse -> Maybe [AudioMetadata]
audioMetadata :: Prelude.Maybe [AudioMetadata],
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)
newGetSegmentDetectionResponse ::
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_
}
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
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)
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
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)
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
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)
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
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