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