module Stratosphere.Cognito.LogDeliveryConfiguration (
module Exports, LogDeliveryConfiguration(..),
mkLogDeliveryConfiguration
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cognito.LogDeliveryConfiguration.LogConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogDeliveryConfiguration
=
LogDeliveryConfiguration {LogDeliveryConfiguration -> ()
haddock_workaround_ :: (),
LogDeliveryConfiguration -> Maybe [LogConfigurationProperty]
logConfigurations :: (Prelude.Maybe [LogConfigurationProperty]),
LogDeliveryConfiguration -> Value Text
userPoolId :: (Value Prelude.Text)}
deriving stock (LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool
(LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool)
-> (LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool)
-> Eq LogDeliveryConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool
== :: LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool
$c/= :: LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool
/= :: LogDeliveryConfiguration -> LogDeliveryConfiguration -> Bool
Prelude.Eq, Int -> LogDeliveryConfiguration -> ShowS
[LogDeliveryConfiguration] -> ShowS
LogDeliveryConfiguration -> String
(Int -> LogDeliveryConfiguration -> ShowS)
-> (LogDeliveryConfiguration -> String)
-> ([LogDeliveryConfiguration] -> ShowS)
-> Show LogDeliveryConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogDeliveryConfiguration -> ShowS
showsPrec :: Int -> LogDeliveryConfiguration -> ShowS
$cshow :: LogDeliveryConfiguration -> String
show :: LogDeliveryConfiguration -> String
$cshowList :: [LogDeliveryConfiguration] -> ShowS
showList :: [LogDeliveryConfiguration] -> ShowS
Prelude.Show)
mkLogDeliveryConfiguration ::
Value Prelude.Text -> LogDeliveryConfiguration
mkLogDeliveryConfiguration :: Value Text -> LogDeliveryConfiguration
mkLogDeliveryConfiguration Value Text
userPoolId
= LogDeliveryConfiguration
{haddock_workaround_ :: ()
haddock_workaround_ = (), userPoolId :: Value Text
userPoolId = Value Text
userPoolId,
logConfigurations :: Maybe [LogConfigurationProperty]
logConfigurations = Maybe [LogConfigurationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogDeliveryConfiguration where
toResourceProperties :: LogDeliveryConfiguration -> ResourceProperties
toResourceProperties LogDeliveryConfiguration {Maybe [LogConfigurationProperty]
()
Value Text
haddock_workaround_ :: LogDeliveryConfiguration -> ()
logConfigurations :: LogDeliveryConfiguration -> Maybe [LogConfigurationProperty]
userPoolId :: LogDeliveryConfiguration -> Value Text
haddock_workaround_ :: ()
logConfigurations :: Maybe [LogConfigurationProperty]
userPoolId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::LogDeliveryConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"UserPoolId" 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..= Value Text
userPoolId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [LogConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LogConfigurations" ([LogConfigurationProperty] -> (Key, Value))
-> Maybe [LogConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogConfigurationProperty]
logConfigurations]))}
instance JSON.ToJSON LogDeliveryConfiguration where
toJSON :: LogDeliveryConfiguration -> Value
toJSON LogDeliveryConfiguration {Maybe [LogConfigurationProperty]
()
Value Text
haddock_workaround_ :: LogDeliveryConfiguration -> ()
logConfigurations :: LogDeliveryConfiguration -> Maybe [LogConfigurationProperty]
userPoolId :: LogDeliveryConfiguration -> Value Text
haddock_workaround_ :: ()
logConfigurations :: Maybe [LogConfigurationProperty]
userPoolId :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"UserPoolId" 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..= Value Text
userPoolId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [LogConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LogConfigurations" ([LogConfigurationProperty] -> (Key, Value))
-> Maybe [LogConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LogConfigurationProperty]
logConfigurations])))
instance Property "LogConfigurations" LogDeliveryConfiguration where
type PropertyType "LogConfigurations" LogDeliveryConfiguration = [LogConfigurationProperty]
set :: PropertyType "LogConfigurations" LogDeliveryConfiguration
-> LogDeliveryConfiguration -> LogDeliveryConfiguration
set PropertyType "LogConfigurations" LogDeliveryConfiguration
newValue LogDeliveryConfiguration {Maybe [LogConfigurationProperty]
()
Value Text
haddock_workaround_ :: LogDeliveryConfiguration -> ()
logConfigurations :: LogDeliveryConfiguration -> Maybe [LogConfigurationProperty]
userPoolId :: LogDeliveryConfiguration -> Value Text
haddock_workaround_ :: ()
logConfigurations :: Maybe [LogConfigurationProperty]
userPoolId :: Value Text
..}
= LogDeliveryConfiguration
{logConfigurations :: Maybe [LogConfigurationProperty]
logConfigurations = [LogConfigurationProperty] -> Maybe [LogConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [LogConfigurationProperty]
PropertyType "LogConfigurations" LogDeliveryConfiguration
newValue, ()
Value Text
haddock_workaround_ :: ()
userPoolId :: Value Text
haddock_workaround_ :: ()
userPoolId :: Value Text
..}
instance Property "UserPoolId" LogDeliveryConfiguration where
type PropertyType "UserPoolId" LogDeliveryConfiguration = Value Prelude.Text
set :: PropertyType "UserPoolId" LogDeliveryConfiguration
-> LogDeliveryConfiguration -> LogDeliveryConfiguration
set PropertyType "UserPoolId" LogDeliveryConfiguration
newValue LogDeliveryConfiguration {Maybe [LogConfigurationProperty]
()
Value Text
haddock_workaround_ :: LogDeliveryConfiguration -> ()
logConfigurations :: LogDeliveryConfiguration -> Maybe [LogConfigurationProperty]
userPoolId :: LogDeliveryConfiguration -> Value Text
haddock_workaround_ :: ()
logConfigurations :: Maybe [LogConfigurationProperty]
userPoolId :: Value Text
..}
= LogDeliveryConfiguration {userPoolId :: Value Text
userPoolId = PropertyType "UserPoolId" LogDeliveryConfiguration
Value Text
newValue, Maybe [LogConfigurationProperty]
()
haddock_workaround_ :: ()
logConfigurations :: Maybe [LogConfigurationProperty]
haddock_workaround_ :: ()
logConfigurations :: Maybe [LogConfigurationProperty]
..}