module Stratosphere.QuickSight.Template.TemplateErrorProperty (
module Exports, TemplateErrorProperty(..), mkTemplateErrorProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Template.EntityProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TemplateErrorProperty
=
TemplateErrorProperty {TemplateErrorProperty -> ()
haddock_workaround_ :: (),
TemplateErrorProperty -> Maybe (Value Text)
message :: (Prelude.Maybe (Value Prelude.Text)),
TemplateErrorProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text)),
TemplateErrorProperty -> Maybe [EntityProperty]
violatedEntities :: (Prelude.Maybe [EntityProperty])}
deriving stock (TemplateErrorProperty -> TemplateErrorProperty -> Bool
(TemplateErrorProperty -> TemplateErrorProperty -> Bool)
-> (TemplateErrorProperty -> TemplateErrorProperty -> Bool)
-> Eq TemplateErrorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TemplateErrorProperty -> TemplateErrorProperty -> Bool
== :: TemplateErrorProperty -> TemplateErrorProperty -> Bool
$c/= :: TemplateErrorProperty -> TemplateErrorProperty -> Bool
/= :: TemplateErrorProperty -> TemplateErrorProperty -> Bool
Prelude.Eq, Int -> TemplateErrorProperty -> ShowS
[TemplateErrorProperty] -> ShowS
TemplateErrorProperty -> String
(Int -> TemplateErrorProperty -> ShowS)
-> (TemplateErrorProperty -> String)
-> ([TemplateErrorProperty] -> ShowS)
-> Show TemplateErrorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TemplateErrorProperty -> ShowS
showsPrec :: Int -> TemplateErrorProperty -> ShowS
$cshow :: TemplateErrorProperty -> String
show :: TemplateErrorProperty -> String
$cshowList :: [TemplateErrorProperty] -> ShowS
showList :: [TemplateErrorProperty] -> ShowS
Prelude.Show)
mkTemplateErrorProperty :: TemplateErrorProperty
mkTemplateErrorProperty :: TemplateErrorProperty
mkTemplateErrorProperty
= TemplateErrorProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), message :: Maybe (Value Text)
message = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, violatedEntities :: Maybe [EntityProperty]
violatedEntities = Maybe [EntityProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TemplateErrorProperty where
toResourceProperties :: TemplateErrorProperty -> ResourceProperties
toResourceProperties TemplateErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: TemplateErrorProperty -> ()
message :: TemplateErrorProperty -> Maybe (Value Text)
type' :: TemplateErrorProperty -> Maybe (Value Text)
violatedEntities :: TemplateErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Template.TemplateError",
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
"Message" (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)
message,
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
"Type" (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)
type',
Key -> [EntityProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ViolatedEntities" ([EntityProperty] -> (Key, Value))
-> Maybe [EntityProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EntityProperty]
violatedEntities])}
instance JSON.ToJSON TemplateErrorProperty where
toJSON :: TemplateErrorProperty -> Value
toJSON TemplateErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: TemplateErrorProperty -> ()
message :: TemplateErrorProperty -> Maybe (Value Text)
type' :: TemplateErrorProperty -> Maybe (Value Text)
violatedEntities :: TemplateErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
= [(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
"Message" (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)
message,
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
"Type" (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)
type',
Key -> [EntityProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ViolatedEntities" ([EntityProperty] -> (Key, Value))
-> Maybe [EntityProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EntityProperty]
violatedEntities]))
instance Property "Message" TemplateErrorProperty where
type PropertyType "Message" TemplateErrorProperty = Value Prelude.Text
set :: PropertyType "Message" TemplateErrorProperty
-> TemplateErrorProperty -> TemplateErrorProperty
set PropertyType "Message" TemplateErrorProperty
newValue TemplateErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: TemplateErrorProperty -> ()
message :: TemplateErrorProperty -> Maybe (Value Text)
type' :: TemplateErrorProperty -> Maybe (Value Text)
violatedEntities :: TemplateErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
= TemplateErrorProperty {message :: Maybe (Value Text)
message = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Message" TemplateErrorProperty
Value Text
newValue, Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
instance Property "Type" TemplateErrorProperty where
type PropertyType "Type" TemplateErrorProperty = Value Prelude.Text
set :: PropertyType "Type" TemplateErrorProperty
-> TemplateErrorProperty -> TemplateErrorProperty
set PropertyType "Type" TemplateErrorProperty
newValue TemplateErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: TemplateErrorProperty -> ()
message :: TemplateErrorProperty -> Maybe (Value Text)
type' :: TemplateErrorProperty -> Maybe (Value Text)
violatedEntities :: TemplateErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
= TemplateErrorProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" TemplateErrorProperty
Value Text
newValue, Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
instance Property "ViolatedEntities" TemplateErrorProperty where
type PropertyType "ViolatedEntities" TemplateErrorProperty = [EntityProperty]
set :: PropertyType "ViolatedEntities" TemplateErrorProperty
-> TemplateErrorProperty -> TemplateErrorProperty
set PropertyType "ViolatedEntities" TemplateErrorProperty
newValue TemplateErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: TemplateErrorProperty -> ()
message :: TemplateErrorProperty -> Maybe (Value Text)
type' :: TemplateErrorProperty -> Maybe (Value Text)
violatedEntities :: TemplateErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
= TemplateErrorProperty
{violatedEntities :: Maybe [EntityProperty]
violatedEntities = [EntityProperty] -> Maybe [EntityProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [EntityProperty]
PropertyType "ViolatedEntities" TemplateErrorProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}