module Stratosphere.EFS.FileSystem.LifecyclePolicyProperty (
LifecyclePolicyProperty(..), mkLifecyclePolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LifecyclePolicyProperty
=
LifecyclePolicyProperty {LifecyclePolicyProperty -> ()
haddock_workaround_ :: (),
LifecyclePolicyProperty -> Maybe (Value Text)
transitionToArchive :: (Prelude.Maybe (Value Prelude.Text)),
LifecyclePolicyProperty -> Maybe (Value Text)
transitionToIA :: (Prelude.Maybe (Value Prelude.Text)),
LifecyclePolicyProperty -> Maybe (Value Text)
transitionToPrimaryStorageClass :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
(LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool)
-> (LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool)
-> Eq LifecyclePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
== :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
$c/= :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
/= :: LifecyclePolicyProperty -> LifecyclePolicyProperty -> Bool
Prelude.Eq, Int -> LifecyclePolicyProperty -> ShowS
[LifecyclePolicyProperty] -> ShowS
LifecyclePolicyProperty -> String
(Int -> LifecyclePolicyProperty -> ShowS)
-> (LifecyclePolicyProperty -> String)
-> ([LifecyclePolicyProperty] -> ShowS)
-> Show LifecyclePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LifecyclePolicyProperty -> ShowS
showsPrec :: Int -> LifecyclePolicyProperty -> ShowS
$cshow :: LifecyclePolicyProperty -> String
show :: LifecyclePolicyProperty -> String
$cshowList :: [LifecyclePolicyProperty] -> ShowS
showList :: [LifecyclePolicyProperty] -> ShowS
Prelude.Show)
mkLifecyclePolicyProperty :: LifecyclePolicyProperty
mkLifecyclePolicyProperty :: LifecyclePolicyProperty
mkLifecyclePolicyProperty
= LifecyclePolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), transitionToArchive :: Maybe (Value Text)
transitionToArchive = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
transitionToIA :: Maybe (Value Text)
transitionToIA = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
transitionToPrimaryStorageClass :: Maybe (Value Text)
transitionToPrimaryStorageClass = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LifecyclePolicyProperty where
toResourceProperties :: LifecyclePolicyProperty -> ResourceProperties
toResourceProperties LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
transitionToArchive :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToIA :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToPrimaryStorageClass :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EFS::FileSystem.LifecyclePolicy",
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 -> 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
"TransitionToArchive" (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)
transitionToArchive,
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
"TransitionToIA" (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)
transitionToIA,
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
"TransitionToPrimaryStorageClass"
(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)
transitionToPrimaryStorageClass])}
instance JSON.ToJSON LifecyclePolicyProperty where
toJSON :: LifecyclePolicyProperty -> Value
toJSON LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
transitionToArchive :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToIA :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToPrimaryStorageClass :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
= [(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 -> 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
"TransitionToArchive" (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)
transitionToArchive,
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
"TransitionToIA" (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)
transitionToIA,
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
"TransitionToPrimaryStorageClass"
(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)
transitionToPrimaryStorageClass]))
instance Property "TransitionToArchive" LifecyclePolicyProperty where
type PropertyType "TransitionToArchive" LifecyclePolicyProperty = Value Prelude.Text
set :: PropertyType "TransitionToArchive" LifecyclePolicyProperty
-> LifecyclePolicyProperty -> LifecyclePolicyProperty
set PropertyType "TransitionToArchive" LifecyclePolicyProperty
newValue LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
transitionToArchive :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToIA :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToPrimaryStorageClass :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
= LifecyclePolicyProperty
{transitionToArchive :: Maybe (Value Text)
transitionToArchive = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TransitionToArchive" LifecyclePolicyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
haddock_workaround_ :: ()
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
instance Property "TransitionToIA" LifecyclePolicyProperty where
type PropertyType "TransitionToIA" LifecyclePolicyProperty = Value Prelude.Text
set :: PropertyType "TransitionToIA" LifecyclePolicyProperty
-> LifecyclePolicyProperty -> LifecyclePolicyProperty
set PropertyType "TransitionToIA" LifecyclePolicyProperty
newValue LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
transitionToArchive :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToIA :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToPrimaryStorageClass :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
= LifecyclePolicyProperty
{transitionToIA :: Maybe (Value Text)
transitionToIA = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TransitionToIA" LifecyclePolicyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
instance Property "TransitionToPrimaryStorageClass" LifecyclePolicyProperty where
type PropertyType "TransitionToPrimaryStorageClass" LifecyclePolicyProperty = Value Prelude.Text
set :: PropertyType
"TransitionToPrimaryStorageClass" LifecyclePolicyProperty
-> LifecyclePolicyProperty -> LifecyclePolicyProperty
set PropertyType
"TransitionToPrimaryStorageClass" LifecyclePolicyProperty
newValue LifecyclePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: LifecyclePolicyProperty -> ()
transitionToArchive :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToIA :: LifecyclePolicyProperty -> Maybe (Value Text)
transitionToPrimaryStorageClass :: LifecyclePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
transitionToPrimaryStorageClass :: Maybe (Value Text)
..}
= LifecyclePolicyProperty
{transitionToPrimaryStorageClass :: Maybe (Value Text)
transitionToPrimaryStorageClass = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"TransitionToPrimaryStorageClass" LifecyclePolicyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
haddock_workaround_ :: ()
transitionToArchive :: Maybe (Value Text)
transitionToIA :: Maybe (Value Text)
..}