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