module Stratosphere.Events.EventBus.LogConfigProperty (
LogConfigProperty(..), mkLogConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogConfigProperty
=
LogConfigProperty {LogConfigProperty -> ()
haddock_workaround_ :: (),
LogConfigProperty -> Maybe (Value Text)
includeDetail :: (Prelude.Maybe (Value Prelude.Text)),
LogConfigProperty -> Maybe (Value Text)
level :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (LogConfigProperty -> LogConfigProperty -> Bool
(LogConfigProperty -> LogConfigProperty -> Bool)
-> (LogConfigProperty -> LogConfigProperty -> Bool)
-> Eq LogConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogConfigProperty -> LogConfigProperty -> Bool
== :: LogConfigProperty -> LogConfigProperty -> Bool
$c/= :: LogConfigProperty -> LogConfigProperty -> Bool
/= :: LogConfigProperty -> LogConfigProperty -> Bool
Prelude.Eq, Int -> LogConfigProperty -> ShowS
[LogConfigProperty] -> ShowS
LogConfigProperty -> String
(Int -> LogConfigProperty -> ShowS)
-> (LogConfigProperty -> String)
-> ([LogConfigProperty] -> ShowS)
-> Show LogConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogConfigProperty -> ShowS
showsPrec :: Int -> LogConfigProperty -> ShowS
$cshow :: LogConfigProperty -> String
show :: LogConfigProperty -> String
$cshowList :: [LogConfigProperty] -> ShowS
showList :: [LogConfigProperty] -> ShowS
Prelude.Show)
mkLogConfigProperty :: LogConfigProperty
mkLogConfigProperty :: LogConfigProperty
mkLogConfigProperty
= LogConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), includeDetail :: Maybe (Value Text)
includeDetail = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
level :: Maybe (Value Text)
level = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogConfigProperty where
toResourceProperties :: LogConfigProperty -> ResourceProperties
toResourceProperties LogConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
includeDetail :: LogConfigProperty -> Maybe (Value Text)
level :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
includeDetail :: Maybe (Value Text)
level :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Events::EventBus.LogConfig",
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
"IncludeDetail" (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)
includeDetail,
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
"Level" (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)
level])}
instance JSON.ToJSON LogConfigProperty where
toJSON :: LogConfigProperty -> Value
toJSON LogConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
includeDetail :: LogConfigProperty -> Maybe (Value Text)
level :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
includeDetail :: Maybe (Value Text)
level :: 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
"IncludeDetail" (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)
includeDetail,
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
"Level" (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)
level]))
instance Property "IncludeDetail" LogConfigProperty where
type PropertyType "IncludeDetail" LogConfigProperty = Value Prelude.Text
set :: PropertyType "IncludeDetail" LogConfigProperty
-> LogConfigProperty -> LogConfigProperty
set PropertyType "IncludeDetail" LogConfigProperty
newValue LogConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
includeDetail :: LogConfigProperty -> Maybe (Value Text)
level :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
includeDetail :: Maybe (Value Text)
level :: Maybe (Value Text)
..}
= LogConfigProperty {includeDetail :: Maybe (Value Text)
includeDetail = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IncludeDetail" LogConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
level :: Maybe (Value Text)
haddock_workaround_ :: ()
level :: Maybe (Value Text)
..}
instance Property "Level" LogConfigProperty where
type PropertyType "Level" LogConfigProperty = Value Prelude.Text
set :: PropertyType "Level" LogConfigProperty
-> LogConfigProperty -> LogConfigProperty
set PropertyType "Level" LogConfigProperty
newValue LogConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
includeDetail :: LogConfigProperty -> Maybe (Value Text)
level :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
includeDetail :: Maybe (Value Text)
level :: Maybe (Value Text)
..}
= LogConfigProperty {level :: Maybe (Value Text)
level = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Level" LogConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
includeDetail :: Maybe (Value Text)
haddock_workaround_ :: ()
includeDetail :: Maybe (Value Text)
..}