{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ConnectorProfileConfig = ConnectorProfileConfig'
{
ConnectorProfileConfig -> Maybe ConnectorProfileCredentials
connectorProfileCredentials :: Prelude.Maybe ConnectorProfileCredentials,
ConnectorProfileConfig -> ConnectorProfileProperties
connectorProfileProperties :: ConnectorProfileProperties
}
deriving (ConnectorProfileConfig -> ConnectorProfileConfig -> Bool
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
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. 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 ->
ConnectorProfileConfig
newConnectorProfileConfig :: ConnectorProfileProperties -> ConnectorProfileConfig
newConnectorProfileConfig
ConnectorProfileProperties
pConnectorProfileProperties_ =
ConnectorProfileConfig'
{ $sel:connectorProfileCredentials:ConnectorProfileConfig' :: Maybe ConnectorProfileCredentials
connectorProfileCredentials =
forall a. Maybe a
Prelude.Nothing,
$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileProperties
connectorProfileProperties =
ConnectorProfileProperties
pConnectorProfileProperties_
}
connectorProfileConfig_connectorProfileCredentials :: Lens.Lens' ConnectorProfileConfig (Prelude.Maybe ConnectorProfileCredentials)
connectorProfileConfig_connectorProfileCredentials :: Lens' ConnectorProfileConfig (Maybe ConnectorProfileCredentials)
connectorProfileConfig_connectorProfileCredentials = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorProfileConfig' {Maybe ConnectorProfileCredentials
connectorProfileCredentials :: Maybe ConnectorProfileCredentials
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileConfig -> Maybe ConnectorProfileCredentials
connectorProfileCredentials} -> Maybe ConnectorProfileCredentials
connectorProfileCredentials) (\s :: ConnectorProfileConfig
s@ConnectorProfileConfig' {} Maybe ConnectorProfileCredentials
a -> ConnectorProfileConfig
s {$sel:connectorProfileCredentials:ConnectorProfileConfig' :: Maybe ConnectorProfileCredentials
connectorProfileCredentials = Maybe ConnectorProfileCredentials
a} :: ConnectorProfileConfig)
connectorProfileConfig_connectorProfileProperties :: Lens.Lens' ConnectorProfileConfig ConnectorProfileProperties
connectorProfileConfig_connectorProfileProperties :: Lens' ConnectorProfileConfig ConnectorProfileProperties
connectorProfileConfig_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)
instance Prelude.Hashable ConnectorProfileConfig where
hashWithSalt :: Int -> ConnectorProfileConfig -> Int
hashWithSalt Int
_salt ConnectorProfileConfig' {Maybe ConnectorProfileCredentials
ConnectorProfileProperties
connectorProfileProperties :: ConnectorProfileProperties
connectorProfileCredentials :: Maybe ConnectorProfileCredentials
$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileProperties
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileConfig -> Maybe ConnectorProfileCredentials
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectorProfileCredentials
connectorProfileCredentials
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ConnectorProfileProperties
connectorProfileProperties
instance Prelude.NFData ConnectorProfileConfig where
rnf :: ConnectorProfileConfig -> ()
rnf ConnectorProfileConfig' {Maybe ConnectorProfileCredentials
ConnectorProfileProperties
connectorProfileProperties :: ConnectorProfileProperties
connectorProfileCredentials :: Maybe ConnectorProfileCredentials
$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileProperties
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileConfig -> Maybe ConnectorProfileCredentials
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectorProfileCredentials
connectorProfileCredentials
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ConnectorProfileProperties
connectorProfileProperties
instance Data.ToJSON ConnectorProfileConfig where
toJSON :: ConnectorProfileConfig -> Value
toJSON ConnectorProfileConfig' {Maybe ConnectorProfileCredentials
ConnectorProfileProperties
connectorProfileProperties :: ConnectorProfileProperties
connectorProfileCredentials :: Maybe ConnectorProfileCredentials
$sel:connectorProfileProperties:ConnectorProfileConfig' :: ConnectorProfileConfig -> ConnectorProfileProperties
$sel:connectorProfileCredentials:ConnectorProfileConfig' :: ConnectorProfileConfig -> Maybe ConnectorProfileCredentials
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"connectorProfileCredentials" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorProfileCredentials
connectorProfileCredentials,
forall a. a -> Maybe a
Prelude.Just
( Key
"connectorProfileProperties"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ConnectorProfileProperties
connectorProfileProperties
)
]
)