{-# 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.CustomerProfiles.Types.IntegrationConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types.AppflowIntegration
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data IntegrationConfig = IntegrationConfig'
{
IntegrationConfig -> Maybe AppflowIntegration
appflowIntegration :: Prelude.Maybe AppflowIntegration
}
deriving (IntegrationConfig -> IntegrationConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IntegrationConfig -> IntegrationConfig -> Bool
$c/= :: IntegrationConfig -> IntegrationConfig -> Bool
== :: IntegrationConfig -> IntegrationConfig -> Bool
$c== :: IntegrationConfig -> IntegrationConfig -> Bool
Prelude.Eq, ReadPrec [IntegrationConfig]
ReadPrec IntegrationConfig
Int -> ReadS IntegrationConfig
ReadS [IntegrationConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IntegrationConfig]
$creadListPrec :: ReadPrec [IntegrationConfig]
readPrec :: ReadPrec IntegrationConfig
$creadPrec :: ReadPrec IntegrationConfig
readList :: ReadS [IntegrationConfig]
$creadList :: ReadS [IntegrationConfig]
readsPrec :: Int -> ReadS IntegrationConfig
$creadsPrec :: Int -> ReadS IntegrationConfig
Prelude.Read, Int -> IntegrationConfig -> ShowS
[IntegrationConfig] -> ShowS
IntegrationConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IntegrationConfig] -> ShowS
$cshowList :: [IntegrationConfig] -> ShowS
show :: IntegrationConfig -> String
$cshow :: IntegrationConfig -> String
showsPrec :: Int -> IntegrationConfig -> ShowS
$cshowsPrec :: Int -> IntegrationConfig -> ShowS
Prelude.Show, forall x. Rep IntegrationConfig x -> IntegrationConfig
forall x. IntegrationConfig -> Rep IntegrationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IntegrationConfig x -> IntegrationConfig
$cfrom :: forall x. IntegrationConfig -> Rep IntegrationConfig x
Prelude.Generic)
newIntegrationConfig ::
IntegrationConfig
newIntegrationConfig :: IntegrationConfig
newIntegrationConfig =
IntegrationConfig'
{ $sel:appflowIntegration:IntegrationConfig' :: Maybe AppflowIntegration
appflowIntegration =
forall a. Maybe a
Prelude.Nothing
}
integrationConfig_appflowIntegration :: Lens.Lens' IntegrationConfig (Prelude.Maybe AppflowIntegration)
integrationConfig_appflowIntegration :: Lens' IntegrationConfig (Maybe AppflowIntegration)
integrationConfig_appflowIntegration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IntegrationConfig' {Maybe AppflowIntegration
appflowIntegration :: Maybe AppflowIntegration
$sel:appflowIntegration:IntegrationConfig' :: IntegrationConfig -> Maybe AppflowIntegration
appflowIntegration} -> Maybe AppflowIntegration
appflowIntegration) (\s :: IntegrationConfig
s@IntegrationConfig' {} Maybe AppflowIntegration
a -> IntegrationConfig
s {$sel:appflowIntegration:IntegrationConfig' :: Maybe AppflowIntegration
appflowIntegration = Maybe AppflowIntegration
a} :: IntegrationConfig)
instance Prelude.Hashable IntegrationConfig where
hashWithSalt :: Int -> IntegrationConfig -> Int
hashWithSalt Int
_salt IntegrationConfig' {Maybe AppflowIntegration
appflowIntegration :: Maybe AppflowIntegration
$sel:appflowIntegration:IntegrationConfig' :: IntegrationConfig -> Maybe AppflowIntegration
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppflowIntegration
appflowIntegration
instance Prelude.NFData IntegrationConfig where
rnf :: IntegrationConfig -> ()
rnf IntegrationConfig' {Maybe AppflowIntegration
appflowIntegration :: Maybe AppflowIntegration
$sel:appflowIntegration:IntegrationConfig' :: IntegrationConfig -> Maybe AppflowIntegration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AppflowIntegration
appflowIntegration
instance Data.ToJSON IntegrationConfig where
toJSON :: IntegrationConfig -> Value
toJSON IntegrationConfig' {Maybe AppflowIntegration
appflowIntegration :: Maybe AppflowIntegration
$sel:appflowIntegration:IntegrationConfig' :: IntegrationConfig -> Maybe AppflowIntegration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AppflowIntegration" 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 AppflowIntegration
appflowIntegration
]
)