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