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