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