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