module Stratosphere.Bedrock.AutomatedReasoningPolicy.PolicyDefinitionRuleProperty (
PolicyDefinitionRuleProperty(..), mkPolicyDefinitionRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PolicyDefinitionRuleProperty
=
PolicyDefinitionRuleProperty {PolicyDefinitionRuleProperty -> ()
haddock_workaround_ :: (),
PolicyDefinitionRuleProperty -> Maybe (Value Text)
alternateExpression :: (Prelude.Maybe (Value Prelude.Text)),
PolicyDefinitionRuleProperty -> Value Text
expression :: (Value Prelude.Text),
PolicyDefinitionRuleProperty -> Value Text
id :: (Value Prelude.Text)}
deriving stock (PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool
(PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool)
-> (PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool)
-> Eq PolicyDefinitionRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool
== :: PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool
$c/= :: PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool
/= :: PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> Bool
Prelude.Eq, Int -> PolicyDefinitionRuleProperty -> ShowS
[PolicyDefinitionRuleProperty] -> ShowS
PolicyDefinitionRuleProperty -> String
(Int -> PolicyDefinitionRuleProperty -> ShowS)
-> (PolicyDefinitionRuleProperty -> String)
-> ([PolicyDefinitionRuleProperty] -> ShowS)
-> Show PolicyDefinitionRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyDefinitionRuleProperty -> ShowS
showsPrec :: Int -> PolicyDefinitionRuleProperty -> ShowS
$cshow :: PolicyDefinitionRuleProperty -> String
show :: PolicyDefinitionRuleProperty -> String
$cshowList :: [PolicyDefinitionRuleProperty] -> ShowS
showList :: [PolicyDefinitionRuleProperty] -> ShowS
Prelude.Show)
mkPolicyDefinitionRuleProperty ::
Value Prelude.Text
-> Value Prelude.Text -> PolicyDefinitionRuleProperty
mkPolicyDefinitionRuleProperty :: Value Text -> Value Text -> PolicyDefinitionRuleProperty
mkPolicyDefinitionRuleProperty Value Text
expression Value Text
id
= PolicyDefinitionRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), expression :: Value Text
expression = Value Text
expression, id :: Value Text
id = Value Text
id,
alternateExpression :: Maybe (Value Text)
alternateExpression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PolicyDefinitionRuleProperty where
toResourceProperties :: PolicyDefinitionRuleProperty -> ResourceProperties
toResourceProperties PolicyDefinitionRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PolicyDefinitionRuleProperty -> ()
alternateExpression :: PolicyDefinitionRuleProperty -> Maybe (Value Text)
expression :: PolicyDefinitionRuleProperty -> Value Text
id :: PolicyDefinitionRuleProperty -> Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
id :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::AutomatedReasoningPolicy.PolicyDefinitionRule",
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
"Expression" 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
expression, Key
"Id" 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
id]
([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
"AlternateExpression"
(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)
alternateExpression]))}
instance JSON.ToJSON PolicyDefinitionRuleProperty where
toJSON :: PolicyDefinitionRuleProperty -> Value
toJSON PolicyDefinitionRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PolicyDefinitionRuleProperty -> ()
alternateExpression :: PolicyDefinitionRuleProperty -> Maybe (Value Text)
expression :: PolicyDefinitionRuleProperty -> Value Text
id :: PolicyDefinitionRuleProperty -> Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
id :: 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
"Expression" 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
expression, Key
"Id" 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
id]
([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
"AlternateExpression"
(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)
alternateExpression])))
instance Property "AlternateExpression" PolicyDefinitionRuleProperty where
type PropertyType "AlternateExpression" PolicyDefinitionRuleProperty = Value Prelude.Text
set :: PropertyType "AlternateExpression" PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> PolicyDefinitionRuleProperty
set PropertyType "AlternateExpression" PolicyDefinitionRuleProperty
newValue PolicyDefinitionRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PolicyDefinitionRuleProperty -> ()
alternateExpression :: PolicyDefinitionRuleProperty -> Maybe (Value Text)
expression :: PolicyDefinitionRuleProperty -> Value Text
id :: PolicyDefinitionRuleProperty -> Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
id :: Value Text
..}
= PolicyDefinitionRuleProperty
{alternateExpression :: Maybe (Value Text)
alternateExpression = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AlternateExpression" PolicyDefinitionRuleProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
expression :: Value Text
id :: Value Text
haddock_workaround_ :: ()
expression :: Value Text
id :: Value Text
..}
instance Property "Expression" PolicyDefinitionRuleProperty where
type PropertyType "Expression" PolicyDefinitionRuleProperty = Value Prelude.Text
set :: PropertyType "Expression" PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> PolicyDefinitionRuleProperty
set PropertyType "Expression" PolicyDefinitionRuleProperty
newValue PolicyDefinitionRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PolicyDefinitionRuleProperty -> ()
alternateExpression :: PolicyDefinitionRuleProperty -> Maybe (Value Text)
expression :: PolicyDefinitionRuleProperty -> Value Text
id :: PolicyDefinitionRuleProperty -> Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
id :: Value Text
..}
= PolicyDefinitionRuleProperty {expression :: Value Text
expression = PropertyType "Expression" PolicyDefinitionRuleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
id :: Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
id :: Value Text
..}
instance Property "Id" PolicyDefinitionRuleProperty where
type PropertyType "Id" PolicyDefinitionRuleProperty = Value Prelude.Text
set :: PropertyType "Id" PolicyDefinitionRuleProperty
-> PolicyDefinitionRuleProperty -> PolicyDefinitionRuleProperty
set PropertyType "Id" PolicyDefinitionRuleProperty
newValue PolicyDefinitionRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PolicyDefinitionRuleProperty -> ()
alternateExpression :: PolicyDefinitionRuleProperty -> Maybe (Value Text)
expression :: PolicyDefinitionRuleProperty -> Value Text
id :: PolicyDefinitionRuleProperty -> Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
id :: Value Text
..}
= PolicyDefinitionRuleProperty {id :: Value Text
id = PropertyType "Id" PolicyDefinitionRuleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
haddock_workaround_ :: ()
alternateExpression :: Maybe (Value Text)
expression :: Value Text
..}