module Stratosphere.DLM.LifecyclePolicy.ShareRuleProperty (
ShareRuleProperty(..), mkShareRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ShareRuleProperty
=
ShareRuleProperty {ShareRuleProperty -> ()
haddock_workaround_ :: (),
ShareRuleProperty -> Maybe (ValueList Text)
targetAccounts :: (Prelude.Maybe (ValueList Prelude.Text)),
ShareRuleProperty -> Maybe (Value Integer)
unshareInterval :: (Prelude.Maybe (Value Prelude.Integer)),
ShareRuleProperty -> Maybe (Value Text)
unshareIntervalUnit :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ShareRuleProperty -> ShareRuleProperty -> Bool
(ShareRuleProperty -> ShareRuleProperty -> Bool)
-> (ShareRuleProperty -> ShareRuleProperty -> Bool)
-> Eq ShareRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ShareRuleProperty -> ShareRuleProperty -> Bool
== :: ShareRuleProperty -> ShareRuleProperty -> Bool
$c/= :: ShareRuleProperty -> ShareRuleProperty -> Bool
/= :: ShareRuleProperty -> ShareRuleProperty -> Bool
Prelude.Eq, Int -> ShareRuleProperty -> ShowS
[ShareRuleProperty] -> ShowS
ShareRuleProperty -> String
(Int -> ShareRuleProperty -> ShowS)
-> (ShareRuleProperty -> String)
-> ([ShareRuleProperty] -> ShowS)
-> Show ShareRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ShareRuleProperty -> ShowS
showsPrec :: Int -> ShareRuleProperty -> ShowS
$cshow :: ShareRuleProperty -> String
show :: ShareRuleProperty -> String
$cshowList :: [ShareRuleProperty] -> ShowS
showList :: [ShareRuleProperty] -> ShowS
Prelude.Show)
mkShareRuleProperty :: ShareRuleProperty
mkShareRuleProperty :: ShareRuleProperty
mkShareRuleProperty
= ShareRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), targetAccounts :: Maybe (ValueList Text)
targetAccounts = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
unshareInterval :: Maybe (Value Integer)
unshareInterval = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
unshareIntervalUnit :: Maybe (Value Text)
unshareIntervalUnit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ShareRuleProperty where
toResourceProperties :: ShareRuleProperty -> ResourceProperties
toResourceProperties ShareRuleProperty {Maybe (ValueList Text)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ShareRuleProperty -> ()
targetAccounts :: ShareRuleProperty -> Maybe (ValueList Text)
unshareInterval :: ShareRuleProperty -> Maybe (Value Integer)
unshareIntervalUnit :: ShareRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DLM::LifecyclePolicy.ShareRule",
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 -> ValueList 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
"TargetAccounts" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
targetAccounts,
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
"UnshareInterval" (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)
unshareInterval,
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
"UnshareIntervalUnit" (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)
unshareIntervalUnit])}
instance JSON.ToJSON ShareRuleProperty where
toJSON :: ShareRuleProperty -> Value
toJSON ShareRuleProperty {Maybe (ValueList Text)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ShareRuleProperty -> ()
targetAccounts :: ShareRuleProperty -> Maybe (ValueList Text)
unshareInterval :: ShareRuleProperty -> Maybe (Value Integer)
unshareIntervalUnit :: ShareRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: 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 -> ValueList 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
"TargetAccounts" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
targetAccounts,
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
"UnshareInterval" (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)
unshareInterval,
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
"UnshareIntervalUnit" (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)
unshareIntervalUnit]))
instance Property "TargetAccounts" ShareRuleProperty where
type PropertyType "TargetAccounts" ShareRuleProperty = ValueList Prelude.Text
set :: PropertyType "TargetAccounts" ShareRuleProperty
-> ShareRuleProperty -> ShareRuleProperty
set PropertyType "TargetAccounts" ShareRuleProperty
newValue ShareRuleProperty {Maybe (ValueList Text)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ShareRuleProperty -> ()
targetAccounts :: ShareRuleProperty -> Maybe (ValueList Text)
unshareInterval :: ShareRuleProperty -> Maybe (Value Integer)
unshareIntervalUnit :: ShareRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: Maybe (Value Text)
..}
= ShareRuleProperty {targetAccounts :: Maybe (ValueList Text)
targetAccounts = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetAccounts" ShareRuleProperty
ValueList Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: Maybe (Value Text)
haddock_workaround_ :: ()
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: Maybe (Value Text)
..}
instance Property "UnshareInterval" ShareRuleProperty where
type PropertyType "UnshareInterval" ShareRuleProperty = Value Prelude.Integer
set :: PropertyType "UnshareInterval" ShareRuleProperty
-> ShareRuleProperty -> ShareRuleProperty
set PropertyType "UnshareInterval" ShareRuleProperty
newValue ShareRuleProperty {Maybe (ValueList Text)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ShareRuleProperty -> ()
targetAccounts :: ShareRuleProperty -> Maybe (ValueList Text)
unshareInterval :: ShareRuleProperty -> Maybe (Value Integer)
unshareIntervalUnit :: ShareRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: Maybe (Value Text)
..}
= ShareRuleProperty {unshareInterval :: Maybe (Value Integer)
unshareInterval = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UnshareInterval" ShareRuleProperty
Value Integer
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareIntervalUnit :: Maybe (Value Text)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareIntervalUnit :: Maybe (Value Text)
..}
instance Property "UnshareIntervalUnit" ShareRuleProperty where
type PropertyType "UnshareIntervalUnit" ShareRuleProperty = Value Prelude.Text
set :: PropertyType "UnshareIntervalUnit" ShareRuleProperty
-> ShareRuleProperty -> ShareRuleProperty
set PropertyType "UnshareIntervalUnit" ShareRuleProperty
newValue ShareRuleProperty {Maybe (ValueList Text)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ShareRuleProperty -> ()
targetAccounts :: ShareRuleProperty -> Maybe (ValueList Text)
unshareInterval :: ShareRuleProperty -> Maybe (Value Integer)
unshareIntervalUnit :: ShareRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
unshareIntervalUnit :: Maybe (Value Text)
..}
= ShareRuleProperty
{unshareIntervalUnit :: Maybe (Value Text)
unshareIntervalUnit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UnshareIntervalUnit" ShareRuleProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
haddock_workaround_ :: ()
targetAccounts :: Maybe (ValueList Text)
unshareInterval :: Maybe (Value Integer)
..}