{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transcribe.Types.SubtitlesOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transcribe.Types.SubtitleFormat
data SubtitlesOutput = SubtitlesOutput'
{
SubtitlesOutput -> Maybe [SubtitleFormat]
formats :: Prelude.Maybe [SubtitleFormat],
SubtitlesOutput -> Maybe Natural
outputStartIndex :: Prelude.Maybe Prelude.Natural,
SubtitlesOutput -> Maybe [Text]
subtitleFileUris :: Prelude.Maybe [Prelude.Text]
}
deriving (SubtitlesOutput -> SubtitlesOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubtitlesOutput -> SubtitlesOutput -> Bool
$c/= :: SubtitlesOutput -> SubtitlesOutput -> Bool
== :: SubtitlesOutput -> SubtitlesOutput -> Bool
$c== :: SubtitlesOutput -> SubtitlesOutput -> Bool
Prelude.Eq, ReadPrec [SubtitlesOutput]
ReadPrec SubtitlesOutput
Int -> ReadS SubtitlesOutput
ReadS [SubtitlesOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubtitlesOutput]
$creadListPrec :: ReadPrec [SubtitlesOutput]
readPrec :: ReadPrec SubtitlesOutput
$creadPrec :: ReadPrec SubtitlesOutput
readList :: ReadS [SubtitlesOutput]
$creadList :: ReadS [SubtitlesOutput]
readsPrec :: Int -> ReadS SubtitlesOutput
$creadsPrec :: Int -> ReadS SubtitlesOutput
Prelude.Read, Int -> SubtitlesOutput -> ShowS
[SubtitlesOutput] -> ShowS
SubtitlesOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubtitlesOutput] -> ShowS
$cshowList :: [SubtitlesOutput] -> ShowS
show :: SubtitlesOutput -> String
$cshow :: SubtitlesOutput -> String
showsPrec :: Int -> SubtitlesOutput -> ShowS
$cshowsPrec :: Int -> SubtitlesOutput -> ShowS
Prelude.Show, forall x. Rep SubtitlesOutput x -> SubtitlesOutput
forall x. SubtitlesOutput -> Rep SubtitlesOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SubtitlesOutput x -> SubtitlesOutput
$cfrom :: forall x. SubtitlesOutput -> Rep SubtitlesOutput x
Prelude.Generic)
newSubtitlesOutput ::
SubtitlesOutput
newSubtitlesOutput :: SubtitlesOutput
newSubtitlesOutput =
SubtitlesOutput'
{ $sel:formats:SubtitlesOutput' :: Maybe [SubtitleFormat]
formats = forall a. Maybe a
Prelude.Nothing,
$sel:outputStartIndex:SubtitlesOutput' :: Maybe Natural
outputStartIndex = forall a. Maybe a
Prelude.Nothing,
$sel:subtitleFileUris:SubtitlesOutput' :: Maybe [Text]
subtitleFileUris = forall a. Maybe a
Prelude.Nothing
}
subtitlesOutput_formats :: Lens.Lens' SubtitlesOutput (Prelude.Maybe [SubtitleFormat])
subtitlesOutput_formats :: Lens' SubtitlesOutput (Maybe [SubtitleFormat])
subtitlesOutput_formats = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubtitlesOutput' {Maybe [SubtitleFormat]
formats :: Maybe [SubtitleFormat]
$sel:formats:SubtitlesOutput' :: SubtitlesOutput -> Maybe [SubtitleFormat]
formats} -> Maybe [SubtitleFormat]
formats) (\s :: SubtitlesOutput
s@SubtitlesOutput' {} Maybe [SubtitleFormat]
a -> SubtitlesOutput
s {$sel:formats:SubtitlesOutput' :: Maybe [SubtitleFormat]
formats = Maybe [SubtitleFormat]
a} :: SubtitlesOutput) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
subtitlesOutput_outputStartIndex :: Lens.Lens' SubtitlesOutput (Prelude.Maybe Prelude.Natural)
subtitlesOutput_outputStartIndex :: Lens' SubtitlesOutput (Maybe Natural)
subtitlesOutput_outputStartIndex = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubtitlesOutput' {Maybe Natural
outputStartIndex :: Maybe Natural
$sel:outputStartIndex:SubtitlesOutput' :: SubtitlesOutput -> Maybe Natural
outputStartIndex} -> Maybe Natural
outputStartIndex) (\s :: SubtitlesOutput
s@SubtitlesOutput' {} Maybe Natural
a -> SubtitlesOutput
s {$sel:outputStartIndex:SubtitlesOutput' :: Maybe Natural
outputStartIndex = Maybe Natural
a} :: SubtitlesOutput)
subtitlesOutput_subtitleFileUris :: Lens.Lens' SubtitlesOutput (Prelude.Maybe [Prelude.Text])
subtitlesOutput_subtitleFileUris :: Lens' SubtitlesOutput (Maybe [Text])
subtitlesOutput_subtitleFileUris = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubtitlesOutput' {Maybe [Text]
subtitleFileUris :: Maybe [Text]
$sel:subtitleFileUris:SubtitlesOutput' :: SubtitlesOutput -> Maybe [Text]
subtitleFileUris} -> Maybe [Text]
subtitleFileUris) (\s :: SubtitlesOutput
s@SubtitlesOutput' {} Maybe [Text]
a -> SubtitlesOutput
s {$sel:subtitleFileUris:SubtitlesOutput' :: Maybe [Text]
subtitleFileUris = Maybe [Text]
a} :: SubtitlesOutput) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON SubtitlesOutput where
parseJSON :: Value -> Parser SubtitlesOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SubtitlesOutput"
( \Object
x ->
Maybe [SubtitleFormat]
-> Maybe Natural -> Maybe [Text] -> SubtitlesOutput
SubtitlesOutput'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Formats" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OutputStartIndex")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubtitleFileUris"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable SubtitlesOutput where
hashWithSalt :: Int -> SubtitlesOutput -> Int
hashWithSalt Int
_salt SubtitlesOutput' {Maybe Natural
Maybe [Text]
Maybe [SubtitleFormat]
subtitleFileUris :: Maybe [Text]
outputStartIndex :: Maybe Natural
formats :: Maybe [SubtitleFormat]
$sel:subtitleFileUris:SubtitlesOutput' :: SubtitlesOutput -> Maybe [Text]
$sel:outputStartIndex:SubtitlesOutput' :: SubtitlesOutput -> Maybe Natural
$sel:formats:SubtitlesOutput' :: SubtitlesOutput -> Maybe [SubtitleFormat]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SubtitleFormat]
formats
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
outputStartIndex
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subtitleFileUris
instance Prelude.NFData SubtitlesOutput where
rnf :: SubtitlesOutput -> ()
rnf SubtitlesOutput' {Maybe Natural
Maybe [Text]
Maybe [SubtitleFormat]
subtitleFileUris :: Maybe [Text]
outputStartIndex :: Maybe Natural
formats :: Maybe [SubtitleFormat]
$sel:subtitleFileUris:SubtitlesOutput' :: SubtitlesOutput -> Maybe [Text]
$sel:outputStartIndex:SubtitlesOutput' :: SubtitlesOutput -> Maybe Natural
$sel:formats:SubtitlesOutput' :: SubtitlesOutput -> Maybe [SubtitleFormat]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [SubtitleFormat]
formats
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
outputStartIndex
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subtitleFileUris