{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transcribe.Types.SubtitleFormat
data SubtitlesOutput = SubtitlesOutput'
{
SubtitlesOutput -> Maybe [SubtitleFormat]
formats :: Prelude.Maybe [SubtitleFormat],
SubtitlesOutput -> Maybe [Text]
subtitleFileUris :: Prelude.Maybe [Prelude.Text]
}
deriving (SubtitlesOutput -> SubtitlesOutput -> Bool
(SubtitlesOutput -> SubtitlesOutput -> Bool)
-> (SubtitlesOutput -> SubtitlesOutput -> Bool)
-> Eq SubtitlesOutput
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]
(Int -> ReadS SubtitlesOutput)
-> ReadS [SubtitlesOutput]
-> ReadPrec SubtitlesOutput
-> ReadPrec [SubtitlesOutput]
-> Read 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
(Int -> SubtitlesOutput -> ShowS)
-> (SubtitlesOutput -> String)
-> ([SubtitlesOutput] -> ShowS)
-> Show SubtitlesOutput
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. SubtitlesOutput -> Rep SubtitlesOutput x)
-> (forall x. Rep SubtitlesOutput x -> SubtitlesOutput)
-> Generic SubtitlesOutput
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' :: Maybe [SubtitleFormat] -> Maybe [Text] -> SubtitlesOutput
SubtitlesOutput'
{ $sel:formats:SubtitlesOutput' :: Maybe [SubtitleFormat]
formats = Maybe [SubtitleFormat]
forall a. Maybe a
Prelude.Nothing,
$sel:subtitleFileUris:SubtitlesOutput' :: Maybe [Text]
subtitleFileUris = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
subtitlesOutput_formats :: Lens.Lens' SubtitlesOutput (Prelude.Maybe [SubtitleFormat])
subtitlesOutput_formats :: (Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> SubtitlesOutput -> f SubtitlesOutput
subtitlesOutput_formats = (SubtitlesOutput -> Maybe [SubtitleFormat])
-> (SubtitlesOutput -> Maybe [SubtitleFormat] -> SubtitlesOutput)
-> Lens
SubtitlesOutput
SubtitlesOutput
(Maybe [SubtitleFormat])
(Maybe [SubtitleFormat])
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) ((Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> SubtitlesOutput -> f SubtitlesOutput)
-> ((Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> (Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> SubtitlesOutput
-> f SubtitlesOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SubtitleFormat] [SubtitleFormat] [SubtitleFormat] [SubtitleFormat]
-> Iso
(Maybe [SubtitleFormat])
(Maybe [SubtitleFormat])
(Maybe [SubtitleFormat])
(Maybe [SubtitleFormat])
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
[SubtitleFormat] [SubtitleFormat] [SubtitleFormat] [SubtitleFormat]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
subtitlesOutput_subtitleFileUris :: Lens.Lens' SubtitlesOutput (Prelude.Maybe [Prelude.Text])
subtitlesOutput_subtitleFileUris :: (Maybe [Text] -> f (Maybe [Text]))
-> SubtitlesOutput -> f SubtitlesOutput
subtitlesOutput_subtitleFileUris = (SubtitlesOutput -> Maybe [Text])
-> (SubtitlesOutput -> Maybe [Text] -> SubtitlesOutput)
-> Lens
SubtitlesOutput SubtitlesOutput (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
-> SubtitlesOutput -> f SubtitlesOutput)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SubtitlesOutput
-> f SubtitlesOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON SubtitlesOutput where
parseJSON :: Value -> Parser SubtitlesOutput
parseJSON =
String
-> (Object -> Parser SubtitlesOutput)
-> Value
-> Parser SubtitlesOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SubtitlesOutput"
( \Object
x ->
Maybe [SubtitleFormat] -> Maybe [Text] -> SubtitlesOutput
SubtitlesOutput'
(Maybe [SubtitleFormat] -> Maybe [Text] -> SubtitlesOutput)
-> Parser (Maybe [SubtitleFormat])
-> Parser (Maybe [Text] -> SubtitlesOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [SubtitleFormat]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Formats" Parser (Maybe (Maybe [SubtitleFormat]))
-> Maybe [SubtitleFormat] -> Parser (Maybe [SubtitleFormat])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SubtitleFormat]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe [Text] -> SubtitlesOutput)
-> Parser (Maybe [Text]) -> Parser SubtitlesOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubtitleFileUris"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable SubtitlesOutput
instance Prelude.NFData SubtitlesOutput