module Stratosphere.QuickSight.Template.ShortFormatTextProperty (
        ShortFormatTextProperty(..), mkShortFormatTextProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ShortFormatTextProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-shortformattext.html>
    ShortFormatTextProperty {ShortFormatTextProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-shortformattext.html#cfn-quicksight-template-shortformattext-plaintext>
                             ShortFormatTextProperty -> Maybe (Value Text)
plainText :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-shortformattext.html#cfn-quicksight-template-shortformattext-richtext>
                             ShortFormatTextProperty -> Maybe (Value Text)
richText :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ShortFormatTextProperty -> ShortFormatTextProperty -> Bool
(ShortFormatTextProperty -> ShortFormatTextProperty -> Bool)
-> (ShortFormatTextProperty -> ShortFormatTextProperty -> Bool)
-> Eq ShortFormatTextProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ShortFormatTextProperty -> ShortFormatTextProperty -> Bool
== :: ShortFormatTextProperty -> ShortFormatTextProperty -> Bool
$c/= :: ShortFormatTextProperty -> ShortFormatTextProperty -> Bool
/= :: ShortFormatTextProperty -> ShortFormatTextProperty -> Bool
Prelude.Eq, Int -> ShortFormatTextProperty -> ShowS
[ShortFormatTextProperty] -> ShowS
ShortFormatTextProperty -> String
(Int -> ShortFormatTextProperty -> ShowS)
-> (ShortFormatTextProperty -> String)
-> ([ShortFormatTextProperty] -> ShowS)
-> Show ShortFormatTextProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ShortFormatTextProperty -> ShowS
showsPrec :: Int -> ShortFormatTextProperty -> ShowS
$cshow :: ShortFormatTextProperty -> String
show :: ShortFormatTextProperty -> String
$cshowList :: [ShortFormatTextProperty] -> ShowS
showList :: [ShortFormatTextProperty] -> ShowS
Prelude.Show)
mkShortFormatTextProperty :: ShortFormatTextProperty
mkShortFormatTextProperty :: ShortFormatTextProperty
mkShortFormatTextProperty
  = ShortFormatTextProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), plainText :: Maybe (Value Text)
plainText = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       richText :: Maybe (Value Text)
richText = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ShortFormatTextProperty where
  toResourceProperties :: ShortFormatTextProperty -> ResourceProperties
toResourceProperties ShortFormatTextProperty {Maybe (Value Text)
()
haddock_workaround_ :: ShortFormatTextProperty -> ()
plainText :: ShortFormatTextProperty -> Maybe (Value Text)
richText :: ShortFormatTextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
plainText :: Maybe (Value Text)
richText :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Template.ShortFormatText",
         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
"PlainText" (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)
plainText,
                            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
"RichText" (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)
richText])}
instance JSON.ToJSON ShortFormatTextProperty where
  toJSON :: ShortFormatTextProperty -> Value
toJSON ShortFormatTextProperty {Maybe (Value Text)
()
haddock_workaround_ :: ShortFormatTextProperty -> ()
plainText :: ShortFormatTextProperty -> Maybe (Value Text)
richText :: ShortFormatTextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
plainText :: Maybe (Value Text)
richText :: Maybe (Value Text)
..}
    = [(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
"PlainText" (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)
plainText,
               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
"RichText" (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)
richText]))
instance Property "PlainText" ShortFormatTextProperty where
  type PropertyType "PlainText" ShortFormatTextProperty = Value Prelude.Text
  set :: PropertyType "PlainText" ShortFormatTextProperty
-> ShortFormatTextProperty -> ShortFormatTextProperty
set PropertyType "PlainText" ShortFormatTextProperty
newValue ShortFormatTextProperty {Maybe (Value Text)
()
haddock_workaround_ :: ShortFormatTextProperty -> ()
plainText :: ShortFormatTextProperty -> Maybe (Value Text)
richText :: ShortFormatTextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
plainText :: Maybe (Value Text)
richText :: Maybe (Value Text)
..}
    = ShortFormatTextProperty {plainText :: Maybe (Value Text)
plainText = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PlainText" ShortFormatTextProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
richText :: Maybe (Value Text)
haddock_workaround_ :: ()
richText :: Maybe (Value Text)
..}
instance Property "RichText" ShortFormatTextProperty where
  type PropertyType "RichText" ShortFormatTextProperty = Value Prelude.Text
  set :: PropertyType "RichText" ShortFormatTextProperty
-> ShortFormatTextProperty -> ShortFormatTextProperty
set PropertyType "RichText" ShortFormatTextProperty
newValue ShortFormatTextProperty {Maybe (Value Text)
()
haddock_workaround_ :: ShortFormatTextProperty -> ()
plainText :: ShortFormatTextProperty -> Maybe (Value Text)
richText :: ShortFormatTextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
plainText :: Maybe (Value Text)
richText :: Maybe (Value Text)
..}
    = ShortFormatTextProperty {richText :: Maybe (Value Text)
richText = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RichText" ShortFormatTextProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
plainText :: Maybe (Value Text)
haddock_workaround_ :: ()
plainText :: Maybe (Value Text)
..}