module Stratosphere.S3.Bucket.LifecycleConfigurationProperty (
module Exports, LifecycleConfigurationProperty(..),
mkLifecycleConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.RuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LifecycleConfigurationProperty
=
LifecycleConfigurationProperty {LifecycleConfigurationProperty -> ()
haddock_workaround_ :: (),
LifecycleConfigurationProperty -> [RuleProperty]
rules :: [RuleProperty],
LifecycleConfigurationProperty -> Maybe (Value Text)
transitionDefaultMinimumObjectSize :: (Prelude.Maybe (Value Prelude.Text))}
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 ::
[RuleProperty] -> LifecycleConfigurationProperty
mkLifecycleConfigurationProperty :: [RuleProperty] -> LifecycleConfigurationProperty
mkLifecycleConfigurationProperty [RuleProperty]
rules
= LifecycleConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), rules :: [RuleProperty]
rules = [RuleProperty]
rules,
transitionDefaultMinimumObjectSize :: Maybe (Value Text)
transitionDefaultMinimumObjectSize = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LifecycleConfigurationProperty where
toResourceProperties :: LifecycleConfigurationProperty -> ResourceProperties
toResourceProperties LifecycleConfigurationProperty {[RuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
rules :: LifecycleConfigurationProperty -> [RuleProperty]
transitionDefaultMinimumObjectSize :: LifecycleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
rules :: [RuleProperty]
transitionDefaultMinimumObjectSize :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.LifecycleConfiguration",
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
"Rules" Key -> [RuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [RuleProperty]
rules]
([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
"TransitionDefaultMinimumObjectSize"
(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)
transitionDefaultMinimumObjectSize]))}
instance JSON.ToJSON LifecycleConfigurationProperty where
toJSON :: LifecycleConfigurationProperty -> Value
toJSON LifecycleConfigurationProperty {[RuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
rules :: LifecycleConfigurationProperty -> [RuleProperty]
transitionDefaultMinimumObjectSize :: LifecycleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
rules :: [RuleProperty]
transitionDefaultMinimumObjectSize :: 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
"Rules" Key -> [RuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [RuleProperty]
rules]
([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
"TransitionDefaultMinimumObjectSize"
(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)
transitionDefaultMinimumObjectSize])))
instance Property "Rules" LifecycleConfigurationProperty where
type PropertyType "Rules" LifecycleConfigurationProperty = [RuleProperty]
set :: PropertyType "Rules" LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> LifecycleConfigurationProperty
set PropertyType "Rules" LifecycleConfigurationProperty
newValue LifecycleConfigurationProperty {[RuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
rules :: LifecycleConfigurationProperty -> [RuleProperty]
transitionDefaultMinimumObjectSize :: LifecycleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
rules :: [RuleProperty]
transitionDefaultMinimumObjectSize :: Maybe (Value Text)
..}
= LifecycleConfigurationProperty {rules :: [RuleProperty]
rules = [RuleProperty]
PropertyType "Rules" LifecycleConfigurationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
transitionDefaultMinimumObjectSize :: Maybe (Value Text)
haddock_workaround_ :: ()
transitionDefaultMinimumObjectSize :: Maybe (Value Text)
..}
instance Property "TransitionDefaultMinimumObjectSize" LifecycleConfigurationProperty where
type PropertyType "TransitionDefaultMinimumObjectSize" LifecycleConfigurationProperty = Value Prelude.Text
set :: PropertyType
"TransitionDefaultMinimumObjectSize" LifecycleConfigurationProperty
-> LifecycleConfigurationProperty -> LifecycleConfigurationProperty
set PropertyType
"TransitionDefaultMinimumObjectSize" LifecycleConfigurationProperty
newValue LifecycleConfigurationProperty {[RuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LifecycleConfigurationProperty -> ()
rules :: LifecycleConfigurationProperty -> [RuleProperty]
transitionDefaultMinimumObjectSize :: LifecycleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
rules :: [RuleProperty]
transitionDefaultMinimumObjectSize :: Maybe (Value Text)
..}
= LifecycleConfigurationProperty
{transitionDefaultMinimumObjectSize :: Maybe (Value Text)
transitionDefaultMinimumObjectSize = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"TransitionDefaultMinimumObjectSize" LifecycleConfigurationProperty
Value Text
newValue, [RuleProperty]
()
haddock_workaround_ :: ()
rules :: [RuleProperty]
haddock_workaround_ :: ()
rules :: [RuleProperty]
..}