{-# 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.SourceConnectorProperties where
import qualified Amazonka.Core as Core
import Amazonka.CustomerProfiles.Types.MarketoSourceProperties
import Amazonka.CustomerProfiles.Types.S3SourceProperties
import Amazonka.CustomerProfiles.Types.SalesforceSourceProperties
import Amazonka.CustomerProfiles.Types.ServiceNowSourceProperties
import Amazonka.CustomerProfiles.Types.ZendeskSourceProperties
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SourceConnectorProperties = SourceConnectorProperties'
{
SourceConnectorProperties -> Maybe ServiceNowSourceProperties
serviceNow :: Prelude.Maybe ServiceNowSourceProperties,
SourceConnectorProperties -> Maybe MarketoSourceProperties
marketo :: Prelude.Maybe MarketoSourceProperties,
SourceConnectorProperties -> Maybe SalesforceSourceProperties
salesforce :: Prelude.Maybe SalesforceSourceProperties,
SourceConnectorProperties -> Maybe ZendeskSourceProperties
zendesk :: Prelude.Maybe ZendeskSourceProperties,
SourceConnectorProperties -> Maybe S3SourceProperties
s3 :: Prelude.Maybe S3SourceProperties
}
deriving (SourceConnectorProperties -> SourceConnectorProperties -> Bool
(SourceConnectorProperties -> SourceConnectorProperties -> Bool)
-> (SourceConnectorProperties -> SourceConnectorProperties -> Bool)
-> Eq SourceConnectorProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceConnectorProperties -> SourceConnectorProperties -> Bool
$c/= :: SourceConnectorProperties -> SourceConnectorProperties -> Bool
== :: SourceConnectorProperties -> SourceConnectorProperties -> Bool
$c== :: SourceConnectorProperties -> SourceConnectorProperties -> Bool
Prelude.Eq, ReadPrec [SourceConnectorProperties]
ReadPrec SourceConnectorProperties
Int -> ReadS SourceConnectorProperties
ReadS [SourceConnectorProperties]
(Int -> ReadS SourceConnectorProperties)
-> ReadS [SourceConnectorProperties]
-> ReadPrec SourceConnectorProperties
-> ReadPrec [SourceConnectorProperties]
-> Read SourceConnectorProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceConnectorProperties]
$creadListPrec :: ReadPrec [SourceConnectorProperties]
readPrec :: ReadPrec SourceConnectorProperties
$creadPrec :: ReadPrec SourceConnectorProperties
readList :: ReadS [SourceConnectorProperties]
$creadList :: ReadS [SourceConnectorProperties]
readsPrec :: Int -> ReadS SourceConnectorProperties
$creadsPrec :: Int -> ReadS SourceConnectorProperties
Prelude.Read, Int -> SourceConnectorProperties -> ShowS
[SourceConnectorProperties] -> ShowS
SourceConnectorProperties -> String
(Int -> SourceConnectorProperties -> ShowS)
-> (SourceConnectorProperties -> String)
-> ([SourceConnectorProperties] -> ShowS)
-> Show SourceConnectorProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceConnectorProperties] -> ShowS
$cshowList :: [SourceConnectorProperties] -> ShowS
show :: SourceConnectorProperties -> String
$cshow :: SourceConnectorProperties -> String
showsPrec :: Int -> SourceConnectorProperties -> ShowS
$cshowsPrec :: Int -> SourceConnectorProperties -> ShowS
Prelude.Show, (forall x.
SourceConnectorProperties -> Rep SourceConnectorProperties x)
-> (forall x.
Rep SourceConnectorProperties x -> SourceConnectorProperties)
-> Generic SourceConnectorProperties
forall x.
Rep SourceConnectorProperties x -> SourceConnectorProperties
forall x.
SourceConnectorProperties -> Rep SourceConnectorProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SourceConnectorProperties x -> SourceConnectorProperties
$cfrom :: forall x.
SourceConnectorProperties -> Rep SourceConnectorProperties x
Prelude.Generic)
newSourceConnectorProperties ::
SourceConnectorProperties
newSourceConnectorProperties :: SourceConnectorProperties
newSourceConnectorProperties =
SourceConnectorProperties' :: Maybe ServiceNowSourceProperties
-> Maybe MarketoSourceProperties
-> Maybe SalesforceSourceProperties
-> Maybe ZendeskSourceProperties
-> Maybe S3SourceProperties
-> SourceConnectorProperties
SourceConnectorProperties'
{ $sel:serviceNow:SourceConnectorProperties' :: Maybe ServiceNowSourceProperties
serviceNow =
Maybe ServiceNowSourceProperties
forall a. Maybe a
Prelude.Nothing,
$sel:marketo:SourceConnectorProperties' :: Maybe MarketoSourceProperties
marketo = Maybe MarketoSourceProperties
forall a. Maybe a
Prelude.Nothing,
$sel:salesforce:SourceConnectorProperties' :: Maybe SalesforceSourceProperties
salesforce = Maybe SalesforceSourceProperties
forall a. Maybe a
Prelude.Nothing,
$sel:zendesk:SourceConnectorProperties' :: Maybe ZendeskSourceProperties
zendesk = Maybe ZendeskSourceProperties
forall a. Maybe a
Prelude.Nothing,
$sel:s3:SourceConnectorProperties' :: Maybe S3SourceProperties
s3 = Maybe S3SourceProperties
forall a. Maybe a
Prelude.Nothing
}
sourceConnectorProperties_serviceNow :: Lens.Lens' SourceConnectorProperties (Prelude.Maybe ServiceNowSourceProperties)
sourceConnectorProperties_serviceNow :: (Maybe ServiceNowSourceProperties
-> f (Maybe ServiceNowSourceProperties))
-> SourceConnectorProperties -> f SourceConnectorProperties
sourceConnectorProperties_serviceNow = (SourceConnectorProperties -> Maybe ServiceNowSourceProperties)
-> (SourceConnectorProperties
-> Maybe ServiceNowSourceProperties -> SourceConnectorProperties)
-> Lens
SourceConnectorProperties
SourceConnectorProperties
(Maybe ServiceNowSourceProperties)
(Maybe ServiceNowSourceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConnectorProperties' {Maybe ServiceNowSourceProperties
serviceNow :: Maybe ServiceNowSourceProperties
$sel:serviceNow:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe ServiceNowSourceProperties
serviceNow} -> Maybe ServiceNowSourceProperties
serviceNow) (\s :: SourceConnectorProperties
s@SourceConnectorProperties' {} Maybe ServiceNowSourceProperties
a -> SourceConnectorProperties
s {$sel:serviceNow:SourceConnectorProperties' :: Maybe ServiceNowSourceProperties
serviceNow = Maybe ServiceNowSourceProperties
a} :: SourceConnectorProperties)
sourceConnectorProperties_marketo :: Lens.Lens' SourceConnectorProperties (Prelude.Maybe MarketoSourceProperties)
sourceConnectorProperties_marketo :: (Maybe MarketoSourceProperties
-> f (Maybe MarketoSourceProperties))
-> SourceConnectorProperties -> f SourceConnectorProperties
sourceConnectorProperties_marketo = (SourceConnectorProperties -> Maybe MarketoSourceProperties)
-> (SourceConnectorProperties
-> Maybe MarketoSourceProperties -> SourceConnectorProperties)
-> Lens
SourceConnectorProperties
SourceConnectorProperties
(Maybe MarketoSourceProperties)
(Maybe MarketoSourceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConnectorProperties' {Maybe MarketoSourceProperties
marketo :: Maybe MarketoSourceProperties
$sel:marketo:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe MarketoSourceProperties
marketo} -> Maybe MarketoSourceProperties
marketo) (\s :: SourceConnectorProperties
s@SourceConnectorProperties' {} Maybe MarketoSourceProperties
a -> SourceConnectorProperties
s {$sel:marketo:SourceConnectorProperties' :: Maybe MarketoSourceProperties
marketo = Maybe MarketoSourceProperties
a} :: SourceConnectorProperties)
sourceConnectorProperties_salesforce :: Lens.Lens' SourceConnectorProperties (Prelude.Maybe SalesforceSourceProperties)
sourceConnectorProperties_salesforce :: (Maybe SalesforceSourceProperties
-> f (Maybe SalesforceSourceProperties))
-> SourceConnectorProperties -> f SourceConnectorProperties
sourceConnectorProperties_salesforce = (SourceConnectorProperties -> Maybe SalesforceSourceProperties)
-> (SourceConnectorProperties
-> Maybe SalesforceSourceProperties -> SourceConnectorProperties)
-> Lens
SourceConnectorProperties
SourceConnectorProperties
(Maybe SalesforceSourceProperties)
(Maybe SalesforceSourceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConnectorProperties' {Maybe SalesforceSourceProperties
salesforce :: Maybe SalesforceSourceProperties
$sel:salesforce:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe SalesforceSourceProperties
salesforce} -> Maybe SalesforceSourceProperties
salesforce) (\s :: SourceConnectorProperties
s@SourceConnectorProperties' {} Maybe SalesforceSourceProperties
a -> SourceConnectorProperties
s {$sel:salesforce:SourceConnectorProperties' :: Maybe SalesforceSourceProperties
salesforce = Maybe SalesforceSourceProperties
a} :: SourceConnectorProperties)
sourceConnectorProperties_zendesk :: Lens.Lens' SourceConnectorProperties (Prelude.Maybe ZendeskSourceProperties)
sourceConnectorProperties_zendesk :: (Maybe ZendeskSourceProperties
-> f (Maybe ZendeskSourceProperties))
-> SourceConnectorProperties -> f SourceConnectorProperties
sourceConnectorProperties_zendesk = (SourceConnectorProperties -> Maybe ZendeskSourceProperties)
-> (SourceConnectorProperties
-> Maybe ZendeskSourceProperties -> SourceConnectorProperties)
-> Lens
SourceConnectorProperties
SourceConnectorProperties
(Maybe ZendeskSourceProperties)
(Maybe ZendeskSourceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConnectorProperties' {Maybe ZendeskSourceProperties
zendesk :: Maybe ZendeskSourceProperties
$sel:zendesk:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe ZendeskSourceProperties
zendesk} -> Maybe ZendeskSourceProperties
zendesk) (\s :: SourceConnectorProperties
s@SourceConnectorProperties' {} Maybe ZendeskSourceProperties
a -> SourceConnectorProperties
s {$sel:zendesk:SourceConnectorProperties' :: Maybe ZendeskSourceProperties
zendesk = Maybe ZendeskSourceProperties
a} :: SourceConnectorProperties)
sourceConnectorProperties_s3 :: Lens.Lens' SourceConnectorProperties (Prelude.Maybe S3SourceProperties)
sourceConnectorProperties_s3 :: (Maybe S3SourceProperties -> f (Maybe S3SourceProperties))
-> SourceConnectorProperties -> f SourceConnectorProperties
sourceConnectorProperties_s3 = (SourceConnectorProperties -> Maybe S3SourceProperties)
-> (SourceConnectorProperties
-> Maybe S3SourceProperties -> SourceConnectorProperties)
-> Lens
SourceConnectorProperties
SourceConnectorProperties
(Maybe S3SourceProperties)
(Maybe S3SourceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConnectorProperties' {Maybe S3SourceProperties
s3 :: Maybe S3SourceProperties
$sel:s3:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe S3SourceProperties
s3} -> Maybe S3SourceProperties
s3) (\s :: SourceConnectorProperties
s@SourceConnectorProperties' {} Maybe S3SourceProperties
a -> SourceConnectorProperties
s {$sel:s3:SourceConnectorProperties' :: Maybe S3SourceProperties
s3 = Maybe S3SourceProperties
a} :: SourceConnectorProperties)
instance Prelude.Hashable SourceConnectorProperties
instance Prelude.NFData SourceConnectorProperties
instance Core.ToJSON SourceConnectorProperties where
toJSON :: SourceConnectorProperties -> Value
toJSON SourceConnectorProperties' {Maybe MarketoSourceProperties
Maybe S3SourceProperties
Maybe SalesforceSourceProperties
Maybe ServiceNowSourceProperties
Maybe ZendeskSourceProperties
s3 :: Maybe S3SourceProperties
zendesk :: Maybe ZendeskSourceProperties
salesforce :: Maybe SalesforceSourceProperties
marketo :: Maybe MarketoSourceProperties
serviceNow :: Maybe ServiceNowSourceProperties
$sel:s3:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe S3SourceProperties
$sel:zendesk:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe ZendeskSourceProperties
$sel:salesforce:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe SalesforceSourceProperties
$sel:marketo:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe MarketoSourceProperties
$sel:serviceNow:SourceConnectorProperties' :: SourceConnectorProperties -> Maybe ServiceNowSourceProperties
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ServiceNow" Text -> ServiceNowSourceProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ServiceNowSourceProperties -> Pair)
-> Maybe ServiceNowSourceProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ServiceNowSourceProperties
serviceNow,
(Text
"Marketo" Text -> MarketoSourceProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MarketoSourceProperties -> Pair)
-> Maybe MarketoSourceProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MarketoSourceProperties
marketo,
(Text
"Salesforce" Text -> SalesforceSourceProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SalesforceSourceProperties -> Pair)
-> Maybe SalesforceSourceProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SalesforceSourceProperties
salesforce,
(Text
"Zendesk" Text -> ZendeskSourceProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ZendeskSourceProperties -> Pair)
-> Maybe ZendeskSourceProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ZendeskSourceProperties
zendesk,
(Text
"S3" Text -> S3SourceProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (S3SourceProperties -> Pair)
-> Maybe S3SourceProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3SourceProperties
s3
]
)