{-# 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.MarketoConnectorProfileProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MarketoConnectorProfileProperties = MarketoConnectorProfileProperties'
{
MarketoConnectorProfileProperties -> Text
instanceUrl :: Prelude.Text
}
deriving (MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool
(MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool)
-> (MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool)
-> Eq MarketoConnectorProfileProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool
$c/= :: MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool
== :: MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool
$c== :: MarketoConnectorProfileProperties
-> MarketoConnectorProfileProperties -> Bool
Prelude.Eq, ReadPrec [MarketoConnectorProfileProperties]
ReadPrec MarketoConnectorProfileProperties
Int -> ReadS MarketoConnectorProfileProperties
ReadS [MarketoConnectorProfileProperties]
(Int -> ReadS MarketoConnectorProfileProperties)
-> ReadS [MarketoConnectorProfileProperties]
-> ReadPrec MarketoConnectorProfileProperties
-> ReadPrec [MarketoConnectorProfileProperties]
-> Read MarketoConnectorProfileProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MarketoConnectorProfileProperties]
$creadListPrec :: ReadPrec [MarketoConnectorProfileProperties]
readPrec :: ReadPrec MarketoConnectorProfileProperties
$creadPrec :: ReadPrec MarketoConnectorProfileProperties
readList :: ReadS [MarketoConnectorProfileProperties]
$creadList :: ReadS [MarketoConnectorProfileProperties]
readsPrec :: Int -> ReadS MarketoConnectorProfileProperties
$creadsPrec :: Int -> ReadS MarketoConnectorProfileProperties
Prelude.Read, Int -> MarketoConnectorProfileProperties -> ShowS
[MarketoConnectorProfileProperties] -> ShowS
MarketoConnectorProfileProperties -> String
(Int -> MarketoConnectorProfileProperties -> ShowS)
-> (MarketoConnectorProfileProperties -> String)
-> ([MarketoConnectorProfileProperties] -> ShowS)
-> Show MarketoConnectorProfileProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MarketoConnectorProfileProperties] -> ShowS
$cshowList :: [MarketoConnectorProfileProperties] -> ShowS
show :: MarketoConnectorProfileProperties -> String
$cshow :: MarketoConnectorProfileProperties -> String
showsPrec :: Int -> MarketoConnectorProfileProperties -> ShowS
$cshowsPrec :: Int -> MarketoConnectorProfileProperties -> ShowS
Prelude.Show, (forall x.
MarketoConnectorProfileProperties
-> Rep MarketoConnectorProfileProperties x)
-> (forall x.
Rep MarketoConnectorProfileProperties x
-> MarketoConnectorProfileProperties)
-> Generic MarketoConnectorProfileProperties
forall x.
Rep MarketoConnectorProfileProperties x
-> MarketoConnectorProfileProperties
forall x.
MarketoConnectorProfileProperties
-> Rep MarketoConnectorProfileProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MarketoConnectorProfileProperties x
-> MarketoConnectorProfileProperties
$cfrom :: forall x.
MarketoConnectorProfileProperties
-> Rep MarketoConnectorProfileProperties x
Prelude.Generic)
newMarketoConnectorProfileProperties ::
Prelude.Text ->
MarketoConnectorProfileProperties
newMarketoConnectorProfileProperties :: Text -> MarketoConnectorProfileProperties
newMarketoConnectorProfileProperties Text
pInstanceUrl_ =
MarketoConnectorProfileProperties' :: Text -> MarketoConnectorProfileProperties
MarketoConnectorProfileProperties'
{ $sel:instanceUrl:MarketoConnectorProfileProperties' :: Text
instanceUrl =
Text
pInstanceUrl_
}
marketoConnectorProfileProperties_instanceUrl :: Lens.Lens' MarketoConnectorProfileProperties Prelude.Text
marketoConnectorProfileProperties_instanceUrl :: (Text -> f Text)
-> MarketoConnectorProfileProperties
-> f MarketoConnectorProfileProperties
marketoConnectorProfileProperties_instanceUrl = (MarketoConnectorProfileProperties -> Text)
-> (MarketoConnectorProfileProperties
-> Text -> MarketoConnectorProfileProperties)
-> Lens
MarketoConnectorProfileProperties
MarketoConnectorProfileProperties
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MarketoConnectorProfileProperties' {Text
instanceUrl :: Text
$sel:instanceUrl:MarketoConnectorProfileProperties' :: MarketoConnectorProfileProperties -> Text
instanceUrl} -> Text
instanceUrl) (\s :: MarketoConnectorProfileProperties
s@MarketoConnectorProfileProperties' {} Text
a -> MarketoConnectorProfileProperties
s {$sel:instanceUrl:MarketoConnectorProfileProperties' :: Text
instanceUrl = Text
a} :: MarketoConnectorProfileProperties)
instance
Core.FromJSON
MarketoConnectorProfileProperties
where
parseJSON :: Value -> Parser MarketoConnectorProfileProperties
parseJSON =
String
-> (Object -> Parser MarketoConnectorProfileProperties)
-> Value
-> Parser MarketoConnectorProfileProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MarketoConnectorProfileProperties"
( \Object
x ->
Text -> MarketoConnectorProfileProperties
MarketoConnectorProfileProperties'
(Text -> MarketoConnectorProfileProperties)
-> Parser Text -> Parser MarketoConnectorProfileProperties
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"instanceUrl")
)
instance
Prelude.Hashable
MarketoConnectorProfileProperties
instance
Prelude.NFData
MarketoConnectorProfileProperties
instance
Core.ToJSON
MarketoConnectorProfileProperties
where
toJSON :: MarketoConnectorProfileProperties -> Value
toJSON MarketoConnectorProfileProperties' {Text
instanceUrl :: Text
$sel:instanceUrl:MarketoConnectorProfileProperties' :: MarketoConnectorProfileProperties -> Text
..} =
[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
"instanceUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceUrl)]
)