module Stratosphere.QuickSight.DataSet.S3SourceProperty (
        module Exports, S3SourceProperty(..), mkS3SourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.InputColumnProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.UploadSettingsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3SourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-s3source.html>
    S3SourceProperty {S3SourceProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-s3source.html#cfn-quicksight-dataset-s3source-datasourcearn>
                      S3SourceProperty -> Value Text
dataSourceArn :: (Value Prelude.Text),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-s3source.html#cfn-quicksight-dataset-s3source-inputcolumns>
                      S3SourceProperty -> Maybe [InputColumnProperty]
inputColumns :: (Prelude.Maybe [InputColumnProperty]),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-s3source.html#cfn-quicksight-dataset-s3source-uploadsettings>
                      S3SourceProperty -> Maybe UploadSettingsProperty
uploadSettings :: (Prelude.Maybe UploadSettingsProperty)}
  deriving stock (S3SourceProperty -> S3SourceProperty -> Bool
(S3SourceProperty -> S3SourceProperty -> Bool)
-> (S3SourceProperty -> S3SourceProperty -> Bool)
-> Eq S3SourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3SourceProperty -> S3SourceProperty -> Bool
== :: S3SourceProperty -> S3SourceProperty -> Bool
$c/= :: S3SourceProperty -> S3SourceProperty -> Bool
/= :: S3SourceProperty -> S3SourceProperty -> Bool
Prelude.Eq, Int -> S3SourceProperty -> ShowS
[S3SourceProperty] -> ShowS
S3SourceProperty -> String
(Int -> S3SourceProperty -> ShowS)
-> (S3SourceProperty -> String)
-> ([S3SourceProperty] -> ShowS)
-> Show S3SourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3SourceProperty -> ShowS
showsPrec :: Int -> S3SourceProperty -> ShowS
$cshow :: S3SourceProperty -> String
show :: S3SourceProperty -> String
$cshowList :: [S3SourceProperty] -> ShowS
showList :: [S3SourceProperty] -> ShowS
Prelude.Show)
mkS3SourceProperty :: Value Prelude.Text -> S3SourceProperty
mkS3SourceProperty :: Value Text -> S3SourceProperty
mkS3SourceProperty Value Text
dataSourceArn
  = S3SourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dataSourceArn :: Value Text
dataSourceArn = Value Text
dataSourceArn,
       inputColumns :: Maybe [InputColumnProperty]
inputColumns = Maybe [InputColumnProperty]
forall a. Maybe a
Prelude.Nothing, uploadSettings :: Maybe UploadSettingsProperty
uploadSettings = Maybe UploadSettingsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3SourceProperty where
  toResourceProperties :: S3SourceProperty -> ResourceProperties
toResourceProperties S3SourceProperty {Maybe [InputColumnProperty]
Maybe UploadSettingsProperty
()
Value Text
haddock_workaround_ :: S3SourceProperty -> ()
dataSourceArn :: S3SourceProperty -> Value Text
inputColumns :: S3SourceProperty -> Maybe [InputColumnProperty]
uploadSettings :: S3SourceProperty -> Maybe UploadSettingsProperty
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::DataSet.S3Source",
         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
"DataSourceArn" 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
dataSourceArn]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [InputColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputColumns" ([InputColumnProperty] -> (Key, Value))
-> Maybe [InputColumnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputColumnProperty]
inputColumns,
                               Key -> UploadSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UploadSettings" (UploadSettingsProperty -> (Key, Value))
-> Maybe UploadSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UploadSettingsProperty
uploadSettings]))}
instance JSON.ToJSON S3SourceProperty where
  toJSON :: S3SourceProperty -> Value
toJSON S3SourceProperty {Maybe [InputColumnProperty]
Maybe UploadSettingsProperty
()
Value Text
haddock_workaround_ :: S3SourceProperty -> ()
dataSourceArn :: S3SourceProperty -> Value Text
inputColumns :: S3SourceProperty -> Maybe [InputColumnProperty]
uploadSettings :: S3SourceProperty -> Maybe UploadSettingsProperty
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
..}
    = [(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
"DataSourceArn" 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
dataSourceArn]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [InputColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputColumns" ([InputColumnProperty] -> (Key, Value))
-> Maybe [InputColumnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputColumnProperty]
inputColumns,
                  Key -> UploadSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UploadSettings" (UploadSettingsProperty -> (Key, Value))
-> Maybe UploadSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UploadSettingsProperty
uploadSettings])))
instance Property "DataSourceArn" S3SourceProperty where
  type PropertyType "DataSourceArn" S3SourceProperty = Value Prelude.Text
  set :: PropertyType "DataSourceArn" S3SourceProperty
-> S3SourceProperty -> S3SourceProperty
set PropertyType "DataSourceArn" S3SourceProperty
newValue S3SourceProperty {Maybe [InputColumnProperty]
Maybe UploadSettingsProperty
()
Value Text
haddock_workaround_ :: S3SourceProperty -> ()
dataSourceArn :: S3SourceProperty -> Value Text
inputColumns :: S3SourceProperty -> Maybe [InputColumnProperty]
uploadSettings :: S3SourceProperty -> Maybe UploadSettingsProperty
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
..}
    = S3SourceProperty {dataSourceArn :: Value Text
dataSourceArn = PropertyType "DataSourceArn" S3SourceProperty
Value Text
newValue, Maybe [InputColumnProperty]
Maybe UploadSettingsProperty
()
haddock_workaround_ :: ()
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
haddock_workaround_ :: ()
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
..}
instance Property "InputColumns" S3SourceProperty where
  type PropertyType "InputColumns" S3SourceProperty = [InputColumnProperty]
  set :: PropertyType "InputColumns" S3SourceProperty
-> S3SourceProperty -> S3SourceProperty
set PropertyType "InputColumns" S3SourceProperty
newValue S3SourceProperty {Maybe [InputColumnProperty]
Maybe UploadSettingsProperty
()
Value Text
haddock_workaround_ :: S3SourceProperty -> ()
dataSourceArn :: S3SourceProperty -> Value Text
inputColumns :: S3SourceProperty -> Maybe [InputColumnProperty]
uploadSettings :: S3SourceProperty -> Maybe UploadSettingsProperty
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
..}
    = S3SourceProperty {inputColumns :: Maybe [InputColumnProperty]
inputColumns = [InputColumnProperty] -> Maybe [InputColumnProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [InputColumnProperty]
PropertyType "InputColumns" S3SourceProperty
newValue, Maybe UploadSettingsProperty
()
Value Text
haddock_workaround_ :: ()
dataSourceArn :: Value Text
uploadSettings :: Maybe UploadSettingsProperty
haddock_workaround_ :: ()
dataSourceArn :: Value Text
uploadSettings :: Maybe UploadSettingsProperty
..}
instance Property "UploadSettings" S3SourceProperty where
  type PropertyType "UploadSettings" S3SourceProperty = UploadSettingsProperty
  set :: PropertyType "UploadSettings" S3SourceProperty
-> S3SourceProperty -> S3SourceProperty
set PropertyType "UploadSettings" S3SourceProperty
newValue S3SourceProperty {Maybe [InputColumnProperty]
Maybe UploadSettingsProperty
()
Value Text
haddock_workaround_ :: S3SourceProperty -> ()
dataSourceArn :: S3SourceProperty -> Value Text
inputColumns :: S3SourceProperty -> Maybe [InputColumnProperty]
uploadSettings :: S3SourceProperty -> Maybe UploadSettingsProperty
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
uploadSettings :: Maybe UploadSettingsProperty
..}
    = S3SourceProperty {uploadSettings :: Maybe UploadSettingsProperty
uploadSettings = UploadSettingsProperty -> Maybe UploadSettingsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UploadSettings" S3SourceProperty
UploadSettingsProperty
newValue, Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
haddock_workaround_ :: ()
dataSourceArn :: Value Text
inputColumns :: Maybe [InputColumnProperty]
..}