module Stratosphere.RolesAnywhere.TrustAnchor.NotificationSettingProperty (
NotificationSettingProperty(..), mkNotificationSettingProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NotificationSettingProperty
=
NotificationSettingProperty {NotificationSettingProperty -> ()
haddock_workaround_ :: (),
NotificationSettingProperty -> Maybe (Value Text)
channel :: (Prelude.Maybe (Value Prelude.Text)),
NotificationSettingProperty -> Value Bool
enabled :: (Value Prelude.Bool),
NotificationSettingProperty -> Value Text
event :: (Value Prelude.Text),
NotificationSettingProperty -> Maybe (Value Double)
threshold :: (Prelude.Maybe (Value Prelude.Double))}
deriving stock (NotificationSettingProperty -> NotificationSettingProperty -> Bool
(NotificationSettingProperty
-> NotificationSettingProperty -> Bool)
-> (NotificationSettingProperty
-> NotificationSettingProperty -> Bool)
-> Eq NotificationSettingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotificationSettingProperty -> NotificationSettingProperty -> Bool
== :: NotificationSettingProperty -> NotificationSettingProperty -> Bool
$c/= :: NotificationSettingProperty -> NotificationSettingProperty -> Bool
/= :: NotificationSettingProperty -> NotificationSettingProperty -> Bool
Prelude.Eq, Int -> NotificationSettingProperty -> ShowS
[NotificationSettingProperty] -> ShowS
NotificationSettingProperty -> String
(Int -> NotificationSettingProperty -> ShowS)
-> (NotificationSettingProperty -> String)
-> ([NotificationSettingProperty] -> ShowS)
-> Show NotificationSettingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotificationSettingProperty -> ShowS
showsPrec :: Int -> NotificationSettingProperty -> ShowS
$cshow :: NotificationSettingProperty -> String
show :: NotificationSettingProperty -> String
$cshowList :: [NotificationSettingProperty] -> ShowS
showList :: [NotificationSettingProperty] -> ShowS
Prelude.Show)
mkNotificationSettingProperty ::
Value Prelude.Bool
-> Value Prelude.Text -> NotificationSettingProperty
mkNotificationSettingProperty :: Value Bool -> Value Text -> NotificationSettingProperty
mkNotificationSettingProperty Value Bool
enabled Value Text
event
= NotificationSettingProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Value Bool
enabled = Value Bool
enabled, event :: Value Text
event = Value Text
event,
channel :: Maybe (Value Text)
channel = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, threshold :: Maybe (Value Double)
threshold = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NotificationSettingProperty where
toResourceProperties :: NotificationSettingProperty -> ResourceProperties
toResourceProperties NotificationSettingProperty {Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: NotificationSettingProperty -> ()
channel :: NotificationSettingProperty -> Maybe (Value Text)
enabled :: NotificationSettingProperty -> Value Bool
event :: NotificationSettingProperty -> Value Text
threshold :: NotificationSettingProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::RolesAnywhere::TrustAnchor.NotificationSetting",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Enabled" 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..= Value Bool
enabled, Key
"Event" 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
event]
([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
"Channel" (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)
channel,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Threshold" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
threshold]))}
instance JSON.ToJSON NotificationSettingProperty where
toJSON :: NotificationSettingProperty -> Value
toJSON NotificationSettingProperty {Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: NotificationSettingProperty -> ()
channel :: NotificationSettingProperty -> Maybe (Value Text)
enabled :: NotificationSettingProperty -> Value Bool
event :: NotificationSettingProperty -> Value Text
threshold :: NotificationSettingProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
= [(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
"Enabled" 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..= Value Bool
enabled, Key
"Event" 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
event]
([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
"Channel" (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)
channel,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Threshold" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
threshold])))
instance Property "Channel" NotificationSettingProperty where
type PropertyType "Channel" NotificationSettingProperty = Value Prelude.Text
set :: PropertyType "Channel" NotificationSettingProperty
-> NotificationSettingProperty -> NotificationSettingProperty
set PropertyType "Channel" NotificationSettingProperty
newValue NotificationSettingProperty {Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: NotificationSettingProperty -> ()
channel :: NotificationSettingProperty -> Maybe (Value Text)
enabled :: NotificationSettingProperty -> Value Bool
event :: NotificationSettingProperty -> Value Text
threshold :: NotificationSettingProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
= NotificationSettingProperty {channel :: Maybe (Value Text)
channel = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Channel" NotificationSettingProperty
Value Text
newValue, Maybe (Value Double)
()
Value Bool
Value Text
haddock_workaround_ :: ()
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
haddock_workaround_ :: ()
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
instance Property "Enabled" NotificationSettingProperty where
type PropertyType "Enabled" NotificationSettingProperty = Value Prelude.Bool
set :: PropertyType "Enabled" NotificationSettingProperty
-> NotificationSettingProperty -> NotificationSettingProperty
set PropertyType "Enabled" NotificationSettingProperty
newValue NotificationSettingProperty {Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: NotificationSettingProperty -> ()
channel :: NotificationSettingProperty -> Maybe (Value Text)
enabled :: NotificationSettingProperty -> Value Bool
event :: NotificationSettingProperty -> Value Text
threshold :: NotificationSettingProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
= NotificationSettingProperty {enabled :: Value Bool
enabled = PropertyType "Enabled" NotificationSettingProperty
Value Bool
newValue, Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
event :: Value Text
threshold :: Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
event :: Value Text
threshold :: Maybe (Value Double)
..}
instance Property "Event" NotificationSettingProperty where
type PropertyType "Event" NotificationSettingProperty = Value Prelude.Text
set :: PropertyType "Event" NotificationSettingProperty
-> NotificationSettingProperty -> NotificationSettingProperty
set PropertyType "Event" NotificationSettingProperty
newValue NotificationSettingProperty {Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: NotificationSettingProperty -> ()
channel :: NotificationSettingProperty -> Maybe (Value Text)
enabled :: NotificationSettingProperty -> Value Bool
event :: NotificationSettingProperty -> Value Text
threshold :: NotificationSettingProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
= NotificationSettingProperty {event :: Value Text
event = PropertyType "Event" NotificationSettingProperty
Value Text
newValue, Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
threshold :: Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
threshold :: Maybe (Value Double)
..}
instance Property "Threshold" NotificationSettingProperty where
type PropertyType "Threshold" NotificationSettingProperty = Value Prelude.Double
set :: PropertyType "Threshold" NotificationSettingProperty
-> NotificationSettingProperty -> NotificationSettingProperty
set PropertyType "Threshold" NotificationSettingProperty
newValue NotificationSettingProperty {Maybe (Value Double)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: NotificationSettingProperty -> ()
channel :: NotificationSettingProperty -> Maybe (Value Text)
enabled :: NotificationSettingProperty -> Value Bool
event :: NotificationSettingProperty -> Value Text
threshold :: NotificationSettingProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
threshold :: Maybe (Value Double)
..}
= NotificationSettingProperty
{threshold :: Maybe (Value Double)
threshold = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Threshold" NotificationSettingProperty
Value Double
newValue, Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
haddock_workaround_ :: ()
channel :: Maybe (Value Text)
enabled :: Value Bool
event :: Value Text
..}