module Stratosphere.QuickSight.Dashboard.StaticFileProperty (
        module Exports, StaticFileProperty(..), mkStaticFileProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.ImageStaticFileProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.SpatialStaticFileProperty as Exports
import Stratosphere.ResourceProperties
data StaticFileProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-staticfile.html>
    StaticFileProperty {StaticFileProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-staticfile.html#cfn-quicksight-dashboard-staticfile-imagestaticfile>
                        StaticFileProperty -> Maybe ImageStaticFileProperty
imageStaticFile :: (Prelude.Maybe ImageStaticFileProperty),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-staticfile.html#cfn-quicksight-dashboard-staticfile-spatialstaticfile>
                        StaticFileProperty -> Maybe SpatialStaticFileProperty
spatialStaticFile :: (Prelude.Maybe SpatialStaticFileProperty)}
  deriving stock (StaticFileProperty -> StaticFileProperty -> Bool
(StaticFileProperty -> StaticFileProperty -> Bool)
-> (StaticFileProperty -> StaticFileProperty -> Bool)
-> Eq StaticFileProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StaticFileProperty -> StaticFileProperty -> Bool
== :: StaticFileProperty -> StaticFileProperty -> Bool
$c/= :: StaticFileProperty -> StaticFileProperty -> Bool
/= :: StaticFileProperty -> StaticFileProperty -> Bool
Prelude.Eq, Int -> StaticFileProperty -> ShowS
[StaticFileProperty] -> ShowS
StaticFileProperty -> String
(Int -> StaticFileProperty -> ShowS)
-> (StaticFileProperty -> String)
-> ([StaticFileProperty] -> ShowS)
-> Show StaticFileProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StaticFileProperty -> ShowS
showsPrec :: Int -> StaticFileProperty -> ShowS
$cshow :: StaticFileProperty -> String
show :: StaticFileProperty -> String
$cshowList :: [StaticFileProperty] -> ShowS
showList :: [StaticFileProperty] -> ShowS
Prelude.Show)
mkStaticFileProperty :: StaticFileProperty
mkStaticFileProperty :: StaticFileProperty
mkStaticFileProperty
  = StaticFileProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), imageStaticFile :: Maybe ImageStaticFileProperty
imageStaticFile = Maybe ImageStaticFileProperty
forall a. Maybe a
Prelude.Nothing,
       spatialStaticFile :: Maybe SpatialStaticFileProperty
spatialStaticFile = Maybe SpatialStaticFileProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StaticFileProperty where
  toResourceProperties :: StaticFileProperty -> ResourceProperties
toResourceProperties StaticFileProperty {Maybe SpatialStaticFileProperty
Maybe ImageStaticFileProperty
()
haddock_workaround_ :: StaticFileProperty -> ()
imageStaticFile :: StaticFileProperty -> Maybe ImageStaticFileProperty
spatialStaticFile :: StaticFileProperty -> Maybe SpatialStaticFileProperty
haddock_workaround_ :: ()
imageStaticFile :: Maybe ImageStaticFileProperty
spatialStaticFile :: Maybe SpatialStaticFileProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Dashboard.StaticFile",
         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 -> ImageStaticFileProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ImageStaticFile" (ImageStaticFileProperty -> (Key, Value))
-> Maybe ImageStaticFileProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImageStaticFileProperty
imageStaticFile,
                            Key -> SpatialStaticFileProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SpatialStaticFile" (SpatialStaticFileProperty -> (Key, Value))
-> Maybe SpatialStaticFileProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpatialStaticFileProperty
spatialStaticFile])}
instance JSON.ToJSON StaticFileProperty where
  toJSON :: StaticFileProperty -> Value
toJSON StaticFileProperty {Maybe SpatialStaticFileProperty
Maybe ImageStaticFileProperty
()
haddock_workaround_ :: StaticFileProperty -> ()
imageStaticFile :: StaticFileProperty -> Maybe ImageStaticFileProperty
spatialStaticFile :: StaticFileProperty -> Maybe SpatialStaticFileProperty
haddock_workaround_ :: ()
imageStaticFile :: Maybe ImageStaticFileProperty
spatialStaticFile :: Maybe SpatialStaticFileProperty
..}
    = [(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 -> ImageStaticFileProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ImageStaticFile" (ImageStaticFileProperty -> (Key, Value))
-> Maybe ImageStaticFileProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImageStaticFileProperty
imageStaticFile,
               Key -> SpatialStaticFileProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SpatialStaticFile" (SpatialStaticFileProperty -> (Key, Value))
-> Maybe SpatialStaticFileProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpatialStaticFileProperty
spatialStaticFile]))
instance Property "ImageStaticFile" StaticFileProperty where
  type PropertyType "ImageStaticFile" StaticFileProperty = ImageStaticFileProperty
  set :: PropertyType "ImageStaticFile" StaticFileProperty
-> StaticFileProperty -> StaticFileProperty
set PropertyType "ImageStaticFile" StaticFileProperty
newValue StaticFileProperty {Maybe SpatialStaticFileProperty
Maybe ImageStaticFileProperty
()
haddock_workaround_ :: StaticFileProperty -> ()
imageStaticFile :: StaticFileProperty -> Maybe ImageStaticFileProperty
spatialStaticFile :: StaticFileProperty -> Maybe SpatialStaticFileProperty
haddock_workaround_ :: ()
imageStaticFile :: Maybe ImageStaticFileProperty
spatialStaticFile :: Maybe SpatialStaticFileProperty
..}
    = StaticFileProperty {imageStaticFile :: Maybe ImageStaticFileProperty
imageStaticFile = ImageStaticFileProperty -> Maybe ImageStaticFileProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ImageStaticFile" StaticFileProperty
ImageStaticFileProperty
newValue, Maybe SpatialStaticFileProperty
()
haddock_workaround_ :: ()
spatialStaticFile :: Maybe SpatialStaticFileProperty
haddock_workaround_ :: ()
spatialStaticFile :: Maybe SpatialStaticFileProperty
..}
instance Property "SpatialStaticFile" StaticFileProperty where
  type PropertyType "SpatialStaticFile" StaticFileProperty = SpatialStaticFileProperty
  set :: PropertyType "SpatialStaticFile" StaticFileProperty
-> StaticFileProperty -> StaticFileProperty
set PropertyType "SpatialStaticFile" StaticFileProperty
newValue StaticFileProperty {Maybe SpatialStaticFileProperty
Maybe ImageStaticFileProperty
()
haddock_workaround_ :: StaticFileProperty -> ()
imageStaticFile :: StaticFileProperty -> Maybe ImageStaticFileProperty
spatialStaticFile :: StaticFileProperty -> Maybe SpatialStaticFileProperty
haddock_workaround_ :: ()
imageStaticFile :: Maybe ImageStaticFileProperty
spatialStaticFile :: Maybe SpatialStaticFileProperty
..}
    = StaticFileProperty
        {spatialStaticFile :: Maybe SpatialStaticFileProperty
spatialStaticFile = SpatialStaticFileProperty -> Maybe SpatialStaticFileProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SpatialStaticFile" StaticFileProperty
SpatialStaticFileProperty
newValue, Maybe ImageStaticFileProperty
()
haddock_workaround_ :: ()
imageStaticFile :: Maybe ImageStaticFileProperty
haddock_workaround_ :: ()
imageStaticFile :: Maybe ImageStaticFileProperty
..}