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