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