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