{-# 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.Subtitles 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 Subtitles = Subtitles'
{
Subtitles -> Maybe [SubtitleFormat]
formats :: Prelude.Maybe [SubtitleFormat],
Subtitles -> Maybe Natural
outputStartIndex :: Prelude.Maybe Prelude.Natural
}
deriving (Subtitles -> Subtitles -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Subtitles -> Subtitles -> Bool
$c/= :: Subtitles -> Subtitles -> Bool
== :: Subtitles -> Subtitles -> Bool
$c== :: Subtitles -> Subtitles -> Bool
Prelude.Eq, ReadPrec [Subtitles]
ReadPrec Subtitles
Int -> ReadS Subtitles
ReadS [Subtitles]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Subtitles]
$creadListPrec :: ReadPrec [Subtitles]
readPrec :: ReadPrec Subtitles
$creadPrec :: ReadPrec Subtitles
readList :: ReadS [Subtitles]
$creadList :: ReadS [Subtitles]
readsPrec :: Int -> ReadS Subtitles
$creadsPrec :: Int -> ReadS Subtitles
Prelude.Read, Int -> Subtitles -> ShowS
[Subtitles] -> ShowS
Subtitles -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Subtitles] -> ShowS
$cshowList :: [Subtitles] -> ShowS
show :: Subtitles -> String
$cshow :: Subtitles -> String
showsPrec :: Int -> Subtitles -> ShowS
$cshowsPrec :: Int -> Subtitles -> ShowS
Prelude.Show, forall x. Rep Subtitles x -> Subtitles
forall x. Subtitles -> Rep Subtitles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Subtitles x -> Subtitles
$cfrom :: forall x. Subtitles -> Rep Subtitles x
Prelude.Generic)
newSubtitles ::
Subtitles
newSubtitles :: Subtitles
newSubtitles =
Subtitles'
{ $sel:formats:Subtitles' :: Maybe [SubtitleFormat]
formats = forall a. Maybe a
Prelude.Nothing,
$sel:outputStartIndex:Subtitles' :: Maybe Natural
outputStartIndex = forall a. Maybe a
Prelude.Nothing
}
subtitles_formats :: Lens.Lens' Subtitles (Prelude.Maybe [SubtitleFormat])
subtitles_formats :: Lens' Subtitles (Maybe [SubtitleFormat])
subtitles_formats = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Subtitles' {Maybe [SubtitleFormat]
formats :: Maybe [SubtitleFormat]
$sel:formats:Subtitles' :: Subtitles -> Maybe [SubtitleFormat]
formats} -> Maybe [SubtitleFormat]
formats) (\s :: Subtitles
s@Subtitles' {} Maybe [SubtitleFormat]
a -> Subtitles
s {$sel:formats:Subtitles' :: Maybe [SubtitleFormat]
formats = Maybe [SubtitleFormat]
a} :: Subtitles) 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
subtitles_outputStartIndex :: Lens.Lens' Subtitles (Prelude.Maybe Prelude.Natural)
subtitles_outputStartIndex :: Lens' Subtitles (Maybe Natural)
subtitles_outputStartIndex = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Subtitles' {Maybe Natural
outputStartIndex :: Maybe Natural
$sel:outputStartIndex:Subtitles' :: Subtitles -> Maybe Natural
outputStartIndex} -> Maybe Natural
outputStartIndex) (\s :: Subtitles
s@Subtitles' {} Maybe Natural
a -> Subtitles
s {$sel:outputStartIndex:Subtitles' :: Maybe Natural
outputStartIndex = Maybe Natural
a} :: Subtitles)
instance Prelude.Hashable Subtitles where
hashWithSalt :: Int -> Subtitles -> Int
hashWithSalt Int
_salt Subtitles' {Maybe Natural
Maybe [SubtitleFormat]
outputStartIndex :: Maybe Natural
formats :: Maybe [SubtitleFormat]
$sel:outputStartIndex:Subtitles' :: Subtitles -> Maybe Natural
$sel:formats:Subtitles' :: Subtitles -> 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
instance Prelude.NFData Subtitles where
rnf :: Subtitles -> ()
rnf Subtitles' {Maybe Natural
Maybe [SubtitleFormat]
outputStartIndex :: Maybe Natural
formats :: Maybe [SubtitleFormat]
$sel:outputStartIndex:Subtitles' :: Subtitles -> Maybe Natural
$sel:formats:Subtitles' :: Subtitles -> 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
instance Data.ToJSON Subtitles where
toJSON :: Subtitles -> Value
toJSON Subtitles' {Maybe Natural
Maybe [SubtitleFormat]
outputStartIndex :: Maybe Natural
formats :: Maybe [SubtitleFormat]
$sel:outputStartIndex:Subtitles' :: Subtitles -> Maybe Natural
$sel:formats:Subtitles' :: Subtitles -> Maybe [SubtitleFormat]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Formats" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SubtitleFormat]
formats,
(Key
"OutputStartIndex" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
outputStartIndex
]
)