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