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