{-# 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.AppFlow.Types.SAPODataConnectorProfileCredentials where
import Amazonka.AppFlow.Types.BasicAuthCredentials
import Amazonka.AppFlow.Types.OAuthCredentials
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SAPODataConnectorProfileCredentials = SAPODataConnectorProfileCredentials'
{
SAPODataConnectorProfileCredentials -> Maybe OAuthCredentials
oAuthCredentials :: Prelude.Maybe OAuthCredentials,
SAPODataConnectorProfileCredentials -> Maybe BasicAuthCredentials
basicAuthCredentials :: Prelude.Maybe BasicAuthCredentials
}
deriving (SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool
(SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool)
-> (SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool)
-> Eq SAPODataConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool
$c/= :: SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool
== :: SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool
$c== :: SAPODataConnectorProfileCredentials
-> SAPODataConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> SAPODataConnectorProfileCredentials -> ShowS
[SAPODataConnectorProfileCredentials] -> ShowS
SAPODataConnectorProfileCredentials -> String
(Int -> SAPODataConnectorProfileCredentials -> ShowS)
-> (SAPODataConnectorProfileCredentials -> String)
-> ([SAPODataConnectorProfileCredentials] -> ShowS)
-> Show SAPODataConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SAPODataConnectorProfileCredentials] -> ShowS
$cshowList :: [SAPODataConnectorProfileCredentials] -> ShowS
show :: SAPODataConnectorProfileCredentials -> String
$cshow :: SAPODataConnectorProfileCredentials -> String
showsPrec :: Int -> SAPODataConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> SAPODataConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
SAPODataConnectorProfileCredentials
-> Rep SAPODataConnectorProfileCredentials x)
-> (forall x.
Rep SAPODataConnectorProfileCredentials x
-> SAPODataConnectorProfileCredentials)
-> Generic SAPODataConnectorProfileCredentials
forall x.
Rep SAPODataConnectorProfileCredentials x
-> SAPODataConnectorProfileCredentials
forall x.
SAPODataConnectorProfileCredentials
-> Rep SAPODataConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SAPODataConnectorProfileCredentials x
-> SAPODataConnectorProfileCredentials
$cfrom :: forall x.
SAPODataConnectorProfileCredentials
-> Rep SAPODataConnectorProfileCredentials x
Prelude.Generic)
newSAPODataConnectorProfileCredentials ::
SAPODataConnectorProfileCredentials
newSAPODataConnectorProfileCredentials :: SAPODataConnectorProfileCredentials
newSAPODataConnectorProfileCredentials =
SAPODataConnectorProfileCredentials' :: Maybe OAuthCredentials
-> Maybe BasicAuthCredentials
-> SAPODataConnectorProfileCredentials
SAPODataConnectorProfileCredentials'
{ $sel:oAuthCredentials:SAPODataConnectorProfileCredentials' :: Maybe OAuthCredentials
oAuthCredentials =
Maybe OAuthCredentials
forall a. Maybe a
Prelude.Nothing,
$sel:basicAuthCredentials:SAPODataConnectorProfileCredentials' :: Maybe BasicAuthCredentials
basicAuthCredentials = Maybe BasicAuthCredentials
forall a. Maybe a
Prelude.Nothing
}
sAPODataConnectorProfileCredentials_oAuthCredentials :: Lens.Lens' SAPODataConnectorProfileCredentials (Prelude.Maybe OAuthCredentials)
sAPODataConnectorProfileCredentials_oAuthCredentials :: (Maybe OAuthCredentials -> f (Maybe OAuthCredentials))
-> SAPODataConnectorProfileCredentials
-> f SAPODataConnectorProfileCredentials
sAPODataConnectorProfileCredentials_oAuthCredentials = (SAPODataConnectorProfileCredentials -> Maybe OAuthCredentials)
-> (SAPODataConnectorProfileCredentials
-> Maybe OAuthCredentials -> SAPODataConnectorProfileCredentials)
-> Lens
SAPODataConnectorProfileCredentials
SAPODataConnectorProfileCredentials
(Maybe OAuthCredentials)
(Maybe OAuthCredentials)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAPODataConnectorProfileCredentials' {Maybe OAuthCredentials
oAuthCredentials :: Maybe OAuthCredentials
$sel:oAuthCredentials:SAPODataConnectorProfileCredentials' :: SAPODataConnectorProfileCredentials -> Maybe OAuthCredentials
oAuthCredentials} -> Maybe OAuthCredentials
oAuthCredentials) (\s :: SAPODataConnectorProfileCredentials
s@SAPODataConnectorProfileCredentials' {} Maybe OAuthCredentials
a -> SAPODataConnectorProfileCredentials
s {$sel:oAuthCredentials:SAPODataConnectorProfileCredentials' :: Maybe OAuthCredentials
oAuthCredentials = Maybe OAuthCredentials
a} :: SAPODataConnectorProfileCredentials)
sAPODataConnectorProfileCredentials_basicAuthCredentials :: Lens.Lens' SAPODataConnectorProfileCredentials (Prelude.Maybe BasicAuthCredentials)
sAPODataConnectorProfileCredentials_basicAuthCredentials :: (Maybe BasicAuthCredentials -> f (Maybe BasicAuthCredentials))
-> SAPODataConnectorProfileCredentials
-> f SAPODataConnectorProfileCredentials
sAPODataConnectorProfileCredentials_basicAuthCredentials = (SAPODataConnectorProfileCredentials -> Maybe BasicAuthCredentials)
-> (SAPODataConnectorProfileCredentials
-> Maybe BasicAuthCredentials
-> SAPODataConnectorProfileCredentials)
-> Lens
SAPODataConnectorProfileCredentials
SAPODataConnectorProfileCredentials
(Maybe BasicAuthCredentials)
(Maybe BasicAuthCredentials)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SAPODataConnectorProfileCredentials' {Maybe BasicAuthCredentials
basicAuthCredentials :: Maybe BasicAuthCredentials
$sel:basicAuthCredentials:SAPODataConnectorProfileCredentials' :: SAPODataConnectorProfileCredentials -> Maybe BasicAuthCredentials
basicAuthCredentials} -> Maybe BasicAuthCredentials
basicAuthCredentials) (\s :: SAPODataConnectorProfileCredentials
s@SAPODataConnectorProfileCredentials' {} Maybe BasicAuthCredentials
a -> SAPODataConnectorProfileCredentials
s {$sel:basicAuthCredentials:SAPODataConnectorProfileCredentials' :: Maybe BasicAuthCredentials
basicAuthCredentials = Maybe BasicAuthCredentials
a} :: SAPODataConnectorProfileCredentials)
instance
Prelude.Hashable
SAPODataConnectorProfileCredentials
instance
Prelude.NFData
SAPODataConnectorProfileCredentials
instance
Core.ToJSON
SAPODataConnectorProfileCredentials
where
toJSON :: SAPODataConnectorProfileCredentials -> Value
toJSON SAPODataConnectorProfileCredentials' {Maybe BasicAuthCredentials
Maybe OAuthCredentials
basicAuthCredentials :: Maybe BasicAuthCredentials
oAuthCredentials :: Maybe OAuthCredentials
$sel:basicAuthCredentials:SAPODataConnectorProfileCredentials' :: SAPODataConnectorProfileCredentials -> Maybe BasicAuthCredentials
$sel:oAuthCredentials:SAPODataConnectorProfileCredentials' :: SAPODataConnectorProfileCredentials -> Maybe OAuthCredentials
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"oAuthCredentials" Text -> OAuthCredentials -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OAuthCredentials -> Pair) -> Maybe OAuthCredentials -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OAuthCredentials
oAuthCredentials,
(Text
"basicAuthCredentials" Text -> BasicAuthCredentials -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(BasicAuthCredentials -> Pair)
-> Maybe BasicAuthCredentials -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BasicAuthCredentials
basicAuthCredentials
]
)