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