module Stratosphere.QuickSight.Dashboard.StaticFileSourceProperty (
module Exports, StaticFileSourceProperty(..),
mkStaticFileSourceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.StaticFileS3SourceOptionsProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.StaticFileUrlSourceOptionsProperty as Exports
import Stratosphere.ResourceProperties
data StaticFileSourceProperty
=
StaticFileSourceProperty {StaticFileSourceProperty -> ()
haddock_workaround_ :: (),
StaticFileSourceProperty -> Maybe StaticFileS3SourceOptionsProperty
s3Options :: (Prelude.Maybe StaticFileS3SourceOptionsProperty),
StaticFileSourceProperty
-> Maybe StaticFileUrlSourceOptionsProperty
urlOptions :: (Prelude.Maybe StaticFileUrlSourceOptionsProperty)}
deriving stock (StaticFileSourceProperty -> StaticFileSourceProperty -> Bool
(StaticFileSourceProperty -> StaticFileSourceProperty -> Bool)
-> (StaticFileSourceProperty -> StaticFileSourceProperty -> Bool)
-> Eq StaticFileSourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StaticFileSourceProperty -> StaticFileSourceProperty -> Bool
== :: StaticFileSourceProperty -> StaticFileSourceProperty -> Bool
$c/= :: StaticFileSourceProperty -> StaticFileSourceProperty -> Bool
/= :: StaticFileSourceProperty -> StaticFileSourceProperty -> Bool
Prelude.Eq, Int -> StaticFileSourceProperty -> ShowS
[StaticFileSourceProperty] -> ShowS
StaticFileSourceProperty -> String
(Int -> StaticFileSourceProperty -> ShowS)
-> (StaticFileSourceProperty -> String)
-> ([StaticFileSourceProperty] -> ShowS)
-> Show StaticFileSourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StaticFileSourceProperty -> ShowS
showsPrec :: Int -> StaticFileSourceProperty -> ShowS
$cshow :: StaticFileSourceProperty -> String
show :: StaticFileSourceProperty -> String
$cshowList :: [StaticFileSourceProperty] -> ShowS
showList :: [StaticFileSourceProperty] -> ShowS
Prelude.Show)
mkStaticFileSourceProperty :: StaticFileSourceProperty
mkStaticFileSourceProperty :: StaticFileSourceProperty
mkStaticFileSourceProperty
= StaticFileSourceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), s3Options :: Maybe StaticFileS3SourceOptionsProperty
s3Options = Maybe StaticFileS3SourceOptionsProperty
forall a. Maybe a
Prelude.Nothing,
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
urlOptions = Maybe StaticFileUrlSourceOptionsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StaticFileSourceProperty where
toResourceProperties :: StaticFileSourceProperty -> ResourceProperties
toResourceProperties StaticFileSourceProperty {Maybe StaticFileS3SourceOptionsProperty
Maybe StaticFileUrlSourceOptionsProperty
()
haddock_workaround_ :: StaticFileSourceProperty -> ()
s3Options :: StaticFileSourceProperty -> Maybe StaticFileS3SourceOptionsProperty
urlOptions :: StaticFileSourceProperty
-> Maybe StaticFileUrlSourceOptionsProperty
haddock_workaround_ :: ()
s3Options :: Maybe StaticFileS3SourceOptionsProperty
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Dashboard.StaticFileSource",
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 -> StaticFileS3SourceOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3Options" (StaticFileS3SourceOptionsProperty -> (Key, Value))
-> Maybe StaticFileS3SourceOptionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticFileS3SourceOptionsProperty
s3Options,
Key -> StaticFileUrlSourceOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UrlOptions" (StaticFileUrlSourceOptionsProperty -> (Key, Value))
-> Maybe StaticFileUrlSourceOptionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticFileUrlSourceOptionsProperty
urlOptions])}
instance JSON.ToJSON StaticFileSourceProperty where
toJSON :: StaticFileSourceProperty -> Value
toJSON StaticFileSourceProperty {Maybe StaticFileS3SourceOptionsProperty
Maybe StaticFileUrlSourceOptionsProperty
()
haddock_workaround_ :: StaticFileSourceProperty -> ()
s3Options :: StaticFileSourceProperty -> Maybe StaticFileS3SourceOptionsProperty
urlOptions :: StaticFileSourceProperty
-> Maybe StaticFileUrlSourceOptionsProperty
haddock_workaround_ :: ()
s3Options :: Maybe StaticFileS3SourceOptionsProperty
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
..}
= [(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 -> StaticFileS3SourceOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3Options" (StaticFileS3SourceOptionsProperty -> (Key, Value))
-> Maybe StaticFileS3SourceOptionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticFileS3SourceOptionsProperty
s3Options,
Key -> StaticFileUrlSourceOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UrlOptions" (StaticFileUrlSourceOptionsProperty -> (Key, Value))
-> Maybe StaticFileUrlSourceOptionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticFileUrlSourceOptionsProperty
urlOptions]))
instance Property "S3Options" StaticFileSourceProperty where
type PropertyType "S3Options" StaticFileSourceProperty = StaticFileS3SourceOptionsProperty
set :: PropertyType "S3Options" StaticFileSourceProperty
-> StaticFileSourceProperty -> StaticFileSourceProperty
set PropertyType "S3Options" StaticFileSourceProperty
newValue StaticFileSourceProperty {Maybe StaticFileS3SourceOptionsProperty
Maybe StaticFileUrlSourceOptionsProperty
()
haddock_workaround_ :: StaticFileSourceProperty -> ()
s3Options :: StaticFileSourceProperty -> Maybe StaticFileS3SourceOptionsProperty
urlOptions :: StaticFileSourceProperty
-> Maybe StaticFileUrlSourceOptionsProperty
haddock_workaround_ :: ()
s3Options :: Maybe StaticFileS3SourceOptionsProperty
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
..}
= StaticFileSourceProperty {s3Options :: Maybe StaticFileS3SourceOptionsProperty
s3Options = StaticFileS3SourceOptionsProperty
-> Maybe StaticFileS3SourceOptionsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3Options" StaticFileSourceProperty
StaticFileS3SourceOptionsProperty
newValue, Maybe StaticFileUrlSourceOptionsProperty
()
haddock_workaround_ :: ()
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
haddock_workaround_ :: ()
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
..}
instance Property "UrlOptions" StaticFileSourceProperty where
type PropertyType "UrlOptions" StaticFileSourceProperty = StaticFileUrlSourceOptionsProperty
set :: PropertyType "UrlOptions" StaticFileSourceProperty
-> StaticFileSourceProperty -> StaticFileSourceProperty
set PropertyType "UrlOptions" StaticFileSourceProperty
newValue StaticFileSourceProperty {Maybe StaticFileS3SourceOptionsProperty
Maybe StaticFileUrlSourceOptionsProperty
()
haddock_workaround_ :: StaticFileSourceProperty -> ()
s3Options :: StaticFileSourceProperty -> Maybe StaticFileS3SourceOptionsProperty
urlOptions :: StaticFileSourceProperty
-> Maybe StaticFileUrlSourceOptionsProperty
haddock_workaround_ :: ()
s3Options :: Maybe StaticFileS3SourceOptionsProperty
urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
..}
= StaticFileSourceProperty {urlOptions :: Maybe StaticFileUrlSourceOptionsProperty
urlOptions = StaticFileUrlSourceOptionsProperty
-> Maybe StaticFileUrlSourceOptionsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UrlOptions" StaticFileSourceProperty
StaticFileUrlSourceOptionsProperty
newValue, Maybe StaticFileS3SourceOptionsProperty
()
haddock_workaround_ :: ()
s3Options :: Maybe StaticFileS3SourceOptionsProperty
haddock_workaround_ :: ()
s3Options :: Maybe StaticFileS3SourceOptionsProperty
..}