{-# 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.Redshift.Types.AuthenticationProfile where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data AuthenticationProfile = AuthenticationProfile'
{
AuthenticationProfile -> Maybe Text
authenticationProfileName :: Prelude.Maybe Prelude.Text,
AuthenticationProfile -> Maybe Text
authenticationProfileContent :: Prelude.Maybe Prelude.Text
}
deriving (AuthenticationProfile -> AuthenticationProfile -> Bool
(AuthenticationProfile -> AuthenticationProfile -> Bool)
-> (AuthenticationProfile -> AuthenticationProfile -> Bool)
-> Eq AuthenticationProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticationProfile -> AuthenticationProfile -> Bool
$c/= :: AuthenticationProfile -> AuthenticationProfile -> Bool
== :: AuthenticationProfile -> AuthenticationProfile -> Bool
$c== :: AuthenticationProfile -> AuthenticationProfile -> Bool
Prelude.Eq, ReadPrec [AuthenticationProfile]
ReadPrec AuthenticationProfile
Int -> ReadS AuthenticationProfile
ReadS [AuthenticationProfile]
(Int -> ReadS AuthenticationProfile)
-> ReadS [AuthenticationProfile]
-> ReadPrec AuthenticationProfile
-> ReadPrec [AuthenticationProfile]
-> Read AuthenticationProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AuthenticationProfile]
$creadListPrec :: ReadPrec [AuthenticationProfile]
readPrec :: ReadPrec AuthenticationProfile
$creadPrec :: ReadPrec AuthenticationProfile
readList :: ReadS [AuthenticationProfile]
$creadList :: ReadS [AuthenticationProfile]
readsPrec :: Int -> ReadS AuthenticationProfile
$creadsPrec :: Int -> ReadS AuthenticationProfile
Prelude.Read, Int -> AuthenticationProfile -> ShowS
[AuthenticationProfile] -> ShowS
AuthenticationProfile -> String
(Int -> AuthenticationProfile -> ShowS)
-> (AuthenticationProfile -> String)
-> ([AuthenticationProfile] -> ShowS)
-> Show AuthenticationProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticationProfile] -> ShowS
$cshowList :: [AuthenticationProfile] -> ShowS
show :: AuthenticationProfile -> String
$cshow :: AuthenticationProfile -> String
showsPrec :: Int -> AuthenticationProfile -> ShowS
$cshowsPrec :: Int -> AuthenticationProfile -> ShowS
Prelude.Show, (forall x. AuthenticationProfile -> Rep AuthenticationProfile x)
-> (forall x. Rep AuthenticationProfile x -> AuthenticationProfile)
-> Generic AuthenticationProfile
forall x. Rep AuthenticationProfile x -> AuthenticationProfile
forall x. AuthenticationProfile -> Rep AuthenticationProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AuthenticationProfile x -> AuthenticationProfile
$cfrom :: forall x. AuthenticationProfile -> Rep AuthenticationProfile x
Prelude.Generic)
newAuthenticationProfile ::
AuthenticationProfile
newAuthenticationProfile :: AuthenticationProfile
newAuthenticationProfile =
AuthenticationProfile' :: Maybe Text -> Maybe Text -> AuthenticationProfile
AuthenticationProfile'
{ $sel:authenticationProfileName:AuthenticationProfile' :: Maybe Text
authenticationProfileName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authenticationProfileContent:AuthenticationProfile' :: Maybe Text
authenticationProfileContent = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
authenticationProfile_authenticationProfileName :: Lens.Lens' AuthenticationProfile (Prelude.Maybe Prelude.Text)
authenticationProfile_authenticationProfileName :: (Maybe Text -> f (Maybe Text))
-> AuthenticationProfile -> f AuthenticationProfile
authenticationProfile_authenticationProfileName = (AuthenticationProfile -> Maybe Text)
-> (AuthenticationProfile -> Maybe Text -> AuthenticationProfile)
-> Lens
AuthenticationProfile
AuthenticationProfile
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthenticationProfile' {Maybe Text
authenticationProfileName :: Maybe Text
$sel:authenticationProfileName:AuthenticationProfile' :: AuthenticationProfile -> Maybe Text
authenticationProfileName} -> Maybe Text
authenticationProfileName) (\s :: AuthenticationProfile
s@AuthenticationProfile' {} Maybe Text
a -> AuthenticationProfile
s {$sel:authenticationProfileName:AuthenticationProfile' :: Maybe Text
authenticationProfileName = Maybe Text
a} :: AuthenticationProfile)
authenticationProfile_authenticationProfileContent :: Lens.Lens' AuthenticationProfile (Prelude.Maybe Prelude.Text)
authenticationProfile_authenticationProfileContent :: (Maybe Text -> f (Maybe Text))
-> AuthenticationProfile -> f AuthenticationProfile
authenticationProfile_authenticationProfileContent = (AuthenticationProfile -> Maybe Text)
-> (AuthenticationProfile -> Maybe Text -> AuthenticationProfile)
-> Lens
AuthenticationProfile
AuthenticationProfile
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthenticationProfile' {Maybe Text
authenticationProfileContent :: Maybe Text
$sel:authenticationProfileContent:AuthenticationProfile' :: AuthenticationProfile -> Maybe Text
authenticationProfileContent} -> Maybe Text
authenticationProfileContent) (\s :: AuthenticationProfile
s@AuthenticationProfile' {} Maybe Text
a -> AuthenticationProfile
s {$sel:authenticationProfileContent:AuthenticationProfile' :: Maybe Text
authenticationProfileContent = Maybe Text
a} :: AuthenticationProfile)
instance Core.FromXML AuthenticationProfile where
parseXML :: [Node] -> Either String AuthenticationProfile
parseXML [Node]
x =
Maybe Text -> Maybe Text -> AuthenticationProfile
AuthenticationProfile'
(Maybe Text -> Maybe Text -> AuthenticationProfile)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> AuthenticationProfile)
forall (f :: * -> *) a b. Functor 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
"AuthenticationProfileName")
Either String (Maybe Text -> AuthenticationProfile)
-> Either String (Maybe Text)
-> Either String AuthenticationProfile
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
"AuthenticationProfileContent")
instance Prelude.Hashable AuthenticationProfile
instance Prelude.NFData AuthenticationProfile