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