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