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