module Stratosphere.IoTSiteWise.Dashboard (
Dashboard(..), mkDashboard
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Dashboard
=
Dashboard {Dashboard -> ()
haddock_workaround_ :: (),
Dashboard -> Value Text
dashboardDefinition :: (Value Prelude.Text),
Dashboard -> Value Text
dashboardDescription :: (Value Prelude.Text),
Dashboard -> Value Text
dashboardName :: (Value Prelude.Text),
Dashboard -> Maybe (Value Text)
projectId :: (Prelude.Maybe (Value Prelude.Text)),
Dashboard -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Dashboard -> Dashboard -> Bool
(Dashboard -> Dashboard -> Bool)
-> (Dashboard -> Dashboard -> Bool) -> Eq Dashboard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Dashboard -> Dashboard -> Bool
== :: Dashboard -> Dashboard -> Bool
$c/= :: Dashboard -> Dashboard -> Bool
/= :: Dashboard -> Dashboard -> Bool
Prelude.Eq, Int -> Dashboard -> ShowS
[Dashboard] -> ShowS
Dashboard -> String
(Int -> Dashboard -> ShowS)
-> (Dashboard -> String)
-> ([Dashboard] -> ShowS)
-> Show Dashboard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Dashboard -> ShowS
showsPrec :: Int -> Dashboard -> ShowS
$cshow :: Dashboard -> String
show :: Dashboard -> String
$cshowList :: [Dashboard] -> ShowS
showList :: [Dashboard] -> ShowS
Prelude.Show)
mkDashboard ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> Dashboard
mkDashboard :: Value Text -> Value Text -> Value Text -> Dashboard
mkDashboard Value Text
dashboardDefinition Value Text
dashboardDescription Value Text
dashboardName
= Dashboard
{haddock_workaround_ :: ()
haddock_workaround_ = (),
dashboardDefinition :: Value Text
dashboardDefinition = Value Text
dashboardDefinition,
dashboardDescription :: Value Text
dashboardDescription = Value Text
dashboardDescription,
dashboardName :: Value Text
dashboardName = Value Text
dashboardName, projectId :: Maybe (Value Text)
projectId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Dashboard where
toResourceProperties :: Dashboard -> ResourceProperties
toResourceProperties Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTSiteWise::Dashboard",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"DashboardDefinition" 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..= Value Text
dashboardDefinition,
Key
"DashboardDescription" 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..= Value Text
dashboardDescription,
Key
"DashboardName" 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..= Value Text
dashboardName]
([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
"ProjectId" (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)
projectId,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Dashboard where
toJSON :: Dashboard -> Value
toJSON Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"DashboardDefinition" 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..= Value Text
dashboardDefinition,
Key
"DashboardDescription" 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..= Value Text
dashboardDescription,
Key
"DashboardName" 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..= Value Text
dashboardName]
([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
"ProjectId" (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)
projectId,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "DashboardDefinition" Dashboard where
type PropertyType "DashboardDefinition" Dashboard = Value Prelude.Text
set :: PropertyType "DashboardDefinition" Dashboard
-> Dashboard -> Dashboard
set PropertyType "DashboardDefinition" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Dashboard {dashboardDefinition :: Value Text
dashboardDefinition = PropertyType "DashboardDefinition" Dashboard
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "DashboardDescription" Dashboard where
type PropertyType "DashboardDescription" Dashboard = Value Prelude.Text
set :: PropertyType "DashboardDescription" Dashboard
-> Dashboard -> Dashboard
set PropertyType "DashboardDescription" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Dashboard {dashboardDescription :: Value Text
dashboardDescription = PropertyType "DashboardDescription" Dashboard
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "DashboardName" Dashboard where
type PropertyType "DashboardName" Dashboard = Value Prelude.Text
set :: PropertyType "DashboardName" Dashboard -> Dashboard -> Dashboard
set PropertyType "DashboardName" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Dashboard {dashboardName :: Value Text
dashboardName = PropertyType "DashboardName" Dashboard
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ProjectId" Dashboard where
type PropertyType "ProjectId" Dashboard = Value Prelude.Text
set :: PropertyType "ProjectId" Dashboard -> Dashboard -> Dashboard
set PropertyType "ProjectId" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Dashboard {projectId :: Maybe (Value Text)
projectId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProjectId" Dashboard
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Dashboard where
type PropertyType "Tags" Dashboard = [Tag]
set :: PropertyType "Tags" Dashboard -> Dashboard -> Dashboard
set PropertyType "Tags" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Dashboard -> ()
dashboardDefinition :: Dashboard -> Value Text
dashboardDescription :: Dashboard -> Value Text
dashboardName :: Dashboard -> Value Text
projectId :: Dashboard -> Maybe (Value Text)
tags :: Dashboard -> Maybe [Tag]
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= Dashboard {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Dashboard
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
haddock_workaround_ :: ()
dashboardDefinition :: Value Text
dashboardDescription :: Value Text
dashboardName :: Value Text
projectId :: Maybe (Value Text)
..}