module Stratosphere.APS.Workspace.LoggingConfigurationProperty (
        LoggingConfigurationProperty(..), mkLoggingConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LoggingConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html>
    LoggingConfigurationProperty {LoggingConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html#cfn-aps-workspace-loggingconfiguration-loggrouparn>
                                  LoggingConfigurationProperty -> Maybe (Value Text)
logGroupArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
(LoggingConfigurationProperty
 -> LoggingConfigurationProperty -> Bool)
-> (LoggingConfigurationProperty
    -> LoggingConfigurationProperty -> Bool)
-> Eq LoggingConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
== :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
$c/= :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
/= :: LoggingConfigurationProperty
-> LoggingConfigurationProperty -> Bool
Prelude.Eq, Int -> LoggingConfigurationProperty -> ShowS
[LoggingConfigurationProperty] -> ShowS
LoggingConfigurationProperty -> String
(Int -> LoggingConfigurationProperty -> ShowS)
-> (LoggingConfigurationProperty -> String)
-> ([LoggingConfigurationProperty] -> ShowS)
-> Show LoggingConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggingConfigurationProperty -> ShowS
showsPrec :: Int -> LoggingConfigurationProperty -> ShowS
$cshow :: LoggingConfigurationProperty -> String
show :: LoggingConfigurationProperty -> String
$cshowList :: [LoggingConfigurationProperty] -> ShowS
showList :: [LoggingConfigurationProperty] -> ShowS
Prelude.Show)
mkLoggingConfigurationProperty :: LoggingConfigurationProperty
mkLoggingConfigurationProperty :: LoggingConfigurationProperty
mkLoggingConfigurationProperty
  = LoggingConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), logGroupArn :: Maybe (Value Text)
logGroupArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoggingConfigurationProperty where
  toResourceProperties :: LoggingConfigurationProperty -> ResourceProperties
toResourceProperties LoggingConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
logGroupArn :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::APS::Workspace.LoggingConfiguration",
         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
"LogGroupArn" (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)
logGroupArn])}
instance JSON.ToJSON LoggingConfigurationProperty where
  toJSON :: LoggingConfigurationProperty -> Value
toJSON LoggingConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
logGroupArn :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupArn :: 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
"LogGroupArn" (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)
logGroupArn]))
instance Property "LogGroupArn" LoggingConfigurationProperty where
  type PropertyType "LogGroupArn" LoggingConfigurationProperty = Value Prelude.Text
  set :: PropertyType "LogGroupArn" LoggingConfigurationProperty
-> LoggingConfigurationProperty -> LoggingConfigurationProperty
set PropertyType "LogGroupArn" LoggingConfigurationProperty
newValue LoggingConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LoggingConfigurationProperty -> ()
logGroupArn :: LoggingConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupArn :: Maybe (Value Text)
..}
    = LoggingConfigurationProperty
        {logGroupArn :: Maybe (Value Text)
logGroupArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogGroupArn" LoggingConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}