module Stratosphere.QuickSight.DataSource.DataSourceErrorInfoProperty (
        DataSourceErrorInfoProperty(..), mkDataSourceErrorInfoProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataSourceErrorInfoProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-datasource-datasourceerrorinfo.html>
    DataSourceErrorInfoProperty {DataSourceErrorInfoProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-datasource-datasourceerrorinfo.html#cfn-quicksight-datasource-datasourceerrorinfo-message>
                                 DataSourceErrorInfoProperty -> Maybe (Value Text)
message :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-datasource-datasourceerrorinfo.html#cfn-quicksight-datasource-datasourceerrorinfo-type>
                                 DataSourceErrorInfoProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty -> Bool
(DataSourceErrorInfoProperty
 -> DataSourceErrorInfoProperty -> Bool)
-> (DataSourceErrorInfoProperty
    -> DataSourceErrorInfoProperty -> Bool)
-> Eq DataSourceErrorInfoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty -> Bool
== :: DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty -> Bool
$c/= :: DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty -> Bool
/= :: DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty -> Bool
Prelude.Eq, Int -> DataSourceErrorInfoProperty -> ShowS
[DataSourceErrorInfoProperty] -> ShowS
DataSourceErrorInfoProperty -> String
(Int -> DataSourceErrorInfoProperty -> ShowS)
-> (DataSourceErrorInfoProperty -> String)
-> ([DataSourceErrorInfoProperty] -> ShowS)
-> Show DataSourceErrorInfoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataSourceErrorInfoProperty -> ShowS
showsPrec :: Int -> DataSourceErrorInfoProperty -> ShowS
$cshow :: DataSourceErrorInfoProperty -> String
show :: DataSourceErrorInfoProperty -> String
$cshowList :: [DataSourceErrorInfoProperty] -> ShowS
showList :: [DataSourceErrorInfoProperty] -> ShowS
Prelude.Show)
mkDataSourceErrorInfoProperty :: DataSourceErrorInfoProperty
mkDataSourceErrorInfoProperty :: DataSourceErrorInfoProperty
mkDataSourceErrorInfoProperty
  = DataSourceErrorInfoProperty
      {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}
instance ToResourceProperties DataSourceErrorInfoProperty where
  toResourceProperties :: DataSourceErrorInfoProperty -> ResourceProperties
toResourceProperties DataSourceErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceErrorInfoProperty -> ()
message :: DataSourceErrorInfoProperty -> Maybe (Value Text)
type' :: DataSourceErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::DataSource.DataSourceErrorInfo",
         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'])}
instance JSON.ToJSON DataSourceErrorInfoProperty where
  toJSON :: DataSourceErrorInfoProperty -> Value
toJSON DataSourceErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceErrorInfoProperty -> ()
message :: DataSourceErrorInfoProperty -> Maybe (Value Text)
type' :: DataSourceErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: 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
"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']))
instance Property "Message" DataSourceErrorInfoProperty where
  type PropertyType "Message" DataSourceErrorInfoProperty = Value Prelude.Text
  set :: PropertyType "Message" DataSourceErrorInfoProperty
-> DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty
set PropertyType "Message" DataSourceErrorInfoProperty
newValue DataSourceErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceErrorInfoProperty -> ()
message :: DataSourceErrorInfoProperty -> Maybe (Value Text)
type' :: DataSourceErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = DataSourceErrorInfoProperty {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" DataSourceErrorInfoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
instance Property "Type" DataSourceErrorInfoProperty where
  type PropertyType "Type" DataSourceErrorInfoProperty = Value Prelude.Text
  set :: PropertyType "Type" DataSourceErrorInfoProperty
-> DataSourceErrorInfoProperty -> DataSourceErrorInfoProperty
set PropertyType "Type" DataSourceErrorInfoProperty
newValue DataSourceErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataSourceErrorInfoProperty -> ()
message :: DataSourceErrorInfoProperty -> Maybe (Value Text)
type' :: DataSourceErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
    = DataSourceErrorInfoProperty {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" DataSourceErrorInfoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
..}