module Stratosphere.IVSChat.LoggingConfiguration (
module Exports, LoggingConfiguration(..), mkLoggingConfiguration
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IVSChat.LoggingConfiguration.DestinationConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data LoggingConfiguration
=
LoggingConfiguration {LoggingConfiguration -> ()
haddock_workaround_ :: (),
LoggingConfiguration -> DestinationConfigurationProperty
destinationConfiguration :: DestinationConfigurationProperty,
LoggingConfiguration -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
LoggingConfiguration -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (LoggingConfiguration -> LoggingConfiguration -> Bool
(LoggingConfiguration -> LoggingConfiguration -> Bool)
-> (LoggingConfiguration -> LoggingConfiguration -> Bool)
-> Eq LoggingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggingConfiguration -> LoggingConfiguration -> Bool
== :: LoggingConfiguration -> LoggingConfiguration -> Bool
$c/= :: LoggingConfiguration -> LoggingConfiguration -> Bool
/= :: LoggingConfiguration -> LoggingConfiguration -> Bool
Prelude.Eq, Int -> LoggingConfiguration -> ShowS
[LoggingConfiguration] -> ShowS
LoggingConfiguration -> String
(Int -> LoggingConfiguration -> ShowS)
-> (LoggingConfiguration -> String)
-> ([LoggingConfiguration] -> ShowS)
-> Show LoggingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggingConfiguration -> ShowS
showsPrec :: Int -> LoggingConfiguration -> ShowS
$cshow :: LoggingConfiguration -> String
show :: LoggingConfiguration -> String
$cshowList :: [LoggingConfiguration] -> ShowS
showList :: [LoggingConfiguration] -> ShowS
Prelude.Show)
mkLoggingConfiguration ::
DestinationConfigurationProperty -> LoggingConfiguration
mkLoggingConfiguration :: DestinationConfigurationProperty -> LoggingConfiguration
mkLoggingConfiguration DestinationConfigurationProperty
destinationConfiguration
= LoggingConfiguration
{haddock_workaround_ :: ()
haddock_workaround_ = (),
destinationConfiguration :: DestinationConfigurationProperty
destinationConfiguration = DestinationConfigurationProperty
destinationConfiguration,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoggingConfiguration where
toResourceProperties :: LoggingConfiguration -> ResourceProperties
toResourceProperties LoggingConfiguration {Maybe [Tag]
Maybe (Value Text)
()
DestinationConfigurationProperty
haddock_workaround_ :: LoggingConfiguration -> ()
destinationConfiguration :: LoggingConfiguration -> DestinationConfigurationProperty
name :: LoggingConfiguration -> Maybe (Value Text)
tags :: LoggingConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IVSChat::LoggingConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"DestinationConfiguration" Key -> DestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= DestinationConfigurationProperty
destinationConfiguration]
([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
"Name" (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)
name,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON LoggingConfiguration where
toJSON :: LoggingConfiguration -> Value
toJSON LoggingConfiguration {Maybe [Tag]
Maybe (Value Text)
()
DestinationConfigurationProperty
haddock_workaround_ :: LoggingConfiguration -> ()
destinationConfiguration :: LoggingConfiguration -> DestinationConfigurationProperty
name :: LoggingConfiguration -> Maybe (Value Text)
tags :: LoggingConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(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
"DestinationConfiguration" Key -> DestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= DestinationConfigurationProperty
destinationConfiguration]
([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
"Name" (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)
name,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "DestinationConfiguration" LoggingConfiguration where
type PropertyType "DestinationConfiguration" LoggingConfiguration = DestinationConfigurationProperty
set :: PropertyType "DestinationConfiguration" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "DestinationConfiguration" LoggingConfiguration
newValue LoggingConfiguration {Maybe [Tag]
Maybe (Value Text)
()
DestinationConfigurationProperty
haddock_workaround_ :: LoggingConfiguration -> ()
destinationConfiguration :: LoggingConfiguration -> DestinationConfigurationProperty
name :: LoggingConfiguration -> Maybe (Value Text)
tags :: LoggingConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= LoggingConfiguration {destinationConfiguration :: DestinationConfigurationProperty
destinationConfiguration = PropertyType "DestinationConfiguration" LoggingConfiguration
DestinationConfigurationProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Name" LoggingConfiguration where
type PropertyType "Name" LoggingConfiguration = Value Prelude.Text
set :: PropertyType "Name" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "Name" LoggingConfiguration
newValue LoggingConfiguration {Maybe [Tag]
Maybe (Value Text)
()
DestinationConfigurationProperty
haddock_workaround_ :: LoggingConfiguration -> ()
destinationConfiguration :: LoggingConfiguration -> DestinationConfigurationProperty
name :: LoggingConfiguration -> Maybe (Value Text)
tags :: LoggingConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= LoggingConfiguration {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" LoggingConfiguration
Value Text
newValue, Maybe [Tag]
()
DestinationConfigurationProperty
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" LoggingConfiguration where
type PropertyType "Tags" LoggingConfiguration = [Tag]
set :: PropertyType "Tags" LoggingConfiguration
-> LoggingConfiguration -> LoggingConfiguration
set PropertyType "Tags" LoggingConfiguration
newValue LoggingConfiguration {Maybe [Tag]
Maybe (Value Text)
()
DestinationConfigurationProperty
haddock_workaround_ :: LoggingConfiguration -> ()
destinationConfiguration :: LoggingConfiguration -> DestinationConfigurationProperty
name :: LoggingConfiguration -> Maybe (Value Text)
tags :: LoggingConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= LoggingConfiguration {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" LoggingConfiguration
newValue, Maybe (Value Text)
()
DestinationConfigurationProperty
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationConfiguration :: DestinationConfigurationProperty
name :: Maybe (Value Text)
..}