{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data InputSourceRequest = InputSourceRequest'
{
InputSourceRequest -> Maybe Text
passwordParam :: Prelude.Maybe Prelude.Text,
InputSourceRequest -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
InputSourceRequest -> Maybe Text
username :: Prelude.Maybe Prelude.Text
}
deriving (InputSourceRequest -> InputSourceRequest -> Bool
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]
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
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. 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'
{ $sel:passwordParam:InputSourceRequest' :: Maybe Text
passwordParam =
forall a. Maybe a
Prelude.Nothing,
$sel:url:InputSourceRequest' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing,
$sel:username:InputSourceRequest' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
}
inputSourceRequest_passwordParam :: Lens.Lens' InputSourceRequest (Prelude.Maybe Prelude.Text)
inputSourceRequest_passwordParam :: Lens' InputSourceRequest (Maybe Text)
inputSourceRequest_passwordParam = 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)
inputSourceRequest_url :: Lens.Lens' InputSourceRequest (Prelude.Maybe Prelude.Text)
inputSourceRequest_url :: Lens' InputSourceRequest (Maybe Text)
inputSourceRequest_url = 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 :: Lens' InputSourceRequest (Maybe Text)
inputSourceRequest_username = 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)
instance Prelude.Hashable InputSourceRequest where
hashWithSalt :: Int -> InputSourceRequest -> Int
hashWithSalt Int
_salt InputSourceRequest' {Maybe Text
username :: Maybe Text
url :: Maybe Text
passwordParam :: Maybe Text
$sel:username:InputSourceRequest' :: InputSourceRequest -> Maybe Text
$sel:url:InputSourceRequest' :: InputSourceRequest -> Maybe Text
$sel:passwordParam:InputSourceRequest' :: InputSourceRequest -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
passwordParam
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username
instance Prelude.NFData InputSourceRequest where
rnf :: InputSourceRequest -> ()
rnf InputSourceRequest' {Maybe Text
username :: Maybe Text
url :: Maybe Text
passwordParam :: Maybe Text
$sel:username:InputSourceRequest' :: InputSourceRequest -> Maybe Text
$sel:url:InputSourceRequest' :: InputSourceRequest -> Maybe Text
$sel:passwordParam:InputSourceRequest' :: InputSourceRequest -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
passwordParam
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username
instance Data.ToJSON InputSourceRequest where
toJSON :: InputSourceRequest -> Value
toJSON InputSourceRequest' {Maybe Text
username :: Maybe Text
url :: Maybe Text
passwordParam :: Maybe Text
$sel:username:InputSourceRequest' :: InputSourceRequest -> Maybe Text
$sel:url:InputSourceRequest' :: InputSourceRequest -> Maybe Text
$sel:passwordParam:InputSourceRequest' :: InputSourceRequest -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"passwordParam" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
passwordParam,
(Key
"url" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
url,
(Key
"username" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
username
]
)