module Stratosphere.Pipes.Pipe.BatchRetryStrategyProperty (
        BatchRetryStrategyProperty(..), mkBatchRetryStrategyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BatchRetryStrategyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-batchretrystrategy.html>
    BatchRetryStrategyProperty {BatchRetryStrategyProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-batchretrystrategy.html#cfn-pipes-pipe-batchretrystrategy-attempts>
                                BatchRetryStrategyProperty -> Maybe (Value Integer)
attempts :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (BatchRetryStrategyProperty -> BatchRetryStrategyProperty -> Bool
(BatchRetryStrategyProperty -> BatchRetryStrategyProperty -> Bool)
-> (BatchRetryStrategyProperty
    -> BatchRetryStrategyProperty -> Bool)
-> Eq BatchRetryStrategyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BatchRetryStrategyProperty -> BatchRetryStrategyProperty -> Bool
== :: BatchRetryStrategyProperty -> BatchRetryStrategyProperty -> Bool
$c/= :: BatchRetryStrategyProperty -> BatchRetryStrategyProperty -> Bool
/= :: BatchRetryStrategyProperty -> BatchRetryStrategyProperty -> Bool
Prelude.Eq, Int -> BatchRetryStrategyProperty -> ShowS
[BatchRetryStrategyProperty] -> ShowS
BatchRetryStrategyProperty -> String
(Int -> BatchRetryStrategyProperty -> ShowS)
-> (BatchRetryStrategyProperty -> String)
-> ([BatchRetryStrategyProperty] -> ShowS)
-> Show BatchRetryStrategyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BatchRetryStrategyProperty -> ShowS
showsPrec :: Int -> BatchRetryStrategyProperty -> ShowS
$cshow :: BatchRetryStrategyProperty -> String
show :: BatchRetryStrategyProperty -> String
$cshowList :: [BatchRetryStrategyProperty] -> ShowS
showList :: [BatchRetryStrategyProperty] -> ShowS
Prelude.Show)
mkBatchRetryStrategyProperty :: BatchRetryStrategyProperty
mkBatchRetryStrategyProperty :: BatchRetryStrategyProperty
mkBatchRetryStrategyProperty
  = BatchRetryStrategyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), attempts :: Maybe (Value Integer)
attempts = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BatchRetryStrategyProperty where
  toResourceProperties :: BatchRetryStrategyProperty -> ResourceProperties
toResourceProperties BatchRetryStrategyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: BatchRetryStrategyProperty -> ()
attempts :: BatchRetryStrategyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attempts :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pipes::Pipe.BatchRetryStrategy",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"Attempts" (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)
attempts])}
instance JSON.ToJSON BatchRetryStrategyProperty where
  toJSON :: BatchRetryStrategyProperty -> Value
toJSON BatchRetryStrategyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: BatchRetryStrategyProperty -> ()
attempts :: BatchRetryStrategyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attempts :: Maybe (Value Integer)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"Attempts" (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)
attempts]))
instance Property "Attempts" BatchRetryStrategyProperty where
  type PropertyType "Attempts" BatchRetryStrategyProperty = Value Prelude.Integer
  set :: PropertyType "Attempts" BatchRetryStrategyProperty
-> BatchRetryStrategyProperty -> BatchRetryStrategyProperty
set PropertyType "Attempts" BatchRetryStrategyProperty
newValue BatchRetryStrategyProperty {Maybe (Value Integer)
()
haddock_workaround_ :: BatchRetryStrategyProperty -> ()
attempts :: BatchRetryStrategyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attempts :: Maybe (Value Integer)
..}
    = BatchRetryStrategyProperty {attempts :: Maybe (Value Integer)
attempts = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Attempts" BatchRetryStrategyProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}