{-# 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.ConnectionBasicAuthResponseParameters 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 ConnectionBasicAuthResponseParameters = ConnectionBasicAuthResponseParameters'
{
ConnectionBasicAuthResponseParameters -> Maybe Text
username :: Prelude.Maybe Prelude.Text
}
deriving (ConnectionBasicAuthResponseParameters
-> ConnectionBasicAuthResponseParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionBasicAuthResponseParameters
-> ConnectionBasicAuthResponseParameters -> Bool
$c/= :: ConnectionBasicAuthResponseParameters
-> ConnectionBasicAuthResponseParameters -> Bool
== :: ConnectionBasicAuthResponseParameters
-> ConnectionBasicAuthResponseParameters -> Bool
$c== :: ConnectionBasicAuthResponseParameters
-> ConnectionBasicAuthResponseParameters -> Bool
Prelude.Eq, ReadPrec [ConnectionBasicAuthResponseParameters]
ReadPrec ConnectionBasicAuthResponseParameters
Int -> ReadS ConnectionBasicAuthResponseParameters
ReadS [ConnectionBasicAuthResponseParameters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionBasicAuthResponseParameters]
$creadListPrec :: ReadPrec [ConnectionBasicAuthResponseParameters]
readPrec :: ReadPrec ConnectionBasicAuthResponseParameters
$creadPrec :: ReadPrec ConnectionBasicAuthResponseParameters
readList :: ReadS [ConnectionBasicAuthResponseParameters]
$creadList :: ReadS [ConnectionBasicAuthResponseParameters]
readsPrec :: Int -> ReadS ConnectionBasicAuthResponseParameters
$creadsPrec :: Int -> ReadS ConnectionBasicAuthResponseParameters
Prelude.Read, Int -> ConnectionBasicAuthResponseParameters -> ShowS
[ConnectionBasicAuthResponseParameters] -> ShowS
ConnectionBasicAuthResponseParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionBasicAuthResponseParameters] -> ShowS
$cshowList :: [ConnectionBasicAuthResponseParameters] -> ShowS
show :: ConnectionBasicAuthResponseParameters -> String
$cshow :: ConnectionBasicAuthResponseParameters -> String
showsPrec :: Int -> ConnectionBasicAuthResponseParameters -> ShowS
$cshowsPrec :: Int -> ConnectionBasicAuthResponseParameters -> ShowS
Prelude.Show, forall x.
Rep ConnectionBasicAuthResponseParameters x
-> ConnectionBasicAuthResponseParameters
forall x.
ConnectionBasicAuthResponseParameters
-> Rep ConnectionBasicAuthResponseParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConnectionBasicAuthResponseParameters x
-> ConnectionBasicAuthResponseParameters
$cfrom :: forall x.
ConnectionBasicAuthResponseParameters
-> Rep ConnectionBasicAuthResponseParameters x
Prelude.Generic)
newConnectionBasicAuthResponseParameters ::
ConnectionBasicAuthResponseParameters
newConnectionBasicAuthResponseParameters :: ConnectionBasicAuthResponseParameters
newConnectionBasicAuthResponseParameters =
ConnectionBasicAuthResponseParameters'
{ $sel:username:ConnectionBasicAuthResponseParameters' :: Maybe Text
username =
forall a. Maybe a
Prelude.Nothing
}
connectionBasicAuthResponseParameters_username :: Lens.Lens' ConnectionBasicAuthResponseParameters (Prelude.Maybe Prelude.Text)
connectionBasicAuthResponseParameters_username :: Lens' ConnectionBasicAuthResponseParameters (Maybe Text)
connectionBasicAuthResponseParameters_username = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionBasicAuthResponseParameters' {Maybe Text
username :: Maybe Text
$sel:username:ConnectionBasicAuthResponseParameters' :: ConnectionBasicAuthResponseParameters -> Maybe Text
username} -> Maybe Text
username) (\s :: ConnectionBasicAuthResponseParameters
s@ConnectionBasicAuthResponseParameters' {} Maybe Text
a -> ConnectionBasicAuthResponseParameters
s {$sel:username:ConnectionBasicAuthResponseParameters' :: Maybe Text
username = Maybe Text
a} :: ConnectionBasicAuthResponseParameters)
instance
Data.FromJSON
ConnectionBasicAuthResponseParameters
where
parseJSON :: Value -> Parser ConnectionBasicAuthResponseParameters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConnectionBasicAuthResponseParameters"
( \Object
x ->
Maybe Text -> ConnectionBasicAuthResponseParameters
ConnectionBasicAuthResponseParameters'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Username")
)
instance
Prelude.Hashable
ConnectionBasicAuthResponseParameters
where
hashWithSalt :: Int -> ConnectionBasicAuthResponseParameters -> Int
hashWithSalt
Int
_salt
ConnectionBasicAuthResponseParameters' {Maybe Text
username :: Maybe Text
$sel:username:ConnectionBasicAuthResponseParameters' :: ConnectionBasicAuthResponseParameters -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username
instance
Prelude.NFData
ConnectionBasicAuthResponseParameters
where
rnf :: ConnectionBasicAuthResponseParameters -> ()
rnf ConnectionBasicAuthResponseParameters' {Maybe Text
username :: Maybe Text
$sel:username:ConnectionBasicAuthResponseParameters' :: ConnectionBasicAuthResponseParameters -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username