module Stratosphere.WorkSpacesWeb.SessionLogger.LogConfigurationProperty (
        module Exports, LogConfigurationProperty(..),
        mkLogConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WorkSpacesWeb.SessionLogger.S3LogConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data LogConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesweb-sessionlogger-logconfiguration.html>
    LogConfigurationProperty {LogConfigurationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesweb-sessionlogger-logconfiguration.html#cfn-workspacesweb-sessionlogger-logconfiguration-s3>
                              LogConfigurationProperty -> Maybe S3LogConfigurationProperty
s3 :: (Prelude.Maybe S3LogConfigurationProperty)}
  deriving stock (LogConfigurationProperty -> LogConfigurationProperty -> Bool
(LogConfigurationProperty -> LogConfigurationProperty -> Bool)
-> (LogConfigurationProperty -> LogConfigurationProperty -> Bool)
-> Eq LogConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
== :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
$c/= :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
/= :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
Prelude.Eq, Int -> LogConfigurationProperty -> ShowS
[LogConfigurationProperty] -> ShowS
LogConfigurationProperty -> String
(Int -> LogConfigurationProperty -> ShowS)
-> (LogConfigurationProperty -> String)
-> ([LogConfigurationProperty] -> ShowS)
-> Show LogConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogConfigurationProperty -> ShowS
showsPrec :: Int -> LogConfigurationProperty -> ShowS
$cshow :: LogConfigurationProperty -> String
show :: LogConfigurationProperty -> String
$cshowList :: [LogConfigurationProperty] -> ShowS
showList :: [LogConfigurationProperty] -> ShowS
Prelude.Show)
mkLogConfigurationProperty :: LogConfigurationProperty
mkLogConfigurationProperty :: LogConfigurationProperty
mkLogConfigurationProperty
  = LogConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), s3 :: Maybe S3LogConfigurationProperty
s3 = Maybe S3LogConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogConfigurationProperty where
  toResourceProperties :: LogConfigurationProperty -> ResourceProperties
toResourceProperties LogConfigurationProperty {Maybe S3LogConfigurationProperty
()
haddock_workaround_ :: LogConfigurationProperty -> ()
s3 :: LogConfigurationProperty -> Maybe S3LogConfigurationProperty
haddock_workaround_ :: ()
s3 :: Maybe S3LogConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkSpacesWeb::SessionLogger.LogConfiguration",
         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 -> S3LogConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3" (S3LogConfigurationProperty -> (Key, Value))
-> Maybe S3LogConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3LogConfigurationProperty
s3])}
instance JSON.ToJSON LogConfigurationProperty where
  toJSON :: LogConfigurationProperty -> Value
toJSON LogConfigurationProperty {Maybe S3LogConfigurationProperty
()
haddock_workaround_ :: LogConfigurationProperty -> ()
s3 :: LogConfigurationProperty -> Maybe S3LogConfigurationProperty
haddock_workaround_ :: ()
s3 :: Maybe S3LogConfigurationProperty
..}
    = [(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 -> S3LogConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3" (S3LogConfigurationProperty -> (Key, Value))
-> Maybe S3LogConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3LogConfigurationProperty
s3]))
instance Property "S3" LogConfigurationProperty where
  type PropertyType "S3" LogConfigurationProperty = S3LogConfigurationProperty
  set :: PropertyType "S3" LogConfigurationProperty
-> LogConfigurationProperty -> LogConfigurationProperty
set PropertyType "S3" LogConfigurationProperty
newValue LogConfigurationProperty {Maybe S3LogConfigurationProperty
()
haddock_workaround_ :: LogConfigurationProperty -> ()
s3 :: LogConfigurationProperty -> Maybe S3LogConfigurationProperty
haddock_workaround_ :: ()
s3 :: Maybe S3LogConfigurationProperty
..}
    = LogConfigurationProperty {s3 :: Maybe S3LogConfigurationProperty
s3 = S3LogConfigurationProperty -> Maybe S3LogConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3" LogConfigurationProperty
S3LogConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}