{-# 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.MediaConvert.Types.AudioSelectorGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AudioSelectorGroup = AudioSelectorGroup'
{
AudioSelectorGroup -> Maybe [Text]
audioSelectorNames :: Prelude.Maybe [Prelude.Text]
}
deriving (AudioSelectorGroup -> AudioSelectorGroup -> Bool
(AudioSelectorGroup -> AudioSelectorGroup -> Bool)
-> (AudioSelectorGroup -> AudioSelectorGroup -> Bool)
-> Eq AudioSelectorGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioSelectorGroup -> AudioSelectorGroup -> Bool
$c/= :: AudioSelectorGroup -> AudioSelectorGroup -> Bool
== :: AudioSelectorGroup -> AudioSelectorGroup -> Bool
$c== :: AudioSelectorGroup -> AudioSelectorGroup -> Bool
Prelude.Eq, ReadPrec [AudioSelectorGroup]
ReadPrec AudioSelectorGroup
Int -> ReadS AudioSelectorGroup
ReadS [AudioSelectorGroup]
(Int -> ReadS AudioSelectorGroup)
-> ReadS [AudioSelectorGroup]
-> ReadPrec AudioSelectorGroup
-> ReadPrec [AudioSelectorGroup]
-> Read AudioSelectorGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioSelectorGroup]
$creadListPrec :: ReadPrec [AudioSelectorGroup]
readPrec :: ReadPrec AudioSelectorGroup
$creadPrec :: ReadPrec AudioSelectorGroup
readList :: ReadS [AudioSelectorGroup]
$creadList :: ReadS [AudioSelectorGroup]
readsPrec :: Int -> ReadS AudioSelectorGroup
$creadsPrec :: Int -> ReadS AudioSelectorGroup
Prelude.Read, Int -> AudioSelectorGroup -> ShowS
[AudioSelectorGroup] -> ShowS
AudioSelectorGroup -> String
(Int -> AudioSelectorGroup -> ShowS)
-> (AudioSelectorGroup -> String)
-> ([AudioSelectorGroup] -> ShowS)
-> Show AudioSelectorGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioSelectorGroup] -> ShowS
$cshowList :: [AudioSelectorGroup] -> ShowS
show :: AudioSelectorGroup -> String
$cshow :: AudioSelectorGroup -> String
showsPrec :: Int -> AudioSelectorGroup -> ShowS
$cshowsPrec :: Int -> AudioSelectorGroup -> ShowS
Prelude.Show, (forall x. AudioSelectorGroup -> Rep AudioSelectorGroup x)
-> (forall x. Rep AudioSelectorGroup x -> AudioSelectorGroup)
-> Generic AudioSelectorGroup
forall x. Rep AudioSelectorGroup x -> AudioSelectorGroup
forall x. AudioSelectorGroup -> Rep AudioSelectorGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioSelectorGroup x -> AudioSelectorGroup
$cfrom :: forall x. AudioSelectorGroup -> Rep AudioSelectorGroup x
Prelude.Generic)
newAudioSelectorGroup ::
AudioSelectorGroup
newAudioSelectorGroup :: AudioSelectorGroup
newAudioSelectorGroup =
AudioSelectorGroup' :: Maybe [Text] -> AudioSelectorGroup
AudioSelectorGroup'
{ $sel:audioSelectorNames:AudioSelectorGroup' :: Maybe [Text]
audioSelectorNames =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
audioSelectorGroup_audioSelectorNames :: Lens.Lens' AudioSelectorGroup (Prelude.Maybe [Prelude.Text])
audioSelectorGroup_audioSelectorNames :: (Maybe [Text] -> f (Maybe [Text]))
-> AudioSelectorGroup -> f AudioSelectorGroup
audioSelectorGroup_audioSelectorNames = (AudioSelectorGroup -> Maybe [Text])
-> (AudioSelectorGroup -> Maybe [Text] -> AudioSelectorGroup)
-> Lens
AudioSelectorGroup AudioSelectorGroup (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioSelectorGroup' {Maybe [Text]
audioSelectorNames :: Maybe [Text]
$sel:audioSelectorNames:AudioSelectorGroup' :: AudioSelectorGroup -> Maybe [Text]
audioSelectorNames} -> Maybe [Text]
audioSelectorNames) (\s :: AudioSelectorGroup
s@AudioSelectorGroup' {} Maybe [Text]
a -> AudioSelectorGroup
s {$sel:audioSelectorNames:AudioSelectorGroup' :: Maybe [Text]
audioSelectorNames = Maybe [Text]
a} :: AudioSelectorGroup) ((Maybe [Text] -> f (Maybe [Text]))
-> AudioSelectorGroup -> f AudioSelectorGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AudioSelectorGroup
-> f AudioSelectorGroup
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 AudioSelectorGroup where
parseJSON :: Value -> Parser AudioSelectorGroup
parseJSON =
String
-> (Object -> Parser AudioSelectorGroup)
-> Value
-> Parser AudioSelectorGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AudioSelectorGroup"
( \Object
x ->
Maybe [Text] -> AudioSelectorGroup
AudioSelectorGroup'
(Maybe [Text] -> AudioSelectorGroup)
-> Parser (Maybe [Text]) -> Parser AudioSelectorGroup
forall (f :: * -> *) a b. Functor 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
"audioSelectorNames"
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 AudioSelectorGroup
instance Prelude.NFData AudioSelectorGroup
instance Core.ToJSON AudioSelectorGroup where
toJSON :: AudioSelectorGroup -> Value
toJSON AudioSelectorGroup' {Maybe [Text]
audioSelectorNames :: Maybe [Text]
$sel:audioSelectorNames:AudioSelectorGroup' :: AudioSelectorGroup -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"audioSelectorNames" 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]
audioSelectorNames
]
)