module Stratosphere.SecurityLake.DataLake.LifecycleConfigurationProperty (
module Exports, LifecycleConfigurationProperty(..),
mkLifecycleConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecurityLake.DataLake.ExpirationProperty as Exports
import {-# SOURCE #-} Stratosphere.SecurityLake.DataLake.TransitionsProperty as Exports
import Stratosphere.ResourceProperties
data LifecycleConfigurationProperty
=
LifecycleConfigurationProperty {LifecycleConfigurationProperty -> ()
haddock_workaround_ :: (),
LifecycleConfigurationProperty -> Maybe ExpirationProperty
expiration :: (Prelude.Maybe ExpirationProperty),
LifecycleConfigurationProperty -> Maybe [TransitionsProperty]
transitions :: (Prelude.Maybe [TransitionsProperty])}
deriving stock (LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool
(LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool)
-> (LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool)
-> Eq LifecycleConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool
== :: LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool
$c/= :: LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool
/= :: LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> Bool
Prelude.Eq, Int -> LifecycleConfigurationProperty -> ShowS
[LifecycleConfigurationProperty] -> ShowS
LifecycleConfigurationProperty -> String
(Int -> LifecycleConfigurationProperty -> ShowS)
-> (LifecycleConfigurationProperty -> String)
-> ([LifecycleConfigurationProperty] -> ShowS)
-> Show LifecycleConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LifecycleConfigurationProperty -> ShowS
showsPrec :: Int -> LifecycleConfigurationProperty -> ShowS
$cshow :: LifecycleConfigurationProperty -> String
show :: LifecycleConfigurationProperty -> String
$cshowList :: [LifecycleConfigurationProperty] -> ShowS
showList :: [LifecycleConfigurationProperty] -> ShowS
Prelude.Show)
mkLifecycleConfigurationProperty :: LifecycleConfigurationProperty
mkLifecycleConfigurationProperty :: LifecycleConfigurationProperty
mkLifecycleConfigurationProperty
= LifecycleConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), expiration :: Maybe ExpirationProperty
expiration = Maybe ExpirationProperty
forall a. Maybe a
Prelude.Nothing,
transitions :: Maybe [TransitionsProperty]
transitions = Maybe [TransitionsProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LifecycleConfigurationProperty where
toResourceProperties :: LifecycleConfigurationProperty -> ResourceProperties
toResourceProperties LifecycleConfigurationProperty {Maybe [TransitionsProperty]
Maybe ExpirationProperty
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
expiration :: LifecycleConfigurationProperty -> Maybe ExpirationProperty
transitions :: LifecycleConfigurationProperty -> Maybe [TransitionsProperty]
haddock_workaround_ :: ()
expiration :: Maybe ExpirationProperty
transitions :: Maybe [TransitionsProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SecurityLake::DataLake.LifecycleConfiguration",
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 -> ExpirationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Expiration" (ExpirationProperty -> (Key, Value))
-> Maybe ExpirationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExpirationProperty
expiration,
Key -> [TransitionsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Transitions" ([TransitionsProperty] -> (Key, Value))
-> Maybe [TransitionsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TransitionsProperty]
transitions])}
instance JSON.ToJSON LifecycleConfigurationProperty where
toJSON :: LifecycleConfigurationProperty -> Value
toJSON LifecycleConfigurationProperty {Maybe [TransitionsProperty]
Maybe ExpirationProperty
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
expiration :: LifecycleConfigurationProperty -> Maybe ExpirationProperty
transitions :: LifecycleConfigurationProperty -> Maybe [TransitionsProperty]
haddock_workaround_ :: ()
expiration :: Maybe ExpirationProperty
transitions :: Maybe [TransitionsProperty]
..}
= [(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 -> ExpirationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Expiration" (ExpirationProperty -> (Key, Value))
-> Maybe ExpirationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExpirationProperty
expiration,
Key -> [TransitionsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Transitions" ([TransitionsProperty] -> (Key, Value))
-> Maybe [TransitionsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TransitionsProperty]
transitions]))
instance Property "Expiration" LifecycleConfigurationProperty where
type PropertyType "Expiration" LifecycleConfigurationProperty = ExpirationProperty
set :: PropertyType "Expiration" LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> LifecycleConfigurationProperty
set PropertyType "Expiration" LifecycleConfigurationProperty
newValue LifecycleConfigurationProperty {Maybe [TransitionsProperty]
Maybe ExpirationProperty
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
expiration :: LifecycleConfigurationProperty -> Maybe ExpirationProperty
transitions :: LifecycleConfigurationProperty -> Maybe [TransitionsProperty]
haddock_workaround_ :: ()
expiration :: Maybe ExpirationProperty
transitions :: Maybe [TransitionsProperty]
..}
= LifecycleConfigurationProperty
{expiration :: Maybe ExpirationProperty
expiration = ExpirationProperty -> Maybe ExpirationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Expiration" LifecycleConfigurationProperty
ExpirationProperty
newValue, Maybe [TransitionsProperty]
()
haddock_workaround_ :: ()
transitions :: Maybe [TransitionsProperty]
haddock_workaround_ :: ()
transitions :: Maybe [TransitionsProperty]
..}
instance Property "Transitions" LifecycleConfigurationProperty where
type PropertyType "Transitions" LifecycleConfigurationProperty = [TransitionsProperty]
set :: PropertyType "Transitions" LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> LifecycleConfigurationProperty
set PropertyType "Transitions" LifecycleConfigurationProperty
newValue LifecycleConfigurationProperty {Maybe [TransitionsProperty]
Maybe ExpirationProperty
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
expiration :: LifecycleConfigurationProperty -> Maybe ExpirationProperty
transitions :: LifecycleConfigurationProperty -> Maybe [TransitionsProperty]
haddock_workaround_ :: ()
expiration :: Maybe ExpirationProperty
transitions :: Maybe [TransitionsProperty]
..}
= LifecycleConfigurationProperty
{transitions :: Maybe [TransitionsProperty]
transitions = [TransitionsProperty] -> Maybe [TransitionsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TransitionsProperty]
PropertyType "Transitions" LifecycleConfigurationProperty
newValue, Maybe ExpirationProperty
()
haddock_workaround_ :: ()
expiration :: Maybe ExpirationProperty
haddock_workaround_ :: ()
expiration :: Maybe ExpirationProperty
..}