module Stratosphere.AppFlow.Flow.SuccessResponseHandlingConfigProperty (
        SuccessResponseHandlingConfigProperty(..),
        mkSuccessResponseHandlingConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SuccessResponseHandlingConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-successresponsehandlingconfig.html>
    SuccessResponseHandlingConfigProperty {SuccessResponseHandlingConfigProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-successresponsehandlingconfig.html#cfn-appflow-flow-successresponsehandlingconfig-bucketname>
                                           SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
bucketName :: (Prelude.Maybe (Value Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-successresponsehandlingconfig.html#cfn-appflow-flow-successresponsehandlingconfig-bucketprefix>
                                           SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty -> Bool
(SuccessResponseHandlingConfigProperty
 -> SuccessResponseHandlingConfigProperty -> Bool)
-> (SuccessResponseHandlingConfigProperty
    -> SuccessResponseHandlingConfigProperty -> Bool)
-> Eq SuccessResponseHandlingConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty -> Bool
== :: SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty -> Bool
$c/= :: SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty -> Bool
/= :: SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty -> Bool
Prelude.Eq, Int -> SuccessResponseHandlingConfigProperty -> ShowS
[SuccessResponseHandlingConfigProperty] -> ShowS
SuccessResponseHandlingConfigProperty -> String
(Int -> SuccessResponseHandlingConfigProperty -> ShowS)
-> (SuccessResponseHandlingConfigProperty -> String)
-> ([SuccessResponseHandlingConfigProperty] -> ShowS)
-> Show SuccessResponseHandlingConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SuccessResponseHandlingConfigProperty -> ShowS
showsPrec :: Int -> SuccessResponseHandlingConfigProperty -> ShowS
$cshow :: SuccessResponseHandlingConfigProperty -> String
show :: SuccessResponseHandlingConfigProperty -> String
$cshowList :: [SuccessResponseHandlingConfigProperty] -> ShowS
showList :: [SuccessResponseHandlingConfigProperty] -> ShowS
Prelude.Show)
mkSuccessResponseHandlingConfigProperty ::
  SuccessResponseHandlingConfigProperty
mkSuccessResponseHandlingConfigProperty :: SuccessResponseHandlingConfigProperty
mkSuccessResponseHandlingConfigProperty
  = SuccessResponseHandlingConfigProperty
      {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}
instance ToResourceProperties SuccessResponseHandlingConfigProperty where
  toResourceProperties :: SuccessResponseHandlingConfigProperty -> ResourceProperties
toResourceProperties SuccessResponseHandlingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SuccessResponseHandlingConfigProperty -> ()
bucketName :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::Flow.SuccessResponseHandlingConfig",
         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])}
instance JSON.ToJSON SuccessResponseHandlingConfigProperty where
  toJSON :: SuccessResponseHandlingConfigProperty -> Value
toJSON SuccessResponseHandlingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SuccessResponseHandlingConfigProperty -> ()
bucketName :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: 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
"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]))
instance Property "BucketName" SuccessResponseHandlingConfigProperty where
  type PropertyType "BucketName" SuccessResponseHandlingConfigProperty = Value Prelude.Text
  set :: PropertyType "BucketName" SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty
set PropertyType "BucketName" SuccessResponseHandlingConfigProperty
newValue SuccessResponseHandlingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SuccessResponseHandlingConfigProperty -> ()
bucketName :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
..}
    = SuccessResponseHandlingConfigProperty
        {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" SuccessResponseHandlingConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketPrefix :: Maybe (Value Text)
..}
instance Property "BucketPrefix" SuccessResponseHandlingConfigProperty where
  type PropertyType "BucketPrefix" SuccessResponseHandlingConfigProperty = Value Prelude.Text
  set :: PropertyType "BucketPrefix" SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty
-> SuccessResponseHandlingConfigProperty
set PropertyType "BucketPrefix" SuccessResponseHandlingConfigProperty
newValue SuccessResponseHandlingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SuccessResponseHandlingConfigProperty -> ()
bucketName :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
bucketPrefix :: SuccessResponseHandlingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
bucketPrefix :: Maybe (Value Text)
..}
    = SuccessResponseHandlingConfigProperty
        {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" SuccessResponseHandlingConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
..}