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