module Stratosphere.CodePipeline.Pipeline.FailureConditionsProperty (
        module Exports, FailureConditionsProperty(..),
        mkFailureConditionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodePipeline.Pipeline.ConditionProperty as Exports
import {-# SOURCE #-} Stratosphere.CodePipeline.Pipeline.RetryConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FailureConditionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-failureconditions.html>
    FailureConditionsProperty {FailureConditionsProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-failureconditions.html#cfn-codepipeline-pipeline-failureconditions-conditions>
                               FailureConditionsProperty -> Maybe [ConditionProperty]
conditions :: (Prelude.Maybe [ConditionProperty]),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-failureconditions.html#cfn-codepipeline-pipeline-failureconditions-result>
                               FailureConditionsProperty -> Maybe (Value Text)
result :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-failureconditions.html#cfn-codepipeline-pipeline-failureconditions-retryconfiguration>
                               FailureConditionsProperty -> Maybe RetryConfigurationProperty
retryConfiguration :: (Prelude.Maybe RetryConfigurationProperty)}
  deriving stock (FailureConditionsProperty -> FailureConditionsProperty -> Bool
(FailureConditionsProperty -> FailureConditionsProperty -> Bool)
-> (FailureConditionsProperty -> FailureConditionsProperty -> Bool)
-> Eq FailureConditionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FailureConditionsProperty -> FailureConditionsProperty -> Bool
== :: FailureConditionsProperty -> FailureConditionsProperty -> Bool
$c/= :: FailureConditionsProperty -> FailureConditionsProperty -> Bool
/= :: FailureConditionsProperty -> FailureConditionsProperty -> Bool
Prelude.Eq, Int -> FailureConditionsProperty -> ShowS
[FailureConditionsProperty] -> ShowS
FailureConditionsProperty -> String
(Int -> FailureConditionsProperty -> ShowS)
-> (FailureConditionsProperty -> String)
-> ([FailureConditionsProperty] -> ShowS)
-> Show FailureConditionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FailureConditionsProperty -> ShowS
showsPrec :: Int -> FailureConditionsProperty -> ShowS
$cshow :: FailureConditionsProperty -> String
show :: FailureConditionsProperty -> String
$cshowList :: [FailureConditionsProperty] -> ShowS
showList :: [FailureConditionsProperty] -> ShowS
Prelude.Show)
mkFailureConditionsProperty :: FailureConditionsProperty
mkFailureConditionsProperty :: FailureConditionsProperty
mkFailureConditionsProperty
  = FailureConditionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), conditions :: Maybe [ConditionProperty]
conditions = Maybe [ConditionProperty]
forall a. Maybe a
Prelude.Nothing,
       result :: Maybe (Value Text)
result = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, retryConfiguration :: Maybe RetryConfigurationProperty
retryConfiguration = Maybe RetryConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FailureConditionsProperty where
  toResourceProperties :: FailureConditionsProperty -> ResourceProperties
toResourceProperties FailureConditionsProperty {Maybe [ConditionProperty]
Maybe (Value Text)
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: FailureConditionsProperty -> ()
conditions :: FailureConditionsProperty -> Maybe [ConditionProperty]
result :: FailureConditionsProperty -> Maybe (Value Text)
retryConfiguration :: FailureConditionsProperty -> Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodePipeline::Pipeline.FailureConditions",
         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 -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditions" ([ConditionProperty] -> (Key, Value))
-> Maybe [ConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionProperty]
conditions,
                            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
"Result" (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)
result,
                            Key -> RetryConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RetryConfiguration" (RetryConfigurationProperty -> (Key, Value))
-> Maybe RetryConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RetryConfigurationProperty
retryConfiguration])}
instance JSON.ToJSON FailureConditionsProperty where
  toJSON :: FailureConditionsProperty -> Value
toJSON FailureConditionsProperty {Maybe [ConditionProperty]
Maybe (Value Text)
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: FailureConditionsProperty -> ()
conditions :: FailureConditionsProperty -> Maybe [ConditionProperty]
result :: FailureConditionsProperty -> Maybe (Value Text)
retryConfiguration :: FailureConditionsProperty -> Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
..}
    = [(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 -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditions" ([ConditionProperty] -> (Key, Value))
-> Maybe [ConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionProperty]
conditions,
               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
"Result" (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)
result,
               Key -> RetryConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RetryConfiguration" (RetryConfigurationProperty -> (Key, Value))
-> Maybe RetryConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RetryConfigurationProperty
retryConfiguration]))
instance Property "Conditions" FailureConditionsProperty where
  type PropertyType "Conditions" FailureConditionsProperty = [ConditionProperty]
  set :: PropertyType "Conditions" FailureConditionsProperty
-> FailureConditionsProperty -> FailureConditionsProperty
set PropertyType "Conditions" FailureConditionsProperty
newValue FailureConditionsProperty {Maybe [ConditionProperty]
Maybe (Value Text)
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: FailureConditionsProperty -> ()
conditions :: FailureConditionsProperty -> Maybe [ConditionProperty]
result :: FailureConditionsProperty -> Maybe (Value Text)
retryConfiguration :: FailureConditionsProperty -> Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
..}
    = FailureConditionsProperty
        {conditions :: Maybe [ConditionProperty]
conditions = [ConditionProperty] -> Maybe [ConditionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConditionProperty]
PropertyType "Conditions" FailureConditionsProperty
newValue, Maybe (Value Text)
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: ()
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
..}
instance Property "Result" FailureConditionsProperty where
  type PropertyType "Result" FailureConditionsProperty = Value Prelude.Text
  set :: PropertyType "Result" FailureConditionsProperty
-> FailureConditionsProperty -> FailureConditionsProperty
set PropertyType "Result" FailureConditionsProperty
newValue FailureConditionsProperty {Maybe [ConditionProperty]
Maybe (Value Text)
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: FailureConditionsProperty -> ()
conditions :: FailureConditionsProperty -> Maybe [ConditionProperty]
result :: FailureConditionsProperty -> Maybe (Value Text)
retryConfiguration :: FailureConditionsProperty -> Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
..}
    = FailureConditionsProperty {result :: Maybe (Value Text)
result = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Result" FailureConditionsProperty
Value Text
newValue, Maybe [ConditionProperty]
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
retryConfiguration :: Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
retryConfiguration :: Maybe RetryConfigurationProperty
..}
instance Property "RetryConfiguration" FailureConditionsProperty where
  type PropertyType "RetryConfiguration" FailureConditionsProperty = RetryConfigurationProperty
  set :: PropertyType "RetryConfiguration" FailureConditionsProperty
-> FailureConditionsProperty -> FailureConditionsProperty
set PropertyType "RetryConfiguration" FailureConditionsProperty
newValue FailureConditionsProperty {Maybe [ConditionProperty]
Maybe (Value Text)
Maybe RetryConfigurationProperty
()
haddock_workaround_ :: FailureConditionsProperty -> ()
conditions :: FailureConditionsProperty -> Maybe [ConditionProperty]
result :: FailureConditionsProperty -> Maybe (Value Text)
retryConfiguration :: FailureConditionsProperty -> Maybe RetryConfigurationProperty
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
retryConfiguration :: Maybe RetryConfigurationProperty
..}
    = FailureConditionsProperty
        {retryConfiguration :: Maybe RetryConfigurationProperty
retryConfiguration = RetryConfigurationProperty -> Maybe RetryConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RetryConfiguration" FailureConditionsProperty
RetryConfigurationProperty
newValue, Maybe [ConditionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
result :: Maybe (Value Text)
..}