module Stratosphere.Scheduler.Schedule.RetryPolicyProperty (
RetryPolicyProperty(..), mkRetryPolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RetryPolicyProperty
=
RetryPolicyProperty {RetryPolicyProperty -> ()
haddock_workaround_ :: (),
RetryPolicyProperty -> Maybe (Value Double)
maximumEventAgeInSeconds :: (Prelude.Maybe (Value Prelude.Double)),
RetryPolicyProperty -> Maybe (Value Double)
maximumRetryAttempts :: (Prelude.Maybe (Value Prelude.Double))}
deriving stock (RetryPolicyProperty -> RetryPolicyProperty -> Bool
(RetryPolicyProperty -> RetryPolicyProperty -> Bool)
-> (RetryPolicyProperty -> RetryPolicyProperty -> Bool)
-> Eq RetryPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RetryPolicyProperty -> RetryPolicyProperty -> Bool
== :: RetryPolicyProperty -> RetryPolicyProperty -> Bool
$c/= :: RetryPolicyProperty -> RetryPolicyProperty -> Bool
/= :: RetryPolicyProperty -> RetryPolicyProperty -> Bool
Prelude.Eq, Int -> RetryPolicyProperty -> ShowS
[RetryPolicyProperty] -> ShowS
RetryPolicyProperty -> String
(Int -> RetryPolicyProperty -> ShowS)
-> (RetryPolicyProperty -> String)
-> ([RetryPolicyProperty] -> ShowS)
-> Show RetryPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RetryPolicyProperty -> ShowS
showsPrec :: Int -> RetryPolicyProperty -> ShowS
$cshow :: RetryPolicyProperty -> String
show :: RetryPolicyProperty -> String
$cshowList :: [RetryPolicyProperty] -> ShowS
showList :: [RetryPolicyProperty] -> ShowS
Prelude.Show)
mkRetryPolicyProperty :: RetryPolicyProperty
mkRetryPolicyProperty :: RetryPolicyProperty
mkRetryPolicyProperty
= RetryPolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
maximumEventAgeInSeconds :: Maybe (Value Double)
maximumEventAgeInSeconds = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
maximumRetryAttempts :: Maybe (Value Double)
maximumRetryAttempts = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RetryPolicyProperty where
toResourceProperties :: RetryPolicyProperty -> ResourceProperties
toResourceProperties RetryPolicyProperty {Maybe (Value Double)
()
haddock_workaround_ :: RetryPolicyProperty -> ()
maximumEventAgeInSeconds :: RetryPolicyProperty -> Maybe (Value Double)
maximumRetryAttempts :: RetryPolicyProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumEventAgeInSeconds :: Maybe (Value Double)
maximumRetryAttempts :: Maybe (Value Double)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Scheduler::Schedule.RetryPolicy",
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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumEventAgeInSeconds"
(Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maximumEventAgeInSeconds,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumRetryAttempts"
(Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maximumRetryAttempts])}
instance JSON.ToJSON RetryPolicyProperty where
toJSON :: RetryPolicyProperty -> Value
toJSON RetryPolicyProperty {Maybe (Value Double)
()
haddock_workaround_ :: RetryPolicyProperty -> ()
maximumEventAgeInSeconds :: RetryPolicyProperty -> Maybe (Value Double)
maximumRetryAttempts :: RetryPolicyProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumEventAgeInSeconds :: Maybe (Value Double)
maximumRetryAttempts :: Maybe (Value Double)
..}
= [(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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumEventAgeInSeconds"
(Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maximumEventAgeInSeconds,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumRetryAttempts"
(Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maximumRetryAttempts]))
instance Property "MaximumEventAgeInSeconds" RetryPolicyProperty where
type PropertyType "MaximumEventAgeInSeconds" RetryPolicyProperty = Value Prelude.Double
set :: PropertyType "MaximumEventAgeInSeconds" RetryPolicyProperty
-> RetryPolicyProperty -> RetryPolicyProperty
set PropertyType "MaximumEventAgeInSeconds" RetryPolicyProperty
newValue RetryPolicyProperty {Maybe (Value Double)
()
haddock_workaround_ :: RetryPolicyProperty -> ()
maximumEventAgeInSeconds :: RetryPolicyProperty -> Maybe (Value Double)
maximumRetryAttempts :: RetryPolicyProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumEventAgeInSeconds :: Maybe (Value Double)
maximumRetryAttempts :: Maybe (Value Double)
..}
= RetryPolicyProperty
{maximumEventAgeInSeconds :: Maybe (Value Double)
maximumEventAgeInSeconds = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumEventAgeInSeconds" RetryPolicyProperty
Value Double
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
maximumRetryAttempts :: Maybe (Value Double)
haddock_workaround_ :: ()
maximumRetryAttempts :: Maybe (Value Double)
..}
instance Property "MaximumRetryAttempts" RetryPolicyProperty where
type PropertyType "MaximumRetryAttempts" RetryPolicyProperty = Value Prelude.Double
set :: PropertyType "MaximumRetryAttempts" RetryPolicyProperty
-> RetryPolicyProperty -> RetryPolicyProperty
set PropertyType "MaximumRetryAttempts" RetryPolicyProperty
newValue RetryPolicyProperty {Maybe (Value Double)
()
haddock_workaround_ :: RetryPolicyProperty -> ()
maximumEventAgeInSeconds :: RetryPolicyProperty -> Maybe (Value Double)
maximumRetryAttempts :: RetryPolicyProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumEventAgeInSeconds :: Maybe (Value Double)
maximumRetryAttempts :: Maybe (Value Double)
..}
= RetryPolicyProperty
{maximumRetryAttempts :: Maybe (Value Double)
maximumRetryAttempts = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumRetryAttempts" RetryPolicyProperty
Value Double
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
maximumEventAgeInSeconds :: Maybe (Value Double)
haddock_workaround_ :: ()
maximumEventAgeInSeconds :: Maybe (Value Double)
..}