{-# 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.OutputGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.AutomatedEncodingSettings
import Amazonka.MediaConvert.Types.Output
import Amazonka.MediaConvert.Types.OutputGroupSettings
import qualified Amazonka.Prelude as Prelude
data OutputGroup = OutputGroup'
{
OutputGroup -> Maybe AutomatedEncodingSettings
automatedEncodingSettings :: Prelude.Maybe AutomatedEncodingSettings,
OutputGroup -> Maybe Text
customName :: Prelude.Maybe Prelude.Text,
OutputGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
OutputGroup -> Maybe OutputGroupSettings
outputGroupSettings :: Prelude.Maybe OutputGroupSettings,
OutputGroup -> Maybe [Output]
outputs :: Prelude.Maybe [Output]
}
deriving (OutputGroup -> OutputGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputGroup -> OutputGroup -> Bool
$c/= :: OutputGroup -> OutputGroup -> Bool
== :: OutputGroup -> OutputGroup -> Bool
$c== :: OutputGroup -> OutputGroup -> Bool
Prelude.Eq, ReadPrec [OutputGroup]
ReadPrec OutputGroup
Int -> ReadS OutputGroup
ReadS [OutputGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputGroup]
$creadListPrec :: ReadPrec [OutputGroup]
readPrec :: ReadPrec OutputGroup
$creadPrec :: ReadPrec OutputGroup
readList :: ReadS [OutputGroup]
$creadList :: ReadS [OutputGroup]
readsPrec :: Int -> ReadS OutputGroup
$creadsPrec :: Int -> ReadS OutputGroup
Prelude.Read, Int -> OutputGroup -> ShowS
[OutputGroup] -> ShowS
OutputGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputGroup] -> ShowS
$cshowList :: [OutputGroup] -> ShowS
show :: OutputGroup -> String
$cshow :: OutputGroup -> String
showsPrec :: Int -> OutputGroup -> ShowS
$cshowsPrec :: Int -> OutputGroup -> ShowS
Prelude.Show, forall x. Rep OutputGroup x -> OutputGroup
forall x. OutputGroup -> Rep OutputGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputGroup x -> OutputGroup
$cfrom :: forall x. OutputGroup -> Rep OutputGroup x
Prelude.Generic)
newOutputGroup ::
OutputGroup
newOutputGroup :: OutputGroup
newOutputGroup =
OutputGroup'
{ $sel:automatedEncodingSettings:OutputGroup' :: Maybe AutomatedEncodingSettings
automatedEncodingSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:customName:OutputGroup' :: Maybe Text
customName = forall a. Maybe a
Prelude.Nothing,
$sel:name:OutputGroup' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:outputGroupSettings:OutputGroup' :: Maybe OutputGroupSettings
outputGroupSettings = forall a. Maybe a
Prelude.Nothing,
$sel:outputs:OutputGroup' :: Maybe [Output]
outputs = forall a. Maybe a
Prelude.Nothing
}
outputGroup_automatedEncodingSettings :: Lens.Lens' OutputGroup (Prelude.Maybe AutomatedEncodingSettings)
outputGroup_automatedEncodingSettings :: Lens' OutputGroup (Maybe AutomatedEncodingSettings)
outputGroup_automatedEncodingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroup' {Maybe AutomatedEncodingSettings
automatedEncodingSettings :: Maybe AutomatedEncodingSettings
$sel:automatedEncodingSettings:OutputGroup' :: OutputGroup -> Maybe AutomatedEncodingSettings
automatedEncodingSettings} -> Maybe AutomatedEncodingSettings
automatedEncodingSettings) (\s :: OutputGroup
s@OutputGroup' {} Maybe AutomatedEncodingSettings
a -> OutputGroup
s {$sel:automatedEncodingSettings:OutputGroup' :: Maybe AutomatedEncodingSettings
automatedEncodingSettings = Maybe AutomatedEncodingSettings
a} :: OutputGroup)
outputGroup_customName :: Lens.Lens' OutputGroup (Prelude.Maybe Prelude.Text)
outputGroup_customName :: Lens' OutputGroup (Maybe Text)
outputGroup_customName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroup' {Maybe Text
customName :: Maybe Text
$sel:customName:OutputGroup' :: OutputGroup -> Maybe Text
customName} -> Maybe Text
customName) (\s :: OutputGroup
s@OutputGroup' {} Maybe Text
a -> OutputGroup
s {$sel:customName:OutputGroup' :: Maybe Text
customName = Maybe Text
a} :: OutputGroup)
outputGroup_name :: Lens.Lens' OutputGroup (Prelude.Maybe Prelude.Text)
outputGroup_name :: Lens' OutputGroup (Maybe Text)
outputGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroup' {Maybe Text
name :: Maybe Text
$sel:name:OutputGroup' :: OutputGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: OutputGroup
s@OutputGroup' {} Maybe Text
a -> OutputGroup
s {$sel:name:OutputGroup' :: Maybe Text
name = Maybe Text
a} :: OutputGroup)
outputGroup_outputGroupSettings :: Lens.Lens' OutputGroup (Prelude.Maybe OutputGroupSettings)
outputGroup_outputGroupSettings :: Lens' OutputGroup (Maybe OutputGroupSettings)
outputGroup_outputGroupSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroup' {Maybe OutputGroupSettings
outputGroupSettings :: Maybe OutputGroupSettings
$sel:outputGroupSettings:OutputGroup' :: OutputGroup -> Maybe OutputGroupSettings
outputGroupSettings} -> Maybe OutputGroupSettings
outputGroupSettings) (\s :: OutputGroup
s@OutputGroup' {} Maybe OutputGroupSettings
a -> OutputGroup
s {$sel:outputGroupSettings:OutputGroup' :: Maybe OutputGroupSettings
outputGroupSettings = Maybe OutputGroupSettings
a} :: OutputGroup)
outputGroup_outputs :: Lens.Lens' OutputGroup (Prelude.Maybe [Output])
outputGroup_outputs :: Lens' OutputGroup (Maybe [Output])
outputGroup_outputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroup' {Maybe [Output]
outputs :: Maybe [Output]
$sel:outputs:OutputGroup' :: OutputGroup -> Maybe [Output]
outputs} -> Maybe [Output]
outputs) (\s :: OutputGroup
s@OutputGroup' {} Maybe [Output]
a -> OutputGroup
s {$sel:outputs:OutputGroup' :: Maybe [Output]
outputs = Maybe [Output]
a} :: OutputGroup) 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 OutputGroup where
parseJSON :: Value -> Parser OutputGroup
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OutputGroup"
( \Object
x ->
Maybe AutomatedEncodingSettings
-> Maybe Text
-> Maybe Text
-> Maybe OutputGroupSettings
-> Maybe [Output]
-> OutputGroup
OutputGroup'
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
"automatedEncodingSettings")
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
"customName")
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
"name")
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
"outputGroupSettings")
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
"outputs" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable OutputGroup where
hashWithSalt :: Int -> OutputGroup -> Int
hashWithSalt Int
_salt OutputGroup' {Maybe [Output]
Maybe Text
Maybe AutomatedEncodingSettings
Maybe OutputGroupSettings
outputs :: Maybe [Output]
outputGroupSettings :: Maybe OutputGroupSettings
name :: Maybe Text
customName :: Maybe Text
automatedEncodingSettings :: Maybe AutomatedEncodingSettings
$sel:outputs:OutputGroup' :: OutputGroup -> Maybe [Output]
$sel:outputGroupSettings:OutputGroup' :: OutputGroup -> Maybe OutputGroupSettings
$sel:name:OutputGroup' :: OutputGroup -> Maybe Text
$sel:customName:OutputGroup' :: OutputGroup -> Maybe Text
$sel:automatedEncodingSettings:OutputGroup' :: OutputGroup -> Maybe AutomatedEncodingSettings
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutomatedEncodingSettings
automatedEncodingSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OutputGroupSettings
outputGroupSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Output]
outputs
instance Prelude.NFData OutputGroup where
rnf :: OutputGroup -> ()
rnf OutputGroup' {Maybe [Output]
Maybe Text
Maybe AutomatedEncodingSettings
Maybe OutputGroupSettings
outputs :: Maybe [Output]
outputGroupSettings :: Maybe OutputGroupSettings
name :: Maybe Text
customName :: Maybe Text
automatedEncodingSettings :: Maybe AutomatedEncodingSettings
$sel:outputs:OutputGroup' :: OutputGroup -> Maybe [Output]
$sel:outputGroupSettings:OutputGroup' :: OutputGroup -> Maybe OutputGroupSettings
$sel:name:OutputGroup' :: OutputGroup -> Maybe Text
$sel:customName:OutputGroup' :: OutputGroup -> Maybe Text
$sel:automatedEncodingSettings:OutputGroup' :: OutputGroup -> Maybe AutomatedEncodingSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AutomatedEncodingSettings
automatedEncodingSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OutputGroupSettings
outputGroupSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Output]
outputs
instance Data.ToJSON OutputGroup where
toJSON :: OutputGroup -> Value
toJSON OutputGroup' {Maybe [Output]
Maybe Text
Maybe AutomatedEncodingSettings
Maybe OutputGroupSettings
outputs :: Maybe [Output]
outputGroupSettings :: Maybe OutputGroupSettings
name :: Maybe Text
customName :: Maybe Text
automatedEncodingSettings :: Maybe AutomatedEncodingSettings
$sel:outputs:OutputGroup' :: OutputGroup -> Maybe [Output]
$sel:outputGroupSettings:OutputGroup' :: OutputGroup -> Maybe OutputGroupSettings
$sel:name:OutputGroup' :: OutputGroup -> Maybe Text
$sel:customName:OutputGroup' :: OutputGroup -> Maybe Text
$sel:automatedEncodingSettings:OutputGroup' :: OutputGroup -> Maybe AutomatedEncodingSettings
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"automatedEncodingSettings" 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 AutomatedEncodingSettings
automatedEncodingSettings,
(Key
"customName" 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 Text
customName,
(Key
"name" 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 Text
name,
(Key
"outputGroupSettings" 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 OutputGroupSettings
outputGroupSettings,
(Key
"outputs" 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 [Output]
outputs
]
)