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