module Stratosphere.SSM.MaintenanceWindowTask.CloudWatchOutputConfigProperty (
CloudWatchOutputConfigProperty(..),
mkCloudWatchOutputConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CloudWatchOutputConfigProperty
=
CloudWatchOutputConfigProperty {CloudWatchOutputConfigProperty -> ()
haddock_workaround_ :: (),
CloudWatchOutputConfigProperty -> Maybe (Value Text)
cloudWatchLogGroupName :: (Prelude.Maybe (Value Prelude.Text)),
CloudWatchOutputConfigProperty -> Maybe (Value Bool)
cloudWatchOutputEnabled :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool
(CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool)
-> (CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool)
-> Eq CloudWatchOutputConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool
== :: CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool
$c/= :: CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool
/= :: CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> Bool
Prelude.Eq, Int -> CloudWatchOutputConfigProperty -> ShowS
[CloudWatchOutputConfigProperty] -> ShowS
CloudWatchOutputConfigProperty -> String
(Int -> CloudWatchOutputConfigProperty -> ShowS)
-> (CloudWatchOutputConfigProperty -> String)
-> ([CloudWatchOutputConfigProperty] -> ShowS)
-> Show CloudWatchOutputConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CloudWatchOutputConfigProperty -> ShowS
showsPrec :: Int -> CloudWatchOutputConfigProperty -> ShowS
$cshow :: CloudWatchOutputConfigProperty -> String
show :: CloudWatchOutputConfigProperty -> String
$cshowList :: [CloudWatchOutputConfigProperty] -> ShowS
showList :: [CloudWatchOutputConfigProperty] -> ShowS
Prelude.Show)
mkCloudWatchOutputConfigProperty :: CloudWatchOutputConfigProperty
mkCloudWatchOutputConfigProperty :: CloudWatchOutputConfigProperty
mkCloudWatchOutputConfigProperty
= CloudWatchOutputConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
cloudWatchLogGroupName :: Maybe (Value Text)
cloudWatchLogGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
cloudWatchOutputEnabled :: Maybe (Value Bool)
cloudWatchOutputEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CloudWatchOutputConfigProperty where
toResourceProperties :: CloudWatchOutputConfigProperty -> ResourceProperties
toResourceProperties CloudWatchOutputConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchOutputConfigProperty -> ()
cloudWatchLogGroupName :: CloudWatchOutputConfigProperty -> Maybe (Value Text)
cloudWatchOutputEnabled :: CloudWatchOutputConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogGroupName :: Maybe (Value Text)
cloudWatchOutputEnabled :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSM::MaintenanceWindowTask.CloudWatchOutputConfig",
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
"CloudWatchLogGroupName"
(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)
cloudWatchLogGroupName,
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
"CloudWatchOutputEnabled"
(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)
cloudWatchOutputEnabled])}
instance JSON.ToJSON CloudWatchOutputConfigProperty where
toJSON :: CloudWatchOutputConfigProperty -> Value
toJSON CloudWatchOutputConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchOutputConfigProperty -> ()
cloudWatchLogGroupName :: CloudWatchOutputConfigProperty -> Maybe (Value Text)
cloudWatchOutputEnabled :: CloudWatchOutputConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogGroupName :: Maybe (Value Text)
cloudWatchOutputEnabled :: Maybe (Value Bool)
..}
= [(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
"CloudWatchLogGroupName"
(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)
cloudWatchLogGroupName,
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
"CloudWatchOutputEnabled"
(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)
cloudWatchOutputEnabled]))
instance Property "CloudWatchLogGroupName" CloudWatchOutputConfigProperty where
type PropertyType "CloudWatchLogGroupName" CloudWatchOutputConfigProperty = Value Prelude.Text
set :: PropertyType
"CloudWatchLogGroupName" CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> CloudWatchOutputConfigProperty
set PropertyType
"CloudWatchLogGroupName" CloudWatchOutputConfigProperty
newValue CloudWatchOutputConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchOutputConfigProperty -> ()
cloudWatchLogGroupName :: CloudWatchOutputConfigProperty -> Maybe (Value Text)
cloudWatchOutputEnabled :: CloudWatchOutputConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogGroupName :: Maybe (Value Text)
cloudWatchOutputEnabled :: Maybe (Value Bool)
..}
= CloudWatchOutputConfigProperty
{cloudWatchLogGroupName :: Maybe (Value Text)
cloudWatchLogGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"CloudWatchLogGroupName" CloudWatchOutputConfigProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
cloudWatchOutputEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchOutputEnabled :: Maybe (Value Bool)
..}
instance Property "CloudWatchOutputEnabled" CloudWatchOutputConfigProperty where
type PropertyType "CloudWatchOutputEnabled" CloudWatchOutputConfigProperty = Value Prelude.Bool
set :: PropertyType
"CloudWatchOutputEnabled" CloudWatchOutputConfigProperty
-> CloudWatchOutputConfigProperty -> CloudWatchOutputConfigProperty
set PropertyType
"CloudWatchOutputEnabled" CloudWatchOutputConfigProperty
newValue CloudWatchOutputConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchOutputConfigProperty -> ()
cloudWatchLogGroupName :: CloudWatchOutputConfigProperty -> Maybe (Value Text)
cloudWatchOutputEnabled :: CloudWatchOutputConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogGroupName :: Maybe (Value Text)
cloudWatchOutputEnabled :: Maybe (Value Bool)
..}
= CloudWatchOutputConfigProperty
{cloudWatchOutputEnabled :: Maybe (Value Bool)
cloudWatchOutputEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"CloudWatchOutputEnabled" CloudWatchOutputConfigProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cloudWatchLogGroupName :: Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogGroupName :: Maybe (Value Text)
..}