module Stratosphere.QuickSight.Analysis.EntityProperty (
EntityProperty(..), mkEntityProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EntityProperty
=
EntityProperty {EntityProperty -> ()
haddock_workaround_ :: (),
EntityProperty -> Maybe (Value Text)
path :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EntityProperty -> EntityProperty -> Bool
(EntityProperty -> EntityProperty -> Bool)
-> (EntityProperty -> EntityProperty -> Bool) -> Eq EntityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EntityProperty -> EntityProperty -> Bool
== :: EntityProperty -> EntityProperty -> Bool
$c/= :: EntityProperty -> EntityProperty -> Bool
/= :: EntityProperty -> EntityProperty -> Bool
Prelude.Eq, Int -> EntityProperty -> ShowS
[EntityProperty] -> ShowS
EntityProperty -> String
(Int -> EntityProperty -> ShowS)
-> (EntityProperty -> String)
-> ([EntityProperty] -> ShowS)
-> Show EntityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EntityProperty -> ShowS
showsPrec :: Int -> EntityProperty -> ShowS
$cshow :: EntityProperty -> String
show :: EntityProperty -> String
$cshowList :: [EntityProperty] -> ShowS
showList :: [EntityProperty] -> ShowS
Prelude.Show)
mkEntityProperty :: EntityProperty
mkEntityProperty :: EntityProperty
mkEntityProperty
= EntityProperty {haddock_workaround_ :: ()
haddock_workaround_ = (), path :: Maybe (Value Text)
path = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EntityProperty where
toResourceProperties :: EntityProperty -> ResourceProperties
toResourceProperties EntityProperty {Maybe (Value Text)
()
haddock_workaround_ :: EntityProperty -> ()
path :: EntityProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
path :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.Entity",
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
"Path" (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)
path])}
instance JSON.ToJSON EntityProperty where
toJSON :: EntityProperty -> Value
toJSON EntityProperty {Maybe (Value Text)
()
haddock_workaround_ :: EntityProperty -> ()
path :: EntityProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
path :: 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
"Path" (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)
path]))
instance Property "Path" EntityProperty where
type PropertyType "Path" EntityProperty = Value Prelude.Text
set :: PropertyType "Path" EntityProperty
-> EntityProperty -> EntityProperty
set PropertyType "Path" EntityProperty
newValue EntityProperty {Maybe (Value Text)
()
haddock_workaround_ :: EntityProperty -> ()
path :: EntityProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
path :: Maybe (Value Text)
..}
= EntityProperty {path :: Maybe (Value Text)
path = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Path" EntityProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}