module Stratosphere.SSM.MaintenanceWindowTask.LoggingInfoProperty (
LoggingInfoProperty(..), mkLoggingInfoProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LoggingInfoProperty
=
LoggingInfoProperty {LoggingInfoProperty -> ()
haddock_workaround_ :: (),
LoggingInfoProperty -> Value Text
region :: (Value Prelude.Text),
LoggingInfoProperty -> Value Text
s3Bucket :: (Value Prelude.Text),
LoggingInfoProperty -> Maybe (Value Text)
s3Prefix :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (LoggingInfoProperty -> LoggingInfoProperty -> Bool
(LoggingInfoProperty -> LoggingInfoProperty -> Bool)
-> (LoggingInfoProperty -> LoggingInfoProperty -> Bool)
-> Eq LoggingInfoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggingInfoProperty -> LoggingInfoProperty -> Bool
== :: LoggingInfoProperty -> LoggingInfoProperty -> Bool
$c/= :: LoggingInfoProperty -> LoggingInfoProperty -> Bool
/= :: LoggingInfoProperty -> LoggingInfoProperty -> Bool
Prelude.Eq, Int -> LoggingInfoProperty -> ShowS
[LoggingInfoProperty] -> ShowS
LoggingInfoProperty -> String
(Int -> LoggingInfoProperty -> ShowS)
-> (LoggingInfoProperty -> String)
-> ([LoggingInfoProperty] -> ShowS)
-> Show LoggingInfoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggingInfoProperty -> ShowS
showsPrec :: Int -> LoggingInfoProperty -> ShowS
$cshow :: LoggingInfoProperty -> String
show :: LoggingInfoProperty -> String
$cshowList :: [LoggingInfoProperty] -> ShowS
showList :: [LoggingInfoProperty] -> ShowS
Prelude.Show)
mkLoggingInfoProperty ::
Value Prelude.Text -> Value Prelude.Text -> LoggingInfoProperty
mkLoggingInfoProperty :: Value Text -> Value Text -> LoggingInfoProperty
mkLoggingInfoProperty Value Text
region Value Text
s3Bucket
= LoggingInfoProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), region :: Value Text
region = Value Text
region, s3Bucket :: Value Text
s3Bucket = Value Text
s3Bucket,
s3Prefix :: Maybe (Value Text)
s3Prefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoggingInfoProperty where
toResourceProperties :: LoggingInfoProperty -> ResourceProperties
toResourceProperties LoggingInfoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LoggingInfoProperty -> ()
region :: LoggingInfoProperty -> Value Text
s3Bucket :: LoggingInfoProperty -> Value Text
s3Prefix :: LoggingInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
s3Prefix :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSM::MaintenanceWindowTask.LoggingInfo",
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
"Region" 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
region, Key
"S3Bucket" 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
s3Bucket]
([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
"S3Prefix" (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)
s3Prefix]))}
instance JSON.ToJSON LoggingInfoProperty where
toJSON :: LoggingInfoProperty -> Value
toJSON LoggingInfoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LoggingInfoProperty -> ()
region :: LoggingInfoProperty -> Value Text
s3Bucket :: LoggingInfoProperty -> Value Text
s3Prefix :: LoggingInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
s3Prefix :: Maybe (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
"Region" 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
region, Key
"S3Bucket" 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
s3Bucket]
([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
"S3Prefix" (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)
s3Prefix])))
instance Property "Region" LoggingInfoProperty where
type PropertyType "Region" LoggingInfoProperty = Value Prelude.Text
set :: PropertyType "Region" LoggingInfoProperty
-> LoggingInfoProperty -> LoggingInfoProperty
set PropertyType "Region" LoggingInfoProperty
newValue LoggingInfoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LoggingInfoProperty -> ()
region :: LoggingInfoProperty -> Value Text
s3Bucket :: LoggingInfoProperty -> Value Text
s3Prefix :: LoggingInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
s3Prefix :: Maybe (Value Text)
..}
= LoggingInfoProperty {region :: Value Text
region = PropertyType "Region" LoggingInfoProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Prefix :: Maybe (Value Text)
..}
instance Property "S3Bucket" LoggingInfoProperty where
type PropertyType "S3Bucket" LoggingInfoProperty = Value Prelude.Text
set :: PropertyType "S3Bucket" LoggingInfoProperty
-> LoggingInfoProperty -> LoggingInfoProperty
set PropertyType "S3Bucket" LoggingInfoProperty
newValue LoggingInfoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LoggingInfoProperty -> ()
region :: LoggingInfoProperty -> Value Text
s3Bucket :: LoggingInfoProperty -> Value Text
s3Prefix :: LoggingInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
s3Prefix :: Maybe (Value Text)
..}
= LoggingInfoProperty {s3Bucket :: Value Text
s3Bucket = PropertyType "S3Bucket" LoggingInfoProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
region :: Value Text
s3Prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
region :: Value Text
s3Prefix :: Maybe (Value Text)
..}
instance Property "S3Prefix" LoggingInfoProperty where
type PropertyType "S3Prefix" LoggingInfoProperty = Value Prelude.Text
set :: PropertyType "S3Prefix" LoggingInfoProperty
-> LoggingInfoProperty -> LoggingInfoProperty
set PropertyType "S3Prefix" LoggingInfoProperty
newValue LoggingInfoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LoggingInfoProperty -> ()
region :: LoggingInfoProperty -> Value Text
s3Bucket :: LoggingInfoProperty -> Value Text
s3Prefix :: LoggingInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
s3Prefix :: Maybe (Value Text)
..}
= LoggingInfoProperty {s3Prefix :: Maybe (Value Text)
s3Prefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3Prefix" LoggingInfoProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
haddock_workaround_ :: ()
region :: Value Text
s3Bucket :: Value Text
..}