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