{-# 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.Glue.Types.StartingEventBatchCondition where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StartingEventBatchCondition = StartingEventBatchCondition'
{
StartingEventBatchCondition -> Maybe Int
batchWindow :: Prelude.Maybe Prelude.Int,
StartingEventBatchCondition -> Maybe Int
batchSize :: Prelude.Maybe Prelude.Int
}
deriving (StartingEventBatchCondition -> StartingEventBatchCondition -> Bool
(StartingEventBatchCondition
-> StartingEventBatchCondition -> Bool)
-> (StartingEventBatchCondition
-> StartingEventBatchCondition -> Bool)
-> Eq StartingEventBatchCondition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartingEventBatchCondition -> StartingEventBatchCondition -> Bool
$c/= :: StartingEventBatchCondition -> StartingEventBatchCondition -> Bool
== :: StartingEventBatchCondition -> StartingEventBatchCondition -> Bool
$c== :: StartingEventBatchCondition -> StartingEventBatchCondition -> Bool
Prelude.Eq, ReadPrec [StartingEventBatchCondition]
ReadPrec StartingEventBatchCondition
Int -> ReadS StartingEventBatchCondition
ReadS [StartingEventBatchCondition]
(Int -> ReadS StartingEventBatchCondition)
-> ReadS [StartingEventBatchCondition]
-> ReadPrec StartingEventBatchCondition
-> ReadPrec [StartingEventBatchCondition]
-> Read StartingEventBatchCondition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartingEventBatchCondition]
$creadListPrec :: ReadPrec [StartingEventBatchCondition]
readPrec :: ReadPrec StartingEventBatchCondition
$creadPrec :: ReadPrec StartingEventBatchCondition
readList :: ReadS [StartingEventBatchCondition]
$creadList :: ReadS [StartingEventBatchCondition]
readsPrec :: Int -> ReadS StartingEventBatchCondition
$creadsPrec :: Int -> ReadS StartingEventBatchCondition
Prelude.Read, Int -> StartingEventBatchCondition -> ShowS
[StartingEventBatchCondition] -> ShowS
StartingEventBatchCondition -> String
(Int -> StartingEventBatchCondition -> ShowS)
-> (StartingEventBatchCondition -> String)
-> ([StartingEventBatchCondition] -> ShowS)
-> Show StartingEventBatchCondition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartingEventBatchCondition] -> ShowS
$cshowList :: [StartingEventBatchCondition] -> ShowS
show :: StartingEventBatchCondition -> String
$cshow :: StartingEventBatchCondition -> String
showsPrec :: Int -> StartingEventBatchCondition -> ShowS
$cshowsPrec :: Int -> StartingEventBatchCondition -> ShowS
Prelude.Show, (forall x.
StartingEventBatchCondition -> Rep StartingEventBatchCondition x)
-> (forall x.
Rep StartingEventBatchCondition x -> StartingEventBatchCondition)
-> Generic StartingEventBatchCondition
forall x.
Rep StartingEventBatchCondition x -> StartingEventBatchCondition
forall x.
StartingEventBatchCondition -> Rep StartingEventBatchCondition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartingEventBatchCondition x -> StartingEventBatchCondition
$cfrom :: forall x.
StartingEventBatchCondition -> Rep StartingEventBatchCondition x
Prelude.Generic)
newStartingEventBatchCondition ::
StartingEventBatchCondition
newStartingEventBatchCondition :: StartingEventBatchCondition
newStartingEventBatchCondition =
StartingEventBatchCondition' :: Maybe Int -> Maybe Int -> StartingEventBatchCondition
StartingEventBatchCondition'
{ $sel:batchWindow:StartingEventBatchCondition' :: Maybe Int
batchWindow =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:batchSize:StartingEventBatchCondition' :: Maybe Int
batchSize = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
startingEventBatchCondition_batchWindow :: Lens.Lens' StartingEventBatchCondition (Prelude.Maybe Prelude.Int)
startingEventBatchCondition_batchWindow :: (Maybe Int -> f (Maybe Int))
-> StartingEventBatchCondition -> f StartingEventBatchCondition
startingEventBatchCondition_batchWindow = (StartingEventBatchCondition -> Maybe Int)
-> (StartingEventBatchCondition
-> Maybe Int -> StartingEventBatchCondition)
-> Lens
StartingEventBatchCondition
StartingEventBatchCondition
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartingEventBatchCondition' {Maybe Int
batchWindow :: Maybe Int
$sel:batchWindow:StartingEventBatchCondition' :: StartingEventBatchCondition -> Maybe Int
batchWindow} -> Maybe Int
batchWindow) (\s :: StartingEventBatchCondition
s@StartingEventBatchCondition' {} Maybe Int
a -> StartingEventBatchCondition
s {$sel:batchWindow:StartingEventBatchCondition' :: Maybe Int
batchWindow = Maybe Int
a} :: StartingEventBatchCondition)
startingEventBatchCondition_batchSize :: Lens.Lens' StartingEventBatchCondition (Prelude.Maybe Prelude.Int)
startingEventBatchCondition_batchSize :: (Maybe Int -> f (Maybe Int))
-> StartingEventBatchCondition -> f StartingEventBatchCondition
startingEventBatchCondition_batchSize = (StartingEventBatchCondition -> Maybe Int)
-> (StartingEventBatchCondition
-> Maybe Int -> StartingEventBatchCondition)
-> Lens
StartingEventBatchCondition
StartingEventBatchCondition
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartingEventBatchCondition' {Maybe Int
batchSize :: Maybe Int
$sel:batchSize:StartingEventBatchCondition' :: StartingEventBatchCondition -> Maybe Int
batchSize} -> Maybe Int
batchSize) (\s :: StartingEventBatchCondition
s@StartingEventBatchCondition' {} Maybe Int
a -> StartingEventBatchCondition
s {$sel:batchSize:StartingEventBatchCondition' :: Maybe Int
batchSize = Maybe Int
a} :: StartingEventBatchCondition)
instance Core.FromJSON StartingEventBatchCondition where
parseJSON :: Value -> Parser StartingEventBatchCondition
parseJSON =
String
-> (Object -> Parser StartingEventBatchCondition)
-> Value
-> Parser StartingEventBatchCondition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StartingEventBatchCondition"
( \Object
x ->
Maybe Int -> Maybe Int -> StartingEventBatchCondition
StartingEventBatchCondition'
(Maybe Int -> Maybe Int -> StartingEventBatchCondition)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> StartingEventBatchCondition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BatchWindow")
Parser (Maybe Int -> StartingEventBatchCondition)
-> Parser (Maybe Int) -> Parser StartingEventBatchCondition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BatchSize")
)
instance Prelude.Hashable StartingEventBatchCondition
instance Prelude.NFData StartingEventBatchCondition