module Stratosphere.Amplify.App.CustomRuleProperty (
CustomRuleProperty(..), mkCustomRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomRuleProperty
=
CustomRuleProperty {CustomRuleProperty -> ()
haddock_workaround_ :: (),
CustomRuleProperty -> Maybe (Value Text)
condition :: (Prelude.Maybe (Value Prelude.Text)),
CustomRuleProperty -> Value Text
source :: (Value Prelude.Text),
CustomRuleProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text)),
CustomRuleProperty -> Value Text
target :: (Value Prelude.Text)}
deriving stock (CustomRuleProperty -> CustomRuleProperty -> Bool
(CustomRuleProperty -> CustomRuleProperty -> Bool)
-> (CustomRuleProperty -> CustomRuleProperty -> Bool)
-> Eq CustomRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomRuleProperty -> CustomRuleProperty -> Bool
== :: CustomRuleProperty -> CustomRuleProperty -> Bool
$c/= :: CustomRuleProperty -> CustomRuleProperty -> Bool
/= :: CustomRuleProperty -> CustomRuleProperty -> Bool
Prelude.Eq, Int -> CustomRuleProperty -> ShowS
[CustomRuleProperty] -> ShowS
CustomRuleProperty -> String
(Int -> CustomRuleProperty -> ShowS)
-> (CustomRuleProperty -> String)
-> ([CustomRuleProperty] -> ShowS)
-> Show CustomRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomRuleProperty -> ShowS
showsPrec :: Int -> CustomRuleProperty -> ShowS
$cshow :: CustomRuleProperty -> String
show :: CustomRuleProperty -> String
$cshowList :: [CustomRuleProperty] -> ShowS
showList :: [CustomRuleProperty] -> ShowS
Prelude.Show)
mkCustomRuleProperty ::
Value Prelude.Text -> Value Prelude.Text -> CustomRuleProperty
mkCustomRuleProperty :: Value Text -> Value Text -> CustomRuleProperty
mkCustomRuleProperty Value Text
source Value Text
target
= CustomRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), source :: Value Text
source = Value Text
source, target :: Value Text
target = Value Text
target,
condition :: Maybe (Value Text)
condition = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomRuleProperty where
toResourceProperties :: CustomRuleProperty -> ResourceProperties
toResourceProperties CustomRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomRuleProperty -> ()
condition :: CustomRuleProperty -> Maybe (Value Text)
source :: CustomRuleProperty -> Value Text
status :: CustomRuleProperty -> Maybe (Value Text)
target :: CustomRuleProperty -> Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Amplify::App.CustomRule",
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
"Source" 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
source, Key
"Target" 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
target]
([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
"Condition" (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)
condition,
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
"Status" (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)
status]))}
instance JSON.ToJSON CustomRuleProperty where
toJSON :: CustomRuleProperty -> Value
toJSON CustomRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomRuleProperty -> ()
condition :: CustomRuleProperty -> Maybe (Value Text)
source :: CustomRuleProperty -> Value Text
status :: CustomRuleProperty -> Maybe (Value Text)
target :: CustomRuleProperty -> Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
target :: 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
"Source" 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
source, Key
"Target" 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
target]
([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
"Condition" (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)
condition,
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
"Status" (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)
status])))
instance Property "Condition" CustomRuleProperty where
type PropertyType "Condition" CustomRuleProperty = Value Prelude.Text
set :: PropertyType "Condition" CustomRuleProperty
-> CustomRuleProperty -> CustomRuleProperty
set PropertyType "Condition" CustomRuleProperty
newValue CustomRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomRuleProperty -> ()
condition :: CustomRuleProperty -> Maybe (Value Text)
source :: CustomRuleProperty -> Value Text
status :: CustomRuleProperty -> Maybe (Value Text)
target :: CustomRuleProperty -> Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
..}
= CustomRuleProperty {condition :: Maybe (Value Text)
condition = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Condition" CustomRuleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
haddock_workaround_ :: ()
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
..}
instance Property "Source" CustomRuleProperty where
type PropertyType "Source" CustomRuleProperty = Value Prelude.Text
set :: PropertyType "Source" CustomRuleProperty
-> CustomRuleProperty -> CustomRuleProperty
set PropertyType "Source" CustomRuleProperty
newValue CustomRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomRuleProperty -> ()
condition :: CustomRuleProperty -> Maybe (Value Text)
source :: CustomRuleProperty -> Value Text
status :: CustomRuleProperty -> Maybe (Value Text)
target :: CustomRuleProperty -> Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
..}
= CustomRuleProperty {source :: Value Text
source = PropertyType "Source" CustomRuleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
status :: Maybe (Value Text)
target :: Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
status :: Maybe (Value Text)
target :: Value Text
..}
instance Property "Status" CustomRuleProperty where
type PropertyType "Status" CustomRuleProperty = Value Prelude.Text
set :: PropertyType "Status" CustomRuleProperty
-> CustomRuleProperty -> CustomRuleProperty
set PropertyType "Status" CustomRuleProperty
newValue CustomRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomRuleProperty -> ()
condition :: CustomRuleProperty -> Maybe (Value Text)
source :: CustomRuleProperty -> Value Text
status :: CustomRuleProperty -> Maybe (Value Text)
target :: CustomRuleProperty -> Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
..}
= CustomRuleProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" CustomRuleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
target :: Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
target :: Value Text
..}
instance Property "Target" CustomRuleProperty where
type PropertyType "Target" CustomRuleProperty = Value Prelude.Text
set :: PropertyType "Target" CustomRuleProperty
-> CustomRuleProperty -> CustomRuleProperty
set PropertyType "Target" CustomRuleProperty
newValue CustomRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomRuleProperty -> ()
condition :: CustomRuleProperty -> Maybe (Value Text)
source :: CustomRuleProperty -> Value Text
status :: CustomRuleProperty -> Maybe (Value Text)
target :: CustomRuleProperty -> Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
target :: Value Text
..}
= CustomRuleProperty {target :: Value Text
target = PropertyType "Target" CustomRuleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Maybe (Value Text)
source :: Value Text
status :: Maybe (Value Text)
..}