{-# 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.ConnectorProfileConfig where
import Amazonka.AppFlow.Types.ConnectorProfileCredentials
import Amazonka.AppFlow.Types.ConnectorProfileProperties
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConnectorProfileConfig = ConnectorProfileConfig'
{
ConnectorProfileConfig -> ConnectorProfileProperties
connectorProfileProperties :: ConnectorProfileProperties,
ConnectorProfileConfig -> ConnectorProfileCredentials
connectorProfileCredentials :: ConnectorProfileCredentials
}
deriving (ConnectorProfileConfig -> ConnectorProfileConfig -> Bool
(ConnectorProfileConfig -> ConnectorProfileConfig -> Bool)
-> (ConnectorProfileConfig -> ConnectorProfileConfig -> Bool)
-> Eq ConnectorProfileConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectorProfileConfig -> ConnectorProfileConfig -> Bool
$c/= :: ConnectorProfileConfig -> ConnectorProfileConfig -> Bool
== :: ConnectorProfileConfig -> ConnectorProfileConfig -> Bool
$c== :: ConnectorProfileConfig -> ConnectorProfileConfig -> Bool
Prelude.Eq, Int -> ConnectorProfileConfig -> ShowS
[ConnectorProfileConfig] -> ShowS
ConnectorProfileConfig -> String
(Int -> ConnectorProfileConfig -> ShowS)
-> (ConnectorProfileConfig -> String)
-> ([ConnectorProfileConfig] -> ShowS)
-> Show ConnectorProfileConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectorProfileConfig] -> ShowS
$cshowList :: [ConnectorProfileConfig] -> ShowS
show :: ConnectorProfileConfig -> String
$cshow :: ConnectorProfileConfig -> String
showsPrec :: Int -> ConnectorProfileConfig -> ShowS
$cshowsPrec :: Int -> ConnectorProfileConfig -> ShowS
Prelude.Show, (forall x. ConnectorProfileConfig -> Rep ConnectorProfileConfig x)
-> (forall x.
Rep ConnectorProfileConfig x -> ConnectorProfileConfig)
-> Generic ConnectorProfileConfig
forall x. Rep ConnectorProfileConfig x -> ConnectorProfileConfig
forall x. ConnectorProfileConfig -> Rep ConnectorProfileConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectorProfileConfig x -> ConnectorProfileConfig
$cfrom :: forall x. ConnectorProfileConfig -> Rep ConnectorProfileConfig x
Prelude.Generic)
newConnectorProfileConfig ::
ConnectorProfileProperties ->
ConnectorProfileCredentials ->
ConnectorProfileConfig
newConnectorProfileConfig :: ConnectorProfileProperties
-> ConnectorProfileCredentials -> ConnectorProfileConfig
newConnectorProfileConfig
ConnectorProfileProperties
pConnectorProfileProperties_
ConnectorProfileCredentials
pConnectorProfileCredentials_ =
ConnectorProfileConfig' :: ConnectorProfileProperties
-> ConnectorProfileCredentials -> ConnectorProfileConfig
ConnectorProfileConfig'
{ $sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileProperties
connectorProfileProperties =
ConnectorProfileProperties
pConnectorProfileProperties_,
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileCredentials
connectorProfileCredentials =
ConnectorProfileCredentials
pConnectorProfileCredentials_
}
connectorProfileConfig_connectorProfileProperties :: Lens.Lens' ConnectorProfileConfig ConnectorProfileProperties
connectorProfileConfig_connectorProfileProperties :: (ConnectorProfileProperties -> f ConnectorProfileProperties)
-> ConnectorProfileConfig -> f ConnectorProfileConfig
connectorProfileConfig_connectorProfileProperties = (ConnectorProfileConfig -> ConnectorProfileProperties)
-> (ConnectorProfileConfig
-> ConnectorProfileProperties -> ConnectorProfileConfig)
-> Lens
ConnectorProfileConfig
ConnectorProfileConfig
ConnectorProfileProperties
ConnectorProfileProperties
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorProfileConfig' {ConnectorProfileProperties
connectorProfileProperties :: ConnectorProfileProperties
$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileProperties
connectorProfileProperties} -> ConnectorProfileProperties
connectorProfileProperties) (\s :: ConnectorProfileConfig
s@ConnectorProfileConfig' {} ConnectorProfileProperties
a -> ConnectorProfileConfig
s {$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileProperties
connectorProfileProperties = ConnectorProfileProperties
a} :: ConnectorProfileConfig)
connectorProfileConfig_connectorProfileCredentials :: Lens.Lens' ConnectorProfileConfig ConnectorProfileCredentials
connectorProfileConfig_connectorProfileCredentials :: (ConnectorProfileCredentials -> f ConnectorProfileCredentials)
-> ConnectorProfileConfig -> f ConnectorProfileConfig
connectorProfileConfig_connectorProfileCredentials = (ConnectorProfileConfig -> ConnectorProfileCredentials)
-> (ConnectorProfileConfig
-> ConnectorProfileCredentials -> ConnectorProfileConfig)
-> Lens
ConnectorProfileConfig
ConnectorProfileConfig
ConnectorProfileCredentials
ConnectorProfileCredentials
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorProfileConfig' {ConnectorProfileCredentials
connectorProfileCredentials :: ConnectorProfileCredentials
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileCredentials
connectorProfileCredentials} -> ConnectorProfileCredentials
connectorProfileCredentials) (\s :: ConnectorProfileConfig
s@ConnectorProfileConfig' {} ConnectorProfileCredentials
a -> ConnectorProfileConfig
s {$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileCredentials
connectorProfileCredentials = ConnectorProfileCredentials
a} :: ConnectorProfileConfig)
instance Prelude.Hashable ConnectorProfileConfig
instance Prelude.NFData ConnectorProfileConfig
instance Core.ToJSON ConnectorProfileConfig where
toJSON :: ConnectorProfileConfig -> Value
toJSON ConnectorProfileConfig' {ConnectorProfileCredentials
ConnectorProfileProperties
connectorProfileCredentials :: ConnectorProfileCredentials
connectorProfileProperties :: ConnectorProfileProperties
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileCredentials
$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileProperties
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"connectorProfileProperties"
Text -> ConnectorProfileProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConnectorProfileProperties
connectorProfileProperties
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"connectorProfileCredentials"
Text -> ConnectorProfileCredentials -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConnectorProfileCredentials
connectorProfileCredentials
)
]
)