module Stratosphere.AppFlow.Flow.S3DestinationPropertiesProperty (
        module Exports, S3DestinationPropertiesProperty(..),
        mkS3DestinationPropertiesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppFlow.Flow.S3OutputFormatConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3DestinationPropertiesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-s3destinationproperties.html>
    S3DestinationPropertiesProperty {S3DestinationPropertiesProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-s3destinationproperties.html#cfn-appflow-flow-s3destinationproperties-bucketname>
                                     S3DestinationPropertiesProperty -> Value Text
bucketName :: (Value Prelude.Text),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-s3destinationproperties.html#cfn-appflow-flow-s3destinationproperties-bucketprefix>
                                     S3DestinationPropertiesProperty -> Maybe (Value Text)
bucketPrefix :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-s3destinationproperties.html#cfn-appflow-flow-s3destinationproperties-s3outputformatconfig>
                                     S3DestinationPropertiesProperty
-> Maybe S3OutputFormatConfigProperty
s3OutputFormatConfig :: (Prelude.Maybe S3OutputFormatConfigProperty)}
  deriving stock (S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty -> Bool
(S3DestinationPropertiesProperty
 -> S3DestinationPropertiesProperty -> Bool)
-> (S3DestinationPropertiesProperty
    -> S3DestinationPropertiesProperty -> Bool)
-> Eq S3DestinationPropertiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty -> Bool
== :: S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty -> Bool
$c/= :: S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty -> Bool
/= :: S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty -> Bool
Prelude.Eq, Int -> S3DestinationPropertiesProperty -> ShowS
[S3DestinationPropertiesProperty] -> ShowS
S3DestinationPropertiesProperty -> String
(Int -> S3DestinationPropertiesProperty -> ShowS)
-> (S3DestinationPropertiesProperty -> String)
-> ([S3DestinationPropertiesProperty] -> ShowS)
-> Show S3DestinationPropertiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3DestinationPropertiesProperty -> ShowS
showsPrec :: Int -> S3DestinationPropertiesProperty -> ShowS
$cshow :: S3DestinationPropertiesProperty -> String
show :: S3DestinationPropertiesProperty -> String
$cshowList :: [S3DestinationPropertiesProperty] -> ShowS
showList :: [S3DestinationPropertiesProperty] -> ShowS
Prelude.Show)
mkS3DestinationPropertiesProperty ::
  Value Prelude.Text -> S3DestinationPropertiesProperty
mkS3DestinationPropertiesProperty :: Value Text -> S3DestinationPropertiesProperty
mkS3DestinationPropertiesProperty Value Text
bucketName
  = S3DestinationPropertiesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucketName :: Value Text
bucketName = Value Text
bucketName,
       bucketPrefix :: Maybe (Value Text)
bucketPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
s3OutputFormatConfig = Maybe S3OutputFormatConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3DestinationPropertiesProperty where
  toResourceProperties :: S3DestinationPropertiesProperty -> ResourceProperties
toResourceProperties S3DestinationPropertiesProperty {Maybe (Value Text)
Maybe S3OutputFormatConfigProperty
()
Value Text
haddock_workaround_ :: S3DestinationPropertiesProperty -> ()
bucketName :: S3DestinationPropertiesProperty -> Value Text
bucketPrefix :: S3DestinationPropertiesProperty -> Maybe (Value Text)
s3OutputFormatConfig :: S3DestinationPropertiesProperty
-> Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::Flow.S3DestinationProperties",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"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..= Value Text
bucketName]
                           ([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
"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 -> S3OutputFormatConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3OutputFormatConfig"
                                 (S3OutputFormatConfigProperty -> (Key, Value))
-> Maybe S3OutputFormatConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3OutputFormatConfigProperty
s3OutputFormatConfig]))}
instance JSON.ToJSON S3DestinationPropertiesProperty where
  toJSON :: S3DestinationPropertiesProperty -> Value
toJSON S3DestinationPropertiesProperty {Maybe (Value Text)
Maybe S3OutputFormatConfigProperty
()
Value Text
haddock_workaround_ :: S3DestinationPropertiesProperty -> ()
bucketName :: S3DestinationPropertiesProperty -> Value Text
bucketPrefix :: S3DestinationPropertiesProperty -> Maybe (Value Text)
s3OutputFormatConfig :: S3DestinationPropertiesProperty
-> Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"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..= Value Text
bucketName]
              ([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
"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 -> S3OutputFormatConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3OutputFormatConfig"
                    (S3OutputFormatConfigProperty -> (Key, Value))
-> Maybe S3OutputFormatConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3OutputFormatConfigProperty
s3OutputFormatConfig])))
instance Property "BucketName" S3DestinationPropertiesProperty where
  type PropertyType "BucketName" S3DestinationPropertiesProperty = Value Prelude.Text
  set :: PropertyType "BucketName" S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty
set PropertyType "BucketName" S3DestinationPropertiesProperty
newValue S3DestinationPropertiesProperty {Maybe (Value Text)
Maybe S3OutputFormatConfigProperty
()
Value Text
haddock_workaround_ :: S3DestinationPropertiesProperty -> ()
bucketName :: S3DestinationPropertiesProperty -> Value Text
bucketPrefix :: S3DestinationPropertiesProperty -> Maybe (Value Text)
s3OutputFormatConfig :: S3DestinationPropertiesProperty
-> Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
    = S3DestinationPropertiesProperty {bucketName :: Value Text
bucketName = PropertyType "BucketName" S3DestinationPropertiesProperty
Value Text
newValue, Maybe (Value Text)
Maybe S3OutputFormatConfigProperty
()
haddock_workaround_ :: ()
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
instance Property "BucketPrefix" S3DestinationPropertiesProperty where
  type PropertyType "BucketPrefix" S3DestinationPropertiesProperty = Value Prelude.Text
  set :: PropertyType "BucketPrefix" S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty
set PropertyType "BucketPrefix" S3DestinationPropertiesProperty
newValue S3DestinationPropertiesProperty {Maybe (Value Text)
Maybe S3OutputFormatConfigProperty
()
Value Text
haddock_workaround_ :: S3DestinationPropertiesProperty -> ()
bucketName :: S3DestinationPropertiesProperty -> Value Text
bucketPrefix :: S3DestinationPropertiesProperty -> Maybe (Value Text)
s3OutputFormatConfig :: S3DestinationPropertiesProperty
-> Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
    = S3DestinationPropertiesProperty
        {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" S3DestinationPropertiesProperty
Value Text
newValue, Maybe S3OutputFormatConfigProperty
()
Value Text
haddock_workaround_ :: ()
bucketName :: Value Text
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketName :: Value Text
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
instance Property "S3OutputFormatConfig" S3DestinationPropertiesProperty where
  type PropertyType "S3OutputFormatConfig" S3DestinationPropertiesProperty = S3OutputFormatConfigProperty
  set :: PropertyType "S3OutputFormatConfig" S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty
-> S3DestinationPropertiesProperty
set PropertyType "S3OutputFormatConfig" S3DestinationPropertiesProperty
newValue S3DestinationPropertiesProperty {Maybe (Value Text)
Maybe S3OutputFormatConfigProperty
()
Value Text
haddock_workaround_ :: S3DestinationPropertiesProperty -> ()
bucketName :: S3DestinationPropertiesProperty -> Value Text
bucketPrefix :: S3DestinationPropertiesProperty -> Maybe (Value Text)
s3OutputFormatConfig :: S3DestinationPropertiesProperty
-> Maybe S3OutputFormatConfigProperty
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
..}
    = S3DestinationPropertiesProperty
        {s3OutputFormatConfig :: Maybe S3OutputFormatConfigProperty
s3OutputFormatConfig = S3OutputFormatConfigProperty -> Maybe S3OutputFormatConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3OutputFormatConfig" S3DestinationPropertiesProperty
S3OutputFormatConfigProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
bucketPrefix :: Maybe (Value Text)
..}