module Stratosphere.Glue.Trigger.EventBatchingConditionProperty (
        EventBatchingConditionProperty(..),
        mkEventBatchingConditionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EventBatchingConditionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-eventbatchingcondition.html>
    EventBatchingConditionProperty {EventBatchingConditionProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-eventbatchingcondition.html#cfn-glue-trigger-eventbatchingcondition-batchsize>
                                    EventBatchingConditionProperty -> Value Integer
batchSize :: (Value Prelude.Integer),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-eventbatchingcondition.html#cfn-glue-trigger-eventbatchingcondition-batchwindow>
                                    EventBatchingConditionProperty -> Maybe (Value Integer)
batchWindow :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (EventBatchingConditionProperty
-> EventBatchingConditionProperty -> Bool
(EventBatchingConditionProperty
 -> EventBatchingConditionProperty -> Bool)
-> (EventBatchingConditionProperty
    -> EventBatchingConditionProperty -> Bool)
-> Eq EventBatchingConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventBatchingConditionProperty
-> EventBatchingConditionProperty -> Bool
== :: EventBatchingConditionProperty
-> EventBatchingConditionProperty -> Bool
$c/= :: EventBatchingConditionProperty
-> EventBatchingConditionProperty -> Bool
/= :: EventBatchingConditionProperty
-> EventBatchingConditionProperty -> Bool
Prelude.Eq, Int -> EventBatchingConditionProperty -> ShowS
[EventBatchingConditionProperty] -> ShowS
EventBatchingConditionProperty -> String
(Int -> EventBatchingConditionProperty -> ShowS)
-> (EventBatchingConditionProperty -> String)
-> ([EventBatchingConditionProperty] -> ShowS)
-> Show EventBatchingConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventBatchingConditionProperty -> ShowS
showsPrec :: Int -> EventBatchingConditionProperty -> ShowS
$cshow :: EventBatchingConditionProperty -> String
show :: EventBatchingConditionProperty -> String
$cshowList :: [EventBatchingConditionProperty] -> ShowS
showList :: [EventBatchingConditionProperty] -> ShowS
Prelude.Show)
mkEventBatchingConditionProperty ::
  Value Prelude.Integer -> EventBatchingConditionProperty
mkEventBatchingConditionProperty :: Value Integer -> EventBatchingConditionProperty
mkEventBatchingConditionProperty Value Integer
batchSize
  = EventBatchingConditionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), batchSize :: Value Integer
batchSize = Value Integer
batchSize,
       batchWindow :: Maybe (Value Integer)
batchWindow = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EventBatchingConditionProperty where
  toResourceProperties :: EventBatchingConditionProperty -> ResourceProperties
toResourceProperties EventBatchingConditionProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: EventBatchingConditionProperty -> ()
batchSize :: EventBatchingConditionProperty -> Value Integer
batchWindow :: EventBatchingConditionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
batchSize :: Value Integer
batchWindow :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::Trigger.EventBatchingCondition",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"BatchSize" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
batchSize]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BatchWindow" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
batchWindow]))}
instance JSON.ToJSON EventBatchingConditionProperty where
  toJSON :: EventBatchingConditionProperty -> Value
toJSON EventBatchingConditionProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: EventBatchingConditionProperty -> ()
batchSize :: EventBatchingConditionProperty -> Value Integer
batchWindow :: EventBatchingConditionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
batchSize :: Value Integer
batchWindow :: Maybe (Value Integer)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"BatchSize" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
batchSize]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BatchWindow" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
batchWindow])))
instance Property "BatchSize" EventBatchingConditionProperty where
  type PropertyType "BatchSize" EventBatchingConditionProperty = Value Prelude.Integer
  set :: PropertyType "BatchSize" EventBatchingConditionProperty
-> EventBatchingConditionProperty -> EventBatchingConditionProperty
set PropertyType "BatchSize" EventBatchingConditionProperty
newValue EventBatchingConditionProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: EventBatchingConditionProperty -> ()
batchSize :: EventBatchingConditionProperty -> Value Integer
batchWindow :: EventBatchingConditionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
batchSize :: Value Integer
batchWindow :: Maybe (Value Integer)
..}
    = EventBatchingConditionProperty {batchSize :: Value Integer
batchSize = PropertyType "BatchSize" EventBatchingConditionProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
batchWindow :: Maybe (Value Integer)
haddock_workaround_ :: ()
batchWindow :: Maybe (Value Integer)
..}
instance Property "BatchWindow" EventBatchingConditionProperty where
  type PropertyType "BatchWindow" EventBatchingConditionProperty = Value Prelude.Integer
  set :: PropertyType "BatchWindow" EventBatchingConditionProperty
-> EventBatchingConditionProperty -> EventBatchingConditionProperty
set PropertyType "BatchWindow" EventBatchingConditionProperty
newValue EventBatchingConditionProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: EventBatchingConditionProperty -> ()
batchSize :: EventBatchingConditionProperty -> Value Integer
batchWindow :: EventBatchingConditionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
batchSize :: Value Integer
batchWindow :: Maybe (Value Integer)
..}
    = EventBatchingConditionProperty
        {batchWindow :: Maybe (Value Integer)
batchWindow = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BatchWindow" EventBatchingConditionProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
batchSize :: Value Integer
haddock_workaround_ :: ()
batchSize :: Value Integer
..}