module Stratosphere.Events.Archive (
Archive(..), mkArchive
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Archive
=
Archive {Archive -> ()
haddock_workaround_ :: (),
Archive -> Maybe (Value Text)
archiveName :: (Prelude.Maybe (Value Prelude.Text)),
Archive -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Archive -> Maybe Object
eventPattern :: (Prelude.Maybe JSON.Object),
Archive -> Maybe (Value Text)
kmsKeyIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
Archive -> Maybe (Value Integer)
retentionDays :: (Prelude.Maybe (Value Prelude.Integer)),
Archive -> Value Text
sourceArn :: (Value Prelude.Text)}
deriving stock (Archive -> Archive -> Bool
(Archive -> Archive -> Bool)
-> (Archive -> Archive -> Bool) -> Eq Archive
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Archive -> Archive -> Bool
== :: Archive -> Archive -> Bool
$c/= :: Archive -> Archive -> Bool
/= :: Archive -> Archive -> Bool
Prelude.Eq, Int -> Archive -> ShowS
[Archive] -> ShowS
Archive -> String
(Int -> Archive -> ShowS)
-> (Archive -> String) -> ([Archive] -> ShowS) -> Show Archive
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Archive -> ShowS
showsPrec :: Int -> Archive -> ShowS
$cshow :: Archive -> String
show :: Archive -> String
$cshowList :: [Archive] -> ShowS
showList :: [Archive] -> ShowS
Prelude.Show)
mkArchive :: Value Prelude.Text -> Archive
mkArchive :: Value Text -> Archive
mkArchive Value Text
sourceArn
= Archive
{haddock_workaround_ :: ()
haddock_workaround_ = (), sourceArn :: Value Text
sourceArn = Value Text
sourceArn,
archiveName :: Maybe (Value Text)
archiveName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
eventPattern :: Maybe Object
eventPattern = Maybe Object
forall a. Maybe a
Prelude.Nothing, kmsKeyIdentifier :: Maybe (Value Text)
kmsKeyIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
retentionDays :: Maybe (Value Integer)
retentionDays = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Archive where
toResourceProperties :: Archive -> ResourceProperties
toResourceProperties Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Events::Archive", 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
"SourceArn" 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
sourceArn]
([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
"ArchiveName" (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)
archiveName,
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
"Description" (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)
description,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EventPattern" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
eventPattern,
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
"KmsKeyIdentifier" (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)
kmsKeyIdentifier,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RetentionDays" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
retentionDays]))}
instance JSON.ToJSON Archive where
toJSON :: Archive -> Value
toJSON Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: 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
"SourceArn" 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
sourceArn]
([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
"ArchiveName" (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)
archiveName,
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
"Description" (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)
description,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EventPattern" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
eventPattern,
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
"KmsKeyIdentifier" (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)
kmsKeyIdentifier,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RetentionDays" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
retentionDays])))
instance Property "ArchiveName" Archive where
type PropertyType "ArchiveName" Archive = Value Prelude.Text
set :: PropertyType "ArchiveName" Archive -> Archive -> Archive
set PropertyType "ArchiveName" Archive
newValue Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
= Archive {archiveName :: Maybe (Value Text)
archiveName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ArchiveName" Archive
Value Text
newValue, Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
instance Property "Description" Archive where
type PropertyType "Description" Archive = Value Prelude.Text
set :: PropertyType "Description" Archive -> Archive -> Archive
set PropertyType "Description" Archive
newValue Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
= Archive {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Archive
Value Text
newValue, Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
instance Property "EventPattern" Archive where
type PropertyType "EventPattern" Archive = JSON.Object
set :: PropertyType "EventPattern" Archive -> Archive -> Archive
set PropertyType "EventPattern" Archive
newValue Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
= Archive {eventPattern :: Maybe Object
eventPattern = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "EventPattern" Archive
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
instance Property "KmsKeyIdentifier" Archive where
type PropertyType "KmsKeyIdentifier" Archive = Value Prelude.Text
set :: PropertyType "KmsKeyIdentifier" Archive -> Archive -> Archive
set PropertyType "KmsKeyIdentifier" Archive
newValue Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
= Archive {kmsKeyIdentifier :: Maybe (Value Text)
kmsKeyIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyIdentifier" Archive
Value Text
newValue, Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
instance Property "RetentionDays" Archive where
type PropertyType "RetentionDays" Archive = Value Prelude.Integer
set :: PropertyType "RetentionDays" Archive -> Archive -> Archive
set PropertyType "RetentionDays" Archive
newValue Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..}
= Archive {retentionDays :: Maybe (Value Integer)
retentionDays = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RetentionDays" Archive
Value Integer
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
sourceArn :: Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
sourceArn :: Value Text
..}
instance Property "SourceArn" Archive where
type PropertyType "SourceArn" Archive = Value Prelude.Text
set :: PropertyType "SourceArn" Archive -> Archive -> Archive
set PropertyType "SourceArn" Archive
newValue Archive {Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Archive -> ()
archiveName :: Archive -> Maybe (Value Text)
description :: Archive -> Maybe (Value Text)
eventPattern :: Archive -> Maybe Object
kmsKeyIdentifier :: Archive -> Maybe (Value Text)
retentionDays :: Archive -> Maybe (Value Integer)
sourceArn :: Archive -> Value Text
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
sourceArn :: Value Text
..} = Archive {sourceArn :: Value Text
sourceArn = PropertyType "SourceArn" Archive
Value Text
newValue, Maybe Object
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
haddock_workaround_ :: ()
archiveName :: Maybe (Value Text)
description :: Maybe (Value Text)
eventPattern :: Maybe Object
kmsKeyIdentifier :: Maybe (Value Text)
retentionDays :: Maybe (Value Integer)
..}