module Stratosphere.AppFlow.Flow.ErrorHandlingConfigProperty (
        ErrorHandlingConfigProperty(..), mkErrorHandlingConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ErrorHandlingConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-errorhandlingconfig.html>
    ErrorHandlingConfigProperty {ErrorHandlingConfigProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-errorhandlingconfig.html#cfn-appflow-flow-errorhandlingconfig-bucketname>
                                 ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketName :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-errorhandlingconfig.html#cfn-appflow-flow-errorhandlingconfig-bucketprefix>
                                 ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-errorhandlingconfig.html#cfn-appflow-flow-errorhandlingconfig-failonfirsterror>
                                 ErrorHandlingConfigProperty -> Maybe (Value Bool)
failOnFirstError :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty -> Bool
(ErrorHandlingConfigProperty
 -> ErrorHandlingConfigProperty -> Bool)
-> (ErrorHandlingConfigProperty
    -> ErrorHandlingConfigProperty -> Bool)
-> Eq ErrorHandlingConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty -> Bool
== :: ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty -> Bool
$c/= :: ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty -> Bool
/= :: ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty -> Bool
Prelude.Eq, Int -> ErrorHandlingConfigProperty -> ShowS
[ErrorHandlingConfigProperty] -> ShowS
ErrorHandlingConfigProperty -> String
(Int -> ErrorHandlingConfigProperty -> ShowS)
-> (ErrorHandlingConfigProperty -> String)
-> ([ErrorHandlingConfigProperty] -> ShowS)
-> Show ErrorHandlingConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ErrorHandlingConfigProperty -> ShowS
showsPrec :: Int -> ErrorHandlingConfigProperty -> ShowS
$cshow :: ErrorHandlingConfigProperty -> String
show :: ErrorHandlingConfigProperty -> String
$cshowList :: [ErrorHandlingConfigProperty] -> ShowS
showList :: [ErrorHandlingConfigProperty] -> ShowS
Prelude.Show)
mkErrorHandlingConfigProperty :: ErrorHandlingConfigProperty
mkErrorHandlingConfigProperty :: ErrorHandlingConfigProperty
mkErrorHandlingConfigProperty
  = ErrorHandlingConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucketName :: Maybe (Value Text)
bucketName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       bucketPrefix :: Maybe (Value Text)
bucketPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, failOnFirstError :: Maybe (Value Bool)
failOnFirstError = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ErrorHandlingConfigProperty where
  toResourceProperties :: ErrorHandlingConfigProperty -> ResourceProperties
toResourceProperties ErrorHandlingConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ErrorHandlingConfigProperty -> ()
bucketName :: ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: ErrorHandlingConfigProperty -> Maybe (Value Text)
failOnFirstError :: ErrorHandlingConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::Flow.ErrorHandlingConfig",
         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
"BucketName" (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)
bucketName,
                            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
"BucketPrefix" (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)
bucketPrefix,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FailOnFirstError" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
failOnFirstError])}
instance JSON.ToJSON ErrorHandlingConfigProperty where
  toJSON :: ErrorHandlingConfigProperty -> Value
toJSON ErrorHandlingConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ErrorHandlingConfigProperty -> ()
bucketName :: ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: ErrorHandlingConfigProperty -> Maybe (Value Text)
failOnFirstError :: ErrorHandlingConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
    = [(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
"BucketName" (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)
bucketName,
               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
"BucketPrefix" (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)
bucketPrefix,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FailOnFirstError" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
failOnFirstError]))
instance Property "BucketName" ErrorHandlingConfigProperty where
  type PropertyType "BucketName" ErrorHandlingConfigProperty = Value Prelude.Text
  set :: PropertyType "BucketName" ErrorHandlingConfigProperty
-> ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty
set PropertyType "BucketName" ErrorHandlingConfigProperty
newValue ErrorHandlingConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ErrorHandlingConfigProperty -> ()
bucketName :: ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: ErrorHandlingConfigProperty -> Maybe (Value Text)
failOnFirstError :: ErrorHandlingConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
    = ErrorHandlingConfigProperty
        {bucketName :: Maybe (Value Text)
bucketName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketName" ErrorHandlingConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
haddock_workaround_ :: ()
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
instance Property "BucketPrefix" ErrorHandlingConfigProperty where
  type PropertyType "BucketPrefix" ErrorHandlingConfigProperty = Value Prelude.Text
  set :: PropertyType "BucketPrefix" ErrorHandlingConfigProperty
-> ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty
set PropertyType "BucketPrefix" ErrorHandlingConfigProperty
newValue ErrorHandlingConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ErrorHandlingConfigProperty -> ()
bucketName :: ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: ErrorHandlingConfigProperty -> Maybe (Value Text)
failOnFirstError :: ErrorHandlingConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
    = ErrorHandlingConfigProperty
        {bucketPrefix :: Maybe (Value Text)
bucketPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketPrefix" ErrorHandlingConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
instance Property "FailOnFirstError" ErrorHandlingConfigProperty where
  type PropertyType "FailOnFirstError" ErrorHandlingConfigProperty = Value Prelude.Bool
  set :: PropertyType "FailOnFirstError" ErrorHandlingConfigProperty
-> ErrorHandlingConfigProperty -> ErrorHandlingConfigProperty
set PropertyType "FailOnFirstError" ErrorHandlingConfigProperty
newValue ErrorHandlingConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ErrorHandlingConfigProperty -> ()
bucketName :: ErrorHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: ErrorHandlingConfigProperty -> Maybe (Value Text)
failOnFirstError :: ErrorHandlingConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
failOnFirstError :: Maybe (Value Bool)
..}
    = ErrorHandlingConfigProperty
        {failOnFirstError :: Maybe (Value Bool)
failOnFirstError = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FailOnFirstError" ErrorHandlingConfigProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
..}