{-# 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.MediaStreamOutputConfigurationRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.DestinationConfigurationRequest
import Amazonka.MediaConnect.Types.EncodingName
import Amazonka.MediaConnect.Types.EncodingParametersRequest
import qualified Amazonka.Prelude as Prelude
data MediaStreamOutputConfigurationRequest = MediaStreamOutputConfigurationRequest'
{
MediaStreamOutputConfigurationRequest
-> Maybe [DestinationConfigurationRequest]
destinationConfigurations :: Prelude.Maybe [DestinationConfigurationRequest],
MediaStreamOutputConfigurationRequest
-> Maybe EncodingParametersRequest
encodingParameters :: Prelude.Maybe EncodingParametersRequest,
MediaStreamOutputConfigurationRequest -> Text
mediaStreamName :: Prelude.Text,
MediaStreamOutputConfigurationRequest -> EncodingName
encodingName :: EncodingName
}
deriving (MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool
(MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool)
-> (MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool)
-> Eq MediaStreamOutputConfigurationRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool
$c/= :: MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool
== :: MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool
$c== :: MediaStreamOutputConfigurationRequest
-> MediaStreamOutputConfigurationRequest -> Bool
Prelude.Eq, ReadPrec [MediaStreamOutputConfigurationRequest]
ReadPrec MediaStreamOutputConfigurationRequest
Int -> ReadS MediaStreamOutputConfigurationRequest
ReadS [MediaStreamOutputConfigurationRequest]
(Int -> ReadS MediaStreamOutputConfigurationRequest)
-> ReadS [MediaStreamOutputConfigurationRequest]
-> ReadPrec MediaStreamOutputConfigurationRequest
-> ReadPrec [MediaStreamOutputConfigurationRequest]
-> Read MediaStreamOutputConfigurationRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MediaStreamOutputConfigurationRequest]
$creadListPrec :: ReadPrec [MediaStreamOutputConfigurationRequest]
readPrec :: ReadPrec MediaStreamOutputConfigurationRequest
$creadPrec :: ReadPrec MediaStreamOutputConfigurationRequest
readList :: ReadS [MediaStreamOutputConfigurationRequest]
$creadList :: ReadS [MediaStreamOutputConfigurationRequest]
readsPrec :: Int -> ReadS MediaStreamOutputConfigurationRequest
$creadsPrec :: Int -> ReadS MediaStreamOutputConfigurationRequest
Prelude.Read, Int -> MediaStreamOutputConfigurationRequest -> ShowS
[MediaStreamOutputConfigurationRequest] -> ShowS
MediaStreamOutputConfigurationRequest -> String
(Int -> MediaStreamOutputConfigurationRequest -> ShowS)
-> (MediaStreamOutputConfigurationRequest -> String)
-> ([MediaStreamOutputConfigurationRequest] -> ShowS)
-> Show MediaStreamOutputConfigurationRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MediaStreamOutputConfigurationRequest] -> ShowS
$cshowList :: [MediaStreamOutputConfigurationRequest] -> ShowS
show :: MediaStreamOutputConfigurationRequest -> String
$cshow :: MediaStreamOutputConfigurationRequest -> String
showsPrec :: Int -> MediaStreamOutputConfigurationRequest -> ShowS
$cshowsPrec :: Int -> MediaStreamOutputConfigurationRequest -> ShowS
Prelude.Show, (forall x.
MediaStreamOutputConfigurationRequest
-> Rep MediaStreamOutputConfigurationRequest x)
-> (forall x.
Rep MediaStreamOutputConfigurationRequest x
-> MediaStreamOutputConfigurationRequest)
-> Generic MediaStreamOutputConfigurationRequest
forall x.
Rep MediaStreamOutputConfigurationRequest x
-> MediaStreamOutputConfigurationRequest
forall x.
MediaStreamOutputConfigurationRequest
-> Rep MediaStreamOutputConfigurationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MediaStreamOutputConfigurationRequest x
-> MediaStreamOutputConfigurationRequest
$cfrom :: forall x.
MediaStreamOutputConfigurationRequest
-> Rep MediaStreamOutputConfigurationRequest x
Prelude.Generic)
newMediaStreamOutputConfigurationRequest ::
Prelude.Text ->
EncodingName ->
MediaStreamOutputConfigurationRequest
newMediaStreamOutputConfigurationRequest :: Text -> EncodingName -> MediaStreamOutputConfigurationRequest
newMediaStreamOutputConfigurationRequest
Text
pMediaStreamName_
EncodingName
pEncodingName_ =
MediaStreamOutputConfigurationRequest' :: Maybe [DestinationConfigurationRequest]
-> Maybe EncodingParametersRequest
-> Text
-> EncodingName
-> MediaStreamOutputConfigurationRequest
MediaStreamOutputConfigurationRequest'
{ $sel:destinationConfigurations:MediaStreamOutputConfigurationRequest' :: Maybe [DestinationConfigurationRequest]
destinationConfigurations =
Maybe [DestinationConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
$sel:encodingParameters:MediaStreamOutputConfigurationRequest' :: Maybe EncodingParametersRequest
encodingParameters = Maybe EncodingParametersRequest
forall a. Maybe a
Prelude.Nothing,
$sel:mediaStreamName:MediaStreamOutputConfigurationRequest' :: Text
mediaStreamName = Text
pMediaStreamName_,
$sel:encodingName:MediaStreamOutputConfigurationRequest' :: EncodingName
encodingName = EncodingName
pEncodingName_
}
mediaStreamOutputConfigurationRequest_destinationConfigurations :: Lens.Lens' MediaStreamOutputConfigurationRequest (Prelude.Maybe [DestinationConfigurationRequest])
mediaStreamOutputConfigurationRequest_destinationConfigurations :: (Maybe [DestinationConfigurationRequest]
-> f (Maybe [DestinationConfigurationRequest]))
-> MediaStreamOutputConfigurationRequest
-> f MediaStreamOutputConfigurationRequest
mediaStreamOutputConfigurationRequest_destinationConfigurations = (MediaStreamOutputConfigurationRequest
-> Maybe [DestinationConfigurationRequest])
-> (MediaStreamOutputConfigurationRequest
-> Maybe [DestinationConfigurationRequest]
-> MediaStreamOutputConfigurationRequest)
-> Lens
MediaStreamOutputConfigurationRequest
MediaStreamOutputConfigurationRequest
(Maybe [DestinationConfigurationRequest])
(Maybe [DestinationConfigurationRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfigurationRequest' {Maybe [DestinationConfigurationRequest]
destinationConfigurations :: Maybe [DestinationConfigurationRequest]
$sel:destinationConfigurations:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest
-> Maybe [DestinationConfigurationRequest]
destinationConfigurations} -> Maybe [DestinationConfigurationRequest]
destinationConfigurations) (\s :: MediaStreamOutputConfigurationRequest
s@MediaStreamOutputConfigurationRequest' {} Maybe [DestinationConfigurationRequest]
a -> MediaStreamOutputConfigurationRequest
s {$sel:destinationConfigurations:MediaStreamOutputConfigurationRequest' :: Maybe [DestinationConfigurationRequest]
destinationConfigurations = Maybe [DestinationConfigurationRequest]
a} :: MediaStreamOutputConfigurationRequest) ((Maybe [DestinationConfigurationRequest]
-> f (Maybe [DestinationConfigurationRequest]))
-> MediaStreamOutputConfigurationRequest
-> f MediaStreamOutputConfigurationRequest)
-> ((Maybe [DestinationConfigurationRequest]
-> f (Maybe [DestinationConfigurationRequest]))
-> Maybe [DestinationConfigurationRequest]
-> f (Maybe [DestinationConfigurationRequest]))
-> (Maybe [DestinationConfigurationRequest]
-> f (Maybe [DestinationConfigurationRequest]))
-> MediaStreamOutputConfigurationRequest
-> f MediaStreamOutputConfigurationRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DestinationConfigurationRequest]
[DestinationConfigurationRequest]
[DestinationConfigurationRequest]
[DestinationConfigurationRequest]
-> Iso
(Maybe [DestinationConfigurationRequest])
(Maybe [DestinationConfigurationRequest])
(Maybe [DestinationConfigurationRequest])
(Maybe [DestinationConfigurationRequest])
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
[DestinationConfigurationRequest]
[DestinationConfigurationRequest]
[DestinationConfigurationRequest]
[DestinationConfigurationRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
mediaStreamOutputConfigurationRequest_encodingParameters :: Lens.Lens' MediaStreamOutputConfigurationRequest (Prelude.Maybe EncodingParametersRequest)
mediaStreamOutputConfigurationRequest_encodingParameters :: (Maybe EncodingParametersRequest
-> f (Maybe EncodingParametersRequest))
-> MediaStreamOutputConfigurationRequest
-> f MediaStreamOutputConfigurationRequest
mediaStreamOutputConfigurationRequest_encodingParameters = (MediaStreamOutputConfigurationRequest
-> Maybe EncodingParametersRequest)
-> (MediaStreamOutputConfigurationRequest
-> Maybe EncodingParametersRequest
-> MediaStreamOutputConfigurationRequest)
-> Lens
MediaStreamOutputConfigurationRequest
MediaStreamOutputConfigurationRequest
(Maybe EncodingParametersRequest)
(Maybe EncodingParametersRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfigurationRequest' {Maybe EncodingParametersRequest
encodingParameters :: Maybe EncodingParametersRequest
$sel:encodingParameters:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest
-> Maybe EncodingParametersRequest
encodingParameters} -> Maybe EncodingParametersRequest
encodingParameters) (\s :: MediaStreamOutputConfigurationRequest
s@MediaStreamOutputConfigurationRequest' {} Maybe EncodingParametersRequest
a -> MediaStreamOutputConfigurationRequest
s {$sel:encodingParameters:MediaStreamOutputConfigurationRequest' :: Maybe EncodingParametersRequest
encodingParameters = Maybe EncodingParametersRequest
a} :: MediaStreamOutputConfigurationRequest)
mediaStreamOutputConfigurationRequest_mediaStreamName :: Lens.Lens' MediaStreamOutputConfigurationRequest Prelude.Text
mediaStreamOutputConfigurationRequest_mediaStreamName :: (Text -> f Text)
-> MediaStreamOutputConfigurationRequest
-> f MediaStreamOutputConfigurationRequest
mediaStreamOutputConfigurationRequest_mediaStreamName = (MediaStreamOutputConfigurationRequest -> Text)
-> (MediaStreamOutputConfigurationRequest
-> Text -> MediaStreamOutputConfigurationRequest)
-> Lens
MediaStreamOutputConfigurationRequest
MediaStreamOutputConfigurationRequest
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfigurationRequest' {Text
mediaStreamName :: Text
$sel:mediaStreamName:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest -> Text
mediaStreamName} -> Text
mediaStreamName) (\s :: MediaStreamOutputConfigurationRequest
s@MediaStreamOutputConfigurationRequest' {} Text
a -> MediaStreamOutputConfigurationRequest
s {$sel:mediaStreamName:MediaStreamOutputConfigurationRequest' :: Text
mediaStreamName = Text
a} :: MediaStreamOutputConfigurationRequest)
mediaStreamOutputConfigurationRequest_encodingName :: Lens.Lens' MediaStreamOutputConfigurationRequest EncodingName
mediaStreamOutputConfigurationRequest_encodingName :: (EncodingName -> f EncodingName)
-> MediaStreamOutputConfigurationRequest
-> f MediaStreamOutputConfigurationRequest
mediaStreamOutputConfigurationRequest_encodingName = (MediaStreamOutputConfigurationRequest -> EncodingName)
-> (MediaStreamOutputConfigurationRequest
-> EncodingName -> MediaStreamOutputConfigurationRequest)
-> Lens
MediaStreamOutputConfigurationRequest
MediaStreamOutputConfigurationRequest
EncodingName
EncodingName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaStreamOutputConfigurationRequest' {EncodingName
encodingName :: EncodingName
$sel:encodingName:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest -> EncodingName
encodingName} -> EncodingName
encodingName) (\s :: MediaStreamOutputConfigurationRequest
s@MediaStreamOutputConfigurationRequest' {} EncodingName
a -> MediaStreamOutputConfigurationRequest
s {$sel:encodingName:MediaStreamOutputConfigurationRequest' :: EncodingName
encodingName = EncodingName
a} :: MediaStreamOutputConfigurationRequest)
instance
Prelude.Hashable
MediaStreamOutputConfigurationRequest
instance
Prelude.NFData
MediaStreamOutputConfigurationRequest
instance
Core.ToJSON
MediaStreamOutputConfigurationRequest
where
toJSON :: MediaStreamOutputConfigurationRequest -> Value
toJSON MediaStreamOutputConfigurationRequest' {Maybe [DestinationConfigurationRequest]
Maybe EncodingParametersRequest
Text
EncodingName
encodingName :: EncodingName
mediaStreamName :: Text
encodingParameters :: Maybe EncodingParametersRequest
destinationConfigurations :: Maybe [DestinationConfigurationRequest]
$sel:encodingName:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest -> EncodingName
$sel:mediaStreamName:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest -> Text
$sel:encodingParameters:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest
-> Maybe EncodingParametersRequest
$sel:destinationConfigurations:MediaStreamOutputConfigurationRequest' :: MediaStreamOutputConfigurationRequest
-> Maybe [DestinationConfigurationRequest]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"destinationConfigurations" Text -> [DestinationConfigurationRequest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([DestinationConfigurationRequest] -> Pair)
-> Maybe [DestinationConfigurationRequest] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DestinationConfigurationRequest]
destinationConfigurations,
(Text
"encodingParameters" Text -> EncodingParametersRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EncodingParametersRequest -> Pair)
-> Maybe EncodingParametersRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncodingParametersRequest
encodingParameters,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"mediaStreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
mediaStreamName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"encodingName" Text -> EncodingName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EncodingName
encodingName)
]
)