{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transcribe.Types.SubtitleFormat
data Subtitles = Subtitles'
{
Subtitles -> Maybe [SubtitleFormat]
formats :: Prelude.Maybe [SubtitleFormat]
}
deriving (Subtitles -> Subtitles -> Bool
(Subtitles -> Subtitles -> Bool)
-> (Subtitles -> Subtitles -> Bool) -> Eq Subtitles
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]
(Int -> ReadS Subtitles)
-> ReadS [Subtitles]
-> ReadPrec Subtitles
-> ReadPrec [Subtitles]
-> Read 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
(Int -> Subtitles -> ShowS)
-> (Subtitles -> String)
-> ([Subtitles] -> ShowS)
-> Show Subtitles
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. Subtitles -> Rep Subtitles x)
-> (forall x. Rep Subtitles x -> Subtitles) -> Generic Subtitles
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' :: Maybe [SubtitleFormat] -> Subtitles
Subtitles' {$sel:formats:Subtitles' :: Maybe [SubtitleFormat]
formats = Maybe [SubtitleFormat]
forall a. Maybe a
Prelude.Nothing}
subtitles_formats :: Lens.Lens' Subtitles (Prelude.Maybe [SubtitleFormat])
subtitles_formats :: (Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> Subtitles -> f Subtitles
subtitles_formats = (Subtitles -> Maybe [SubtitleFormat])
-> (Subtitles -> Maybe [SubtitleFormat] -> Subtitles)
-> Lens
Subtitles
Subtitles
(Maybe [SubtitleFormat])
(Maybe [SubtitleFormat])
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) ((Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> Subtitles -> f Subtitles)
-> ((Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> (Maybe [SubtitleFormat] -> f (Maybe [SubtitleFormat]))
-> Subtitles
-> f Subtitles
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
instance Prelude.Hashable Subtitles
instance Prelude.NFData Subtitles
instance Core.ToJSON Subtitles where
toJSON :: Subtitles -> Value
toJSON Subtitles' {Maybe [SubtitleFormat]
formats :: Maybe [SubtitleFormat]
$sel:formats:Subtitles' :: Subtitles -> Maybe [SubtitleFormat]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"Formats" Text -> [SubtitleFormat] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([SubtitleFormat] -> Pair) -> Maybe [SubtitleFormat] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SubtitleFormat]
formats]
)