module Stratosphere.CloudTrail.Dashboard (
module Exports, Dashboard(..), mkDashboard
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudTrail.Dashboard.RefreshScheduleProperty as Exports
import {-# SOURCE #-} Stratosphere.CloudTrail.Dashboard.WidgetProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Dashboard
=
Dashboard {Dashboard -> ()
haddock_workaround_ :: (),
Dashboard -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
Dashboard -> Maybe RefreshScheduleProperty
refreshSchedule :: (Prelude.Maybe RefreshScheduleProperty),
Dashboard -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
Dashboard -> Maybe (Value Bool)
terminationProtectionEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
Dashboard -> Maybe [WidgetProperty]
widgets :: (Prelude.Maybe [WidgetProperty])}
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 :: Dashboard
mkDashboard :: Dashboard
mkDashboard
= Dashboard
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
refreshSchedule :: Maybe RefreshScheduleProperty
refreshSchedule = Maybe RefreshScheduleProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
terminationProtectionEnabled :: Maybe (Value Bool)
terminationProtectionEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
widgets :: Maybe [WidgetProperty]
widgets = Maybe [WidgetProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Dashboard where
toResourceProperties :: Dashboard -> ResourceProperties
toResourceProperties Dashboard {Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudTrail::Dashboard",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"Name" (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)
name,
Key -> RefreshScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RefreshSchedule" (RefreshScheduleProperty -> (Key, Value))
-> Maybe RefreshScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RefreshScheduleProperty
refreshSchedule,
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,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TerminationProtectionEnabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
terminationProtectionEnabled,
Key -> [WidgetProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Widgets" ([WidgetProperty] -> (Key, Value))
-> Maybe [WidgetProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [WidgetProperty]
widgets])}
instance JSON.ToJSON Dashboard where
toJSON :: Dashboard -> Value
toJSON Dashboard {Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= [(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
"Name" (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)
name,
Key -> RefreshScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RefreshSchedule" (RefreshScheduleProperty -> (Key, Value))
-> Maybe RefreshScheduleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RefreshScheduleProperty
refreshSchedule,
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,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TerminationProtectionEnabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
terminationProtectionEnabled,
Key -> [WidgetProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Widgets" ([WidgetProperty] -> (Key, Value))
-> Maybe [WidgetProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [WidgetProperty]
widgets]))
instance Property "Name" Dashboard where
type PropertyType "Name" Dashboard = Value Prelude.Text
set :: PropertyType "Name" Dashboard -> Dashboard -> Dashboard
set PropertyType "Name" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= Dashboard {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" Dashboard
Value Text
newValue, Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: ()
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
haddock_workaround_ :: ()
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
instance Property "RefreshSchedule" Dashboard where
type PropertyType "RefreshSchedule" Dashboard = RefreshScheduleProperty
set :: PropertyType "RefreshSchedule" Dashboard -> Dashboard -> Dashboard
set PropertyType "RefreshSchedule" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= Dashboard {refreshSchedule :: Maybe RefreshScheduleProperty
refreshSchedule = RefreshScheduleProperty -> Maybe RefreshScheduleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RefreshSchedule" Dashboard
RefreshScheduleProperty
newValue, Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
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 [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= 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 [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
instance Property "TerminationProtectionEnabled" Dashboard where
type PropertyType "TerminationProtectionEnabled" Dashboard = Value Prelude.Bool
set :: PropertyType "TerminationProtectionEnabled" Dashboard
-> Dashboard -> Dashboard
set PropertyType "TerminationProtectionEnabled" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= Dashboard
{terminationProtectionEnabled :: Maybe (Value Bool)
terminationProtectionEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TerminationProtectionEnabled" Dashboard
Value Bool
newValue, Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
widgets :: Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
widgets :: Maybe [WidgetProperty]
..}
instance Property "Widgets" Dashboard where
type PropertyType "Widgets" Dashboard = [WidgetProperty]
set :: PropertyType "Widgets" Dashboard -> Dashboard -> Dashboard
set PropertyType "Widgets" Dashboard
newValue Dashboard {Maybe [Tag]
Maybe [WidgetProperty]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: Dashboard -> ()
name :: Dashboard -> Maybe (Value Text)
refreshSchedule :: Dashboard -> Maybe RefreshScheduleProperty
tags :: Dashboard -> Maybe [Tag]
terminationProtectionEnabled :: Dashboard -> Maybe (Value Bool)
widgets :: Dashboard -> Maybe [WidgetProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
widgets :: Maybe [WidgetProperty]
..}
= Dashboard {widgets :: Maybe [WidgetProperty]
widgets = [WidgetProperty] -> Maybe [WidgetProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [WidgetProperty]
PropertyType "Widgets" Dashboard
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe RefreshScheduleProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
refreshSchedule :: Maybe RefreshScheduleProperty
tags :: Maybe [Tag]
terminationProtectionEnabled :: Maybe (Value Bool)
..}