module Stratosphere.QuickSight.Dashboard.DashboardErrorProperty (
        module Exports, DashboardErrorProperty(..),
        mkDashboardErrorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.EntityProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DashboardErrorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-dashboarderror.html>
    DashboardErrorProperty {DashboardErrorProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-dashboarderror.html#cfn-quicksight-dashboard-dashboarderror-message>
                            DashboardErrorProperty -> Maybe (Value Text)
message :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-dashboarderror.html#cfn-quicksight-dashboard-dashboarderror-type>
                            DashboardErrorProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-dashboarderror.html#cfn-quicksight-dashboard-dashboarderror-violatedentities>
                            DashboardErrorProperty -> Maybe [EntityProperty]
violatedEntities :: (Prelude.Maybe [EntityProperty])}
  deriving stock (DashboardErrorProperty -> DashboardErrorProperty -> Bool
(DashboardErrorProperty -> DashboardErrorProperty -> Bool)
-> (DashboardErrorProperty -> DashboardErrorProperty -> Bool)
-> Eq DashboardErrorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DashboardErrorProperty -> DashboardErrorProperty -> Bool
== :: DashboardErrorProperty -> DashboardErrorProperty -> Bool
$c/= :: DashboardErrorProperty -> DashboardErrorProperty -> Bool
/= :: DashboardErrorProperty -> DashboardErrorProperty -> Bool
Prelude.Eq, Int -> DashboardErrorProperty -> ShowS
[DashboardErrorProperty] -> ShowS
DashboardErrorProperty -> String
(Int -> DashboardErrorProperty -> ShowS)
-> (DashboardErrorProperty -> String)
-> ([DashboardErrorProperty] -> ShowS)
-> Show DashboardErrorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DashboardErrorProperty -> ShowS
showsPrec :: Int -> DashboardErrorProperty -> ShowS
$cshow :: DashboardErrorProperty -> String
show :: DashboardErrorProperty -> String
$cshowList :: [DashboardErrorProperty] -> ShowS
showList :: [DashboardErrorProperty] -> ShowS
Prelude.Show)
mkDashboardErrorProperty :: DashboardErrorProperty
mkDashboardErrorProperty :: DashboardErrorProperty
mkDashboardErrorProperty
  = DashboardErrorProperty
      {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 DashboardErrorProperty where
  toResourceProperties :: DashboardErrorProperty -> ResourceProperties
toResourceProperties DashboardErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DashboardErrorProperty -> ()
message :: DashboardErrorProperty -> Maybe (Value Text)
type' :: DashboardErrorProperty -> Maybe (Value Text)
violatedEntities :: DashboardErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Dashboard.DashboardError",
         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 DashboardErrorProperty where
  toJSON :: DashboardErrorProperty -> Value
toJSON DashboardErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DashboardErrorProperty -> ()
message :: DashboardErrorProperty -> Maybe (Value Text)
type' :: DashboardErrorProperty -> Maybe (Value Text)
violatedEntities :: DashboardErrorProperty -> 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" DashboardErrorProperty where
  type PropertyType "Message" DashboardErrorProperty = Value Prelude.Text
  set :: PropertyType "Message" DashboardErrorProperty
-> DashboardErrorProperty -> DashboardErrorProperty
set PropertyType "Message" DashboardErrorProperty
newValue DashboardErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DashboardErrorProperty -> ()
message :: DashboardErrorProperty -> Maybe (Value Text)
type' :: DashboardErrorProperty -> Maybe (Value Text)
violatedEntities :: DashboardErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
    = DashboardErrorProperty {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" DashboardErrorProperty
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" DashboardErrorProperty where
  type PropertyType "Type" DashboardErrorProperty = Value Prelude.Text
  set :: PropertyType "Type" DashboardErrorProperty
-> DashboardErrorProperty -> DashboardErrorProperty
set PropertyType "Type" DashboardErrorProperty
newValue DashboardErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DashboardErrorProperty -> ()
message :: DashboardErrorProperty -> Maybe (Value Text)
type' :: DashboardErrorProperty -> Maybe (Value Text)
violatedEntities :: DashboardErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
    = DashboardErrorProperty {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" DashboardErrorProperty
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" DashboardErrorProperty where
  type PropertyType "ViolatedEntities" DashboardErrorProperty = [EntityProperty]
  set :: PropertyType "ViolatedEntities" DashboardErrorProperty
-> DashboardErrorProperty -> DashboardErrorProperty
set PropertyType "ViolatedEntities" DashboardErrorProperty
newValue DashboardErrorProperty {Maybe [EntityProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DashboardErrorProperty -> ()
message :: DashboardErrorProperty -> Maybe (Value Text)
type' :: DashboardErrorProperty -> Maybe (Value Text)
violatedEntities :: DashboardErrorProperty -> Maybe [EntityProperty]
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
violatedEntities :: Maybe [EntityProperty]
..}
    = DashboardErrorProperty
        {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" DashboardErrorProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}