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