module Stratosphere.AppSync.GraphQLApi.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
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html>
    LogConfigProperty {LogConfigProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html#cfn-appsync-graphqlapi-logconfig-cloudwatchlogsrolearn>
                       LogConfigProperty -> Maybe (Value Text)
cloudWatchLogsRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html#cfn-appsync-graphqlapi-logconfig-excludeverbosecontent>
                       LogConfigProperty -> Maybe (Value Bool)
excludeVerboseContent :: (Prelude.Maybe (Value Prelude.Bool)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html#cfn-appsync-graphqlapi-logconfig-fieldloglevel>
                       LogConfigProperty -> Maybe (Value Text)
fieldLogLevel :: (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_ = (), cloudWatchLogsRoleArn :: Maybe (Value Text)
cloudWatchLogsRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       excludeVerboseContent :: Maybe (Value Bool)
excludeVerboseContent = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       fieldLogLevel :: Maybe (Value Text)
fieldLogLevel = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogConfigProperty where
  toResourceProperties :: LogConfigProperty -> ResourceProperties
toResourceProperties LogConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
cloudWatchLogsRoleArn :: LogConfigProperty -> Maybe (Value Text)
excludeVerboseContent :: LogConfigProperty -> Maybe (Value Bool)
fieldLogLevel :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppSync::GraphQLApi.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
"CloudWatchLogsRoleArn"
                              (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)
cloudWatchLogsRoleArn,
                            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
"ExcludeVerboseContent"
                              (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)
excludeVerboseContent,
                            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
"FieldLogLevel" (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)
fieldLogLevel])}
instance JSON.ToJSON LogConfigProperty where
  toJSON :: LogConfigProperty -> Value
toJSON LogConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
cloudWatchLogsRoleArn :: LogConfigProperty -> Maybe (Value Text)
excludeVerboseContent :: LogConfigProperty -> Maybe (Value Bool)
fieldLogLevel :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: 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
"CloudWatchLogsRoleArn"
                 (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)
cloudWatchLogsRoleArn,
               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
"ExcludeVerboseContent"
                 (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)
excludeVerboseContent,
               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
"FieldLogLevel" (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)
fieldLogLevel]))
instance Property "CloudWatchLogsRoleArn" LogConfigProperty where
  type PropertyType "CloudWatchLogsRoleArn" LogConfigProperty = Value Prelude.Text
  set :: PropertyType "CloudWatchLogsRoleArn" LogConfigProperty
-> LogConfigProperty -> LogConfigProperty
set PropertyType "CloudWatchLogsRoleArn" LogConfigProperty
newValue LogConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
cloudWatchLogsRoleArn :: LogConfigProperty -> Maybe (Value Text)
excludeVerboseContent :: LogConfigProperty -> Maybe (Value Bool)
fieldLogLevel :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: Maybe (Value Text)
..}
    = LogConfigProperty
        {cloudWatchLogsRoleArn :: Maybe (Value Text)
cloudWatchLogsRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CloudWatchLogsRoleArn" LogConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: Maybe (Value Text)
haddock_workaround_ :: ()
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: Maybe (Value Text)
..}
instance Property "ExcludeVerboseContent" LogConfigProperty where
  type PropertyType "ExcludeVerboseContent" LogConfigProperty = Value Prelude.Bool
  set :: PropertyType "ExcludeVerboseContent" LogConfigProperty
-> LogConfigProperty -> LogConfigProperty
set PropertyType "ExcludeVerboseContent" LogConfigProperty
newValue LogConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
cloudWatchLogsRoleArn :: LogConfigProperty -> Maybe (Value Text)
excludeVerboseContent :: LogConfigProperty -> Maybe (Value Bool)
fieldLogLevel :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: Maybe (Value Text)
..}
    = LogConfigProperty
        {excludeVerboseContent :: Maybe (Value Bool)
excludeVerboseContent = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ExcludeVerboseContent" LogConfigProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
fieldLogLevel :: Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
fieldLogLevel :: Maybe (Value Text)
..}
instance Property "FieldLogLevel" LogConfigProperty where
  type PropertyType "FieldLogLevel" LogConfigProperty = Value Prelude.Text
  set :: PropertyType "FieldLogLevel" LogConfigProperty
-> LogConfigProperty -> LogConfigProperty
set PropertyType "FieldLogLevel" LogConfigProperty
newValue LogConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogConfigProperty -> ()
cloudWatchLogsRoleArn :: LogConfigProperty -> Maybe (Value Text)
excludeVerboseContent :: LogConfigProperty -> Maybe (Value Bool)
fieldLogLevel :: LogConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
fieldLogLevel :: Maybe (Value Text)
..}
    = LogConfigProperty {fieldLogLevel :: Maybe (Value Text)
fieldLogLevel = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FieldLogLevel" LogConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogsRoleArn :: Maybe (Value Text)
excludeVerboseContent :: Maybe (Value Bool)
..}