{-# 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.RDS.Types.UserAuthConfigInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.AuthScheme
import Amazonka.RDS.Types.IAMAuthMode
data UserAuthConfigInfo = UserAuthConfigInfo'
{
UserAuthConfigInfo -> Maybe IAMAuthMode
iAMAuth :: Prelude.Maybe IAMAuthMode,
UserAuthConfigInfo -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
UserAuthConfigInfo -> Maybe AuthScheme
authScheme :: Prelude.Maybe AuthScheme,
UserAuthConfigInfo -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text,
UserAuthConfigInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (UserAuthConfigInfo -> UserAuthConfigInfo -> Bool
(UserAuthConfigInfo -> UserAuthConfigInfo -> Bool)
-> (UserAuthConfigInfo -> UserAuthConfigInfo -> Bool)
-> Eq UserAuthConfigInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserAuthConfigInfo -> UserAuthConfigInfo -> Bool
$c/= :: UserAuthConfigInfo -> UserAuthConfigInfo -> Bool
== :: UserAuthConfigInfo -> UserAuthConfigInfo -> Bool
$c== :: UserAuthConfigInfo -> UserAuthConfigInfo -> Bool
Prelude.Eq, ReadPrec [UserAuthConfigInfo]
ReadPrec UserAuthConfigInfo
Int -> ReadS UserAuthConfigInfo
ReadS [UserAuthConfigInfo]
(Int -> ReadS UserAuthConfigInfo)
-> ReadS [UserAuthConfigInfo]
-> ReadPrec UserAuthConfigInfo
-> ReadPrec [UserAuthConfigInfo]
-> Read UserAuthConfigInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserAuthConfigInfo]
$creadListPrec :: ReadPrec [UserAuthConfigInfo]
readPrec :: ReadPrec UserAuthConfigInfo
$creadPrec :: ReadPrec UserAuthConfigInfo
readList :: ReadS [UserAuthConfigInfo]
$creadList :: ReadS [UserAuthConfigInfo]
readsPrec :: Int -> ReadS UserAuthConfigInfo
$creadsPrec :: Int -> ReadS UserAuthConfigInfo
Prelude.Read, Int -> UserAuthConfigInfo -> ShowS
[UserAuthConfigInfo] -> ShowS
UserAuthConfigInfo -> String
(Int -> UserAuthConfigInfo -> ShowS)
-> (UserAuthConfigInfo -> String)
-> ([UserAuthConfigInfo] -> ShowS)
-> Show UserAuthConfigInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserAuthConfigInfo] -> ShowS
$cshowList :: [UserAuthConfigInfo] -> ShowS
show :: UserAuthConfigInfo -> String
$cshow :: UserAuthConfigInfo -> String
showsPrec :: Int -> UserAuthConfigInfo -> ShowS
$cshowsPrec :: Int -> UserAuthConfigInfo -> ShowS
Prelude.Show, (forall x. UserAuthConfigInfo -> Rep UserAuthConfigInfo x)
-> (forall x. Rep UserAuthConfigInfo x -> UserAuthConfigInfo)
-> Generic UserAuthConfigInfo
forall x. Rep UserAuthConfigInfo x -> UserAuthConfigInfo
forall x. UserAuthConfigInfo -> Rep UserAuthConfigInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserAuthConfigInfo x -> UserAuthConfigInfo
$cfrom :: forall x. UserAuthConfigInfo -> Rep UserAuthConfigInfo x
Prelude.Generic)
newUserAuthConfigInfo ::
UserAuthConfigInfo
newUserAuthConfigInfo :: UserAuthConfigInfo
newUserAuthConfigInfo =
UserAuthConfigInfo' :: Maybe IAMAuthMode
-> Maybe Text
-> Maybe AuthScheme
-> Maybe Text
-> Maybe Text
-> UserAuthConfigInfo
UserAuthConfigInfo'
{ $sel:iAMAuth:UserAuthConfigInfo' :: Maybe IAMAuthMode
iAMAuth = Maybe IAMAuthMode
forall a. Maybe a
Prelude.Nothing,
$sel:userName:UserAuthConfigInfo' :: Maybe Text
userName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authScheme:UserAuthConfigInfo' :: Maybe AuthScheme
authScheme = Maybe AuthScheme
forall a. Maybe a
Prelude.Nothing,
$sel:secretArn:UserAuthConfigInfo' :: Maybe Text
secretArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UserAuthConfigInfo' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
userAuthConfigInfo_iAMAuth :: Lens.Lens' UserAuthConfigInfo (Prelude.Maybe IAMAuthMode)
userAuthConfigInfo_iAMAuth :: (Maybe IAMAuthMode -> f (Maybe IAMAuthMode))
-> UserAuthConfigInfo -> f UserAuthConfigInfo
userAuthConfigInfo_iAMAuth = (UserAuthConfigInfo -> Maybe IAMAuthMode)
-> (UserAuthConfigInfo -> Maybe IAMAuthMode -> UserAuthConfigInfo)
-> Lens
UserAuthConfigInfo
UserAuthConfigInfo
(Maybe IAMAuthMode)
(Maybe IAMAuthMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAuthConfigInfo' {Maybe IAMAuthMode
iAMAuth :: Maybe IAMAuthMode
$sel:iAMAuth:UserAuthConfigInfo' :: UserAuthConfigInfo -> Maybe IAMAuthMode
iAMAuth} -> Maybe IAMAuthMode
iAMAuth) (\s :: UserAuthConfigInfo
s@UserAuthConfigInfo' {} Maybe IAMAuthMode
a -> UserAuthConfigInfo
s {$sel:iAMAuth:UserAuthConfigInfo' :: Maybe IAMAuthMode
iAMAuth = Maybe IAMAuthMode
a} :: UserAuthConfigInfo)
userAuthConfigInfo_userName :: Lens.Lens' UserAuthConfigInfo (Prelude.Maybe Prelude.Text)
userAuthConfigInfo_userName :: (Maybe Text -> f (Maybe Text))
-> UserAuthConfigInfo -> f UserAuthConfigInfo
userAuthConfigInfo_userName = (UserAuthConfigInfo -> Maybe Text)
-> (UserAuthConfigInfo -> Maybe Text -> UserAuthConfigInfo)
-> Lens
UserAuthConfigInfo UserAuthConfigInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAuthConfigInfo' {Maybe Text
userName :: Maybe Text
$sel:userName:UserAuthConfigInfo' :: UserAuthConfigInfo -> Maybe Text
userName} -> Maybe Text
userName) (\s :: UserAuthConfigInfo
s@UserAuthConfigInfo' {} Maybe Text
a -> UserAuthConfigInfo
s {$sel:userName:UserAuthConfigInfo' :: Maybe Text
userName = Maybe Text
a} :: UserAuthConfigInfo)
userAuthConfigInfo_authScheme :: Lens.Lens' UserAuthConfigInfo (Prelude.Maybe AuthScheme)
userAuthConfigInfo_authScheme :: (Maybe AuthScheme -> f (Maybe AuthScheme))
-> UserAuthConfigInfo -> f UserAuthConfigInfo
userAuthConfigInfo_authScheme = (UserAuthConfigInfo -> Maybe AuthScheme)
-> (UserAuthConfigInfo -> Maybe AuthScheme -> UserAuthConfigInfo)
-> Lens
UserAuthConfigInfo
UserAuthConfigInfo
(Maybe AuthScheme)
(Maybe AuthScheme)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAuthConfigInfo' {Maybe AuthScheme
authScheme :: Maybe AuthScheme
$sel:authScheme:UserAuthConfigInfo' :: UserAuthConfigInfo -> Maybe AuthScheme
authScheme} -> Maybe AuthScheme
authScheme) (\s :: UserAuthConfigInfo
s@UserAuthConfigInfo' {} Maybe AuthScheme
a -> UserAuthConfigInfo
s {$sel:authScheme:UserAuthConfigInfo' :: Maybe AuthScheme
authScheme = Maybe AuthScheme
a} :: UserAuthConfigInfo)
userAuthConfigInfo_secretArn :: Lens.Lens' UserAuthConfigInfo (Prelude.Maybe Prelude.Text)
userAuthConfigInfo_secretArn :: (Maybe Text -> f (Maybe Text))
-> UserAuthConfigInfo -> f UserAuthConfigInfo
userAuthConfigInfo_secretArn = (UserAuthConfigInfo -> Maybe Text)
-> (UserAuthConfigInfo -> Maybe Text -> UserAuthConfigInfo)
-> Lens
UserAuthConfigInfo UserAuthConfigInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAuthConfigInfo' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:UserAuthConfigInfo' :: UserAuthConfigInfo -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: UserAuthConfigInfo
s@UserAuthConfigInfo' {} Maybe Text
a -> UserAuthConfigInfo
s {$sel:secretArn:UserAuthConfigInfo' :: Maybe Text
secretArn = Maybe Text
a} :: UserAuthConfigInfo)
userAuthConfigInfo_description :: Lens.Lens' UserAuthConfigInfo (Prelude.Maybe Prelude.Text)
userAuthConfigInfo_description :: (Maybe Text -> f (Maybe Text))
-> UserAuthConfigInfo -> f UserAuthConfigInfo
userAuthConfigInfo_description = (UserAuthConfigInfo -> Maybe Text)
-> (UserAuthConfigInfo -> Maybe Text -> UserAuthConfigInfo)
-> Lens
UserAuthConfigInfo UserAuthConfigInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAuthConfigInfo' {Maybe Text
description :: Maybe Text
$sel:description:UserAuthConfigInfo' :: UserAuthConfigInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: UserAuthConfigInfo
s@UserAuthConfigInfo' {} Maybe Text
a -> UserAuthConfigInfo
s {$sel:description:UserAuthConfigInfo' :: Maybe Text
description = Maybe Text
a} :: UserAuthConfigInfo)
instance Core.FromXML UserAuthConfigInfo where
parseXML :: [Node] -> Either String UserAuthConfigInfo
parseXML [Node]
x =
Maybe IAMAuthMode
-> Maybe Text
-> Maybe AuthScheme
-> Maybe Text
-> Maybe Text
-> UserAuthConfigInfo
UserAuthConfigInfo'
(Maybe IAMAuthMode
-> Maybe Text
-> Maybe AuthScheme
-> Maybe Text
-> Maybe Text
-> UserAuthConfigInfo)
-> Either String (Maybe IAMAuthMode)
-> Either
String
(Maybe Text
-> Maybe AuthScheme
-> Maybe Text
-> Maybe Text
-> UserAuthConfigInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe IAMAuthMode)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IAMAuth")
Either
String
(Maybe Text
-> Maybe AuthScheme
-> Maybe Text
-> Maybe Text
-> UserAuthConfigInfo)
-> Either String (Maybe Text)
-> Either
String
(Maybe AuthScheme
-> Maybe Text -> Maybe Text -> UserAuthConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UserName")
Either
String
(Maybe AuthScheme
-> Maybe Text -> Maybe Text -> UserAuthConfigInfo)
-> Either String (Maybe AuthScheme)
-> Either String (Maybe Text -> Maybe Text -> UserAuthConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AuthScheme)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AuthScheme")
Either String (Maybe Text -> Maybe Text -> UserAuthConfigInfo)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> UserAuthConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SecretArn")
Either String (Maybe Text -> UserAuthConfigInfo)
-> Either String (Maybe Text) -> Either String UserAuthConfigInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Description")
instance Prelude.Hashable UserAuthConfigInfo
instance Prelude.NFData UserAuthConfigInfo