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