{-# 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.MediaConnect.Types.MediaStreamOutputConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.DestinationConfiguration
import Amazonka.MediaConnect.Types.EncodingName
import Amazonka.MediaConnect.Types.EncodingParameters
import qualified Amazonka.Prelude as Prelude
data MediaStreamOutputConfiguration = MediaStreamOutputConfiguration'
{
MediaStreamOutputConfiguration -> Maybe [DestinationConfiguration]
destinationConfigurations :: Prelude.Maybe [DestinationConfiguration],
MediaStreamOutputConfiguration -> Maybe EncodingParameters
encodingParameters :: Prelude.Maybe EncodingParameters,
MediaStreamOutputConfiguration -> Text
mediaStreamName :: Prelude.Text,
MediaStreamOutputConfiguration -> EncodingName
encodingName :: EncodingName
}
deriving (MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool
(MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool)
-> (MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool)
-> Eq MediaStreamOutputConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool
$c/= :: MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool
== :: MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool
$c== :: MediaStreamOutputConfiguration
-> MediaStreamOutputConfiguration -> Bool
Prelude.Eq, ReadPrec [MediaStreamOutputConfiguration]
ReadPrec MediaStreamOutputConfiguration
Int -> ReadS MediaStreamOutputConfiguration
ReadS [MediaStreamOutputConfiguration]
(Int -> ReadS MediaStreamOutputConfiguration)
-> ReadS [MediaStreamOutputConfiguration]
-> ReadPrec MediaStreamOutputConfiguration
-> ReadPrec [MediaStreamOutputConfiguration]
-> Read MediaStreamOutputConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MediaStreamOutputConfiguration]
$creadListPrec :: ReadPrec [MediaStreamOutputConfiguration]
readPrec :: ReadPrec MediaStreamOutputConfiguration
$creadPrec :: ReadPrec MediaStreamOutputConfiguration
readList :: ReadS [MediaStreamOutputConfiguration]
$creadList :: ReadS [MediaStreamOutputConfiguration]
readsPrec :: Int -> ReadS MediaStreamOutputConfiguration
$creadsPrec :: Int -> ReadS MediaStreamOutputConfiguration
Prelude.Read, Int -> MediaStreamOutputConfiguration -> ShowS
[MediaStreamOutputConfiguration] -> ShowS
MediaStreamOutputConfiguration -> String
(Int -> MediaStreamOutputConfiguration -> ShowS)
-> (MediaStreamOutputConfiguration -> String)
-> ([MediaStreamOutputConfiguration] -> ShowS)
-> Show MediaStreamOutputConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MediaStreamOutputConfiguration] -> ShowS
$cshowList :: [MediaStreamOutputConfiguration] -> ShowS
show :: MediaStreamOutputConfiguration -> String
$cshow :: MediaStreamOutputConfiguration -> String
showsPrec :: Int -> MediaStreamOutputConfiguration -> ShowS
$cshowsPrec :: Int -> MediaStreamOutputConfiguration -> ShowS
Prelude.Show, (forall x.
MediaStreamOutputConfiguration
-> Rep MediaStreamOutputConfiguration x)
-> (forall x.
Rep MediaStreamOutputConfiguration x
-> MediaStreamOutputConfiguration)
-> Generic MediaStreamOutputConfiguration
forall x.
Rep MediaStreamOutputConfiguration x
-> MediaStreamOutputConfiguration
forall x.
MediaStreamOutputConfiguration
-> Rep MediaStreamOutputConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MediaStreamOutputConfiguration x
-> MediaStreamOutputConfiguration
$cfrom :: forall x.
MediaStreamOutputConfiguration
-> Rep MediaStreamOutputConfiguration x
Prelude.Generic)
newMediaStreamOutputConfiguration ::
Prelude.Text ->
EncodingName ->
MediaStreamOutputConfiguration
newMediaStreamOutputConfiguration :: Text -> EncodingName -> MediaStreamOutputConfiguration
newMediaStreamOutputConfiguration
Text
pMediaStreamName_
EncodingName
pEncodingName_ =
MediaStreamOutputConfiguration' :: Maybe [DestinationConfiguration]
-> Maybe EncodingParameters
-> Text
-> EncodingName
-> MediaStreamOutputConfiguration
MediaStreamOutputConfiguration'
{ $sel:destinationConfigurations:MediaStreamOutputConfiguration' :: Maybe [DestinationConfiguration]
destinationConfigurations =
Maybe [DestinationConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:encodingParameters:MediaStreamOutputConfiguration' :: Maybe EncodingParameters
encodingParameters = Maybe EncodingParameters
forall a. Maybe a
Prelude.Nothing,
$sel:mediaStreamName:MediaStreamOutputConfiguration' :: Text
mediaStreamName = Text
pMediaStreamName_,
$sel:encodingName:MediaStreamOutputConfiguration' :: EncodingName
encodingName = EncodingName
pEncodingName_
}
mediaStreamOutputConfiguration_destinationConfigurations :: Lens.Lens' MediaStreamOutputConfiguration (Prelude.Maybe [DestinationConfiguration])
mediaStreamOutputConfiguration_destinationConfigurations :: (Maybe [DestinationConfiguration]
-> f (Maybe [DestinationConfiguration]))
-> MediaStreamOutputConfiguration
-> f MediaStreamOutputConfiguration
mediaStreamOutputConfiguration_destinationConfigurations = (MediaStreamOutputConfiguration
-> Maybe [DestinationConfiguration])
-> (MediaStreamOutputConfiguration
-> Maybe [DestinationConfiguration]
-> MediaStreamOutputConfiguration)
-> Lens
MediaStreamOutputConfiguration
MediaStreamOutputConfiguration
(Maybe [DestinationConfiguration])
(Maybe [DestinationConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfiguration' {Maybe [DestinationConfiguration]
destinationConfigurations :: Maybe [DestinationConfiguration]
$sel:destinationConfigurations:MediaStreamOutputConfiguration' :: MediaStreamOutputConfiguration -> Maybe [DestinationConfiguration]
destinationConfigurations} -> Maybe [DestinationConfiguration]
destinationConfigurations) (\s :: MediaStreamOutputConfiguration
s@MediaStreamOutputConfiguration' {} Maybe [DestinationConfiguration]
a -> MediaStreamOutputConfiguration
s {$sel:destinationConfigurations:MediaStreamOutputConfiguration' :: Maybe [DestinationConfiguration]
destinationConfigurations = Maybe [DestinationConfiguration]
a} :: MediaStreamOutputConfiguration) ((Maybe [DestinationConfiguration]
-> f (Maybe [DestinationConfiguration]))
-> MediaStreamOutputConfiguration
-> f MediaStreamOutputConfiguration)
-> ((Maybe [DestinationConfiguration]
-> f (Maybe [DestinationConfiguration]))
-> Maybe [DestinationConfiguration]
-> f (Maybe [DestinationConfiguration]))
-> (Maybe [DestinationConfiguration]
-> f (Maybe [DestinationConfiguration]))
-> MediaStreamOutputConfiguration
-> f MediaStreamOutputConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DestinationConfiguration]
[DestinationConfiguration]
[DestinationConfiguration]
[DestinationConfiguration]
-> Iso
(Maybe [DestinationConfiguration])
(Maybe [DestinationConfiguration])
(Maybe [DestinationConfiguration])
(Maybe [DestinationConfiguration])
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
[DestinationConfiguration]
[DestinationConfiguration]
[DestinationConfiguration]
[DestinationConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
mediaStreamOutputConfiguration_encodingParameters :: Lens.Lens' MediaStreamOutputConfiguration (Prelude.Maybe EncodingParameters)
mediaStreamOutputConfiguration_encodingParameters :: (Maybe EncodingParameters -> f (Maybe EncodingParameters))
-> MediaStreamOutputConfiguration
-> f MediaStreamOutputConfiguration
mediaStreamOutputConfiguration_encodingParameters = (MediaStreamOutputConfiguration -> Maybe EncodingParameters)
-> (MediaStreamOutputConfiguration
-> Maybe EncodingParameters -> MediaStreamOutputConfiguration)
-> Lens
MediaStreamOutputConfiguration
MediaStreamOutputConfiguration
(Maybe EncodingParameters)
(Maybe EncodingParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfiguration' {Maybe EncodingParameters
encodingParameters :: Maybe EncodingParameters
$sel:encodingParameters:MediaStreamOutputConfiguration' :: MediaStreamOutputConfiguration -> Maybe EncodingParameters
encodingParameters} -> Maybe EncodingParameters
encodingParameters) (\s :: MediaStreamOutputConfiguration
s@MediaStreamOutputConfiguration' {} Maybe EncodingParameters
a -> MediaStreamOutputConfiguration
s {$sel:encodingParameters:MediaStreamOutputConfiguration' :: Maybe EncodingParameters
encodingParameters = Maybe EncodingParameters
a} :: MediaStreamOutputConfiguration)
mediaStreamOutputConfiguration_mediaStreamName :: Lens.Lens' MediaStreamOutputConfiguration Prelude.Text
mediaStreamOutputConfiguration_mediaStreamName :: (Text -> f Text)
-> MediaStreamOutputConfiguration
-> f MediaStreamOutputConfiguration
mediaStreamOutputConfiguration_mediaStreamName = (MediaStreamOutputConfiguration -> Text)
-> (MediaStreamOutputConfiguration
-> Text -> MediaStreamOutputConfiguration)
-> Lens
MediaStreamOutputConfiguration
MediaStreamOutputConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfiguration' {Text
mediaStreamName :: Text
$sel:mediaStreamName:MediaStreamOutputConfiguration' :: MediaStreamOutputConfiguration -> Text
mediaStreamName} -> Text
mediaStreamName) (\s :: MediaStreamOutputConfiguration
s@MediaStreamOutputConfiguration' {} Text
a -> MediaStreamOutputConfiguration
s {$sel:mediaStreamName:MediaStreamOutputConfiguration' :: Text
mediaStreamName = Text
a} :: MediaStreamOutputConfiguration)
mediaStreamOutputConfiguration_encodingName :: Lens.Lens' MediaStreamOutputConfiguration EncodingName
mediaStreamOutputConfiguration_encodingName :: (EncodingName -> f EncodingName)
-> MediaStreamOutputConfiguration
-> f MediaStreamOutputConfiguration
mediaStreamOutputConfiguration_encodingName = (MediaStreamOutputConfiguration -> EncodingName)
-> (MediaStreamOutputConfiguration
-> EncodingName -> MediaStreamOutputConfiguration)
-> Lens
MediaStreamOutputConfiguration
MediaStreamOutputConfiguration
EncodingName
EncodingName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfiguration' {EncodingName
encodingName :: EncodingName
$sel:encodingName:MediaStreamOutputConfiguration' :: MediaStreamOutputConfiguration -> EncodingName
encodingName} -> EncodingName
encodingName) (\s :: MediaStreamOutputConfiguration
s@MediaStreamOutputConfiguration' {} EncodingName
a -> MediaStreamOutputConfiguration
s {$sel:encodingName:MediaStreamOutputConfiguration' :: EncodingName
encodingName = EncodingName
a} :: MediaStreamOutputConfiguration)
instance Core.FromJSON MediaStreamOutputConfiguration where
parseJSON :: Value -> Parser MediaStreamOutputConfiguration
parseJSON =
String
-> (Object -> Parser MediaStreamOutputConfiguration)
-> Value
-> Parser MediaStreamOutputConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MediaStreamOutputConfiguration"
( \Object
x ->
Maybe [DestinationConfiguration]
-> Maybe EncodingParameters
-> Text
-> EncodingName
-> MediaStreamOutputConfiguration
MediaStreamOutputConfiguration'
(Maybe [DestinationConfiguration]
-> Maybe EncodingParameters
-> Text
-> EncodingName
-> MediaStreamOutputConfiguration)
-> Parser (Maybe [DestinationConfiguration])
-> Parser
(Maybe EncodingParameters
-> Text -> EncodingName -> MediaStreamOutputConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [DestinationConfiguration]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinationConfigurations"
Parser (Maybe (Maybe [DestinationConfiguration]))
-> Maybe [DestinationConfiguration]
-> Parser (Maybe [DestinationConfiguration])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [DestinationConfiguration]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe EncodingParameters
-> Text -> EncodingName -> MediaStreamOutputConfiguration)
-> Parser (Maybe EncodingParameters)
-> Parser (Text -> EncodingName -> MediaStreamOutputConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EncodingParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encodingParameters")
Parser (Text -> EncodingName -> MediaStreamOutputConfiguration)
-> Parser Text
-> Parser (EncodingName -> MediaStreamOutputConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"mediaStreamName")
Parser (EncodingName -> MediaStreamOutputConfiguration)
-> Parser EncodingName -> Parser MediaStreamOutputConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EncodingName
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"encodingName")
)
instance
Prelude.Hashable
MediaStreamOutputConfiguration
instance
Prelude.NFData
MediaStreamOutputConfiguration