module Stratosphere.Bedrock.AutomatedReasoningPolicy (
module Exports, AutomatedReasoningPolicy(..),
mkAutomatedReasoningPolicy
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.AutomatedReasoningPolicy.PolicyDefinitionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data AutomatedReasoningPolicy
=
AutomatedReasoningPolicy {AutomatedReasoningPolicy -> ()
haddock_workaround_ :: (),
AutomatedReasoningPolicy -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
AutomatedReasoningPolicy -> Value Text
name :: (Value Prelude.Text),
AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
policyDefinition :: (Prelude.Maybe PolicyDefinitionProperty),
AutomatedReasoningPolicy -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool
(AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool)
-> (AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool)
-> Eq AutomatedReasoningPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool
== :: AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool
$c/= :: AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool
/= :: AutomatedReasoningPolicy -> AutomatedReasoningPolicy -> Bool
Prelude.Eq, Int -> AutomatedReasoningPolicy -> ShowS
[AutomatedReasoningPolicy] -> ShowS
AutomatedReasoningPolicy -> String
(Int -> AutomatedReasoningPolicy -> ShowS)
-> (AutomatedReasoningPolicy -> String)
-> ([AutomatedReasoningPolicy] -> ShowS)
-> Show AutomatedReasoningPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutomatedReasoningPolicy -> ShowS
showsPrec :: Int -> AutomatedReasoningPolicy -> ShowS
$cshow :: AutomatedReasoningPolicy -> String
show :: AutomatedReasoningPolicy -> String
$cshowList :: [AutomatedReasoningPolicy] -> ShowS
showList :: [AutomatedReasoningPolicy] -> ShowS
Prelude.Show)
mkAutomatedReasoningPolicy ::
Value Prelude.Text -> AutomatedReasoningPolicy
mkAutomatedReasoningPolicy :: Value Text -> AutomatedReasoningPolicy
mkAutomatedReasoningPolicy Value Text
name
= AutomatedReasoningPolicy
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, policyDefinition :: Maybe PolicyDefinitionProperty
policyDefinition = Maybe PolicyDefinitionProperty
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutomatedReasoningPolicy where
toResourceProperties :: AutomatedReasoningPolicy -> ResourceProperties
toResourceProperties AutomatedReasoningPolicy {Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: AutomatedReasoningPolicy -> ()
description :: AutomatedReasoningPolicy -> Maybe (Value Text)
name :: AutomatedReasoningPolicy -> Value Text
policyDefinition :: AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
tags :: AutomatedReasoningPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::AutomatedReasoningPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"Name" 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
name]
([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
"Description" (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)
description,
Key -> PolicyDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PolicyDefinition" (PolicyDefinitionProperty -> (Key, Value))
-> Maybe PolicyDefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyDefinitionProperty
policyDefinition,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON AutomatedReasoningPolicy where
toJSON :: AutomatedReasoningPolicy -> Value
toJSON AutomatedReasoningPolicy {Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: AutomatedReasoningPolicy -> ()
description :: AutomatedReasoningPolicy -> Maybe (Value Text)
name :: AutomatedReasoningPolicy -> Value Text
policyDefinition :: AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
tags :: AutomatedReasoningPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
= [(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
"Name" 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
name]
([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
"Description" (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)
description,
Key -> PolicyDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PolicyDefinition" (PolicyDefinitionProperty -> (Key, Value))
-> Maybe PolicyDefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyDefinitionProperty
policyDefinition,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" AutomatedReasoningPolicy where
type PropertyType "Description" AutomatedReasoningPolicy = Value Prelude.Text
set :: PropertyType "Description" AutomatedReasoningPolicy
-> AutomatedReasoningPolicy -> AutomatedReasoningPolicy
set PropertyType "Description" AutomatedReasoningPolicy
newValue AutomatedReasoningPolicy {Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: AutomatedReasoningPolicy -> ()
description :: AutomatedReasoningPolicy -> Maybe (Value Text)
name :: AutomatedReasoningPolicy -> Value Text
policyDefinition :: AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
tags :: AutomatedReasoningPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
= AutomatedReasoningPolicy
{description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" AutomatedReasoningPolicy
Value Text
newValue, Maybe [Tag]
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
instance Property "Name" AutomatedReasoningPolicy where
type PropertyType "Name" AutomatedReasoningPolicy = Value Prelude.Text
set :: PropertyType "Name" AutomatedReasoningPolicy
-> AutomatedReasoningPolicy -> AutomatedReasoningPolicy
set PropertyType "Name" AutomatedReasoningPolicy
newValue AutomatedReasoningPolicy {Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: AutomatedReasoningPolicy -> ()
description :: AutomatedReasoningPolicy -> Maybe (Value Text)
name :: AutomatedReasoningPolicy -> Value Text
policyDefinition :: AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
tags :: AutomatedReasoningPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
= AutomatedReasoningPolicy {name :: Value Text
name = PropertyType "Name" AutomatedReasoningPolicy
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
instance Property "PolicyDefinition" AutomatedReasoningPolicy where
type PropertyType "PolicyDefinition" AutomatedReasoningPolicy = PolicyDefinitionProperty
set :: PropertyType "PolicyDefinition" AutomatedReasoningPolicy
-> AutomatedReasoningPolicy -> AutomatedReasoningPolicy
set PropertyType "PolicyDefinition" AutomatedReasoningPolicy
newValue AutomatedReasoningPolicy {Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: AutomatedReasoningPolicy -> ()
description :: AutomatedReasoningPolicy -> Maybe (Value Text)
name :: AutomatedReasoningPolicy -> Value Text
policyDefinition :: AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
tags :: AutomatedReasoningPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
= AutomatedReasoningPolicy
{policyDefinition :: Maybe PolicyDefinitionProperty
policyDefinition = PolicyDefinitionProperty -> Maybe PolicyDefinitionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PolicyDefinition" AutomatedReasoningPolicy
PolicyDefinitionProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" AutomatedReasoningPolicy where
type PropertyType "Tags" AutomatedReasoningPolicy = [Tag]
set :: PropertyType "Tags" AutomatedReasoningPolicy
-> AutomatedReasoningPolicy -> AutomatedReasoningPolicy
set PropertyType "Tags" AutomatedReasoningPolicy
newValue AutomatedReasoningPolicy {Maybe [Tag]
Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: AutomatedReasoningPolicy -> ()
description :: AutomatedReasoningPolicy -> Maybe (Value Text)
name :: AutomatedReasoningPolicy -> Value Text
policyDefinition :: AutomatedReasoningPolicy -> Maybe PolicyDefinitionProperty
tags :: AutomatedReasoningPolicy -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
tags :: Maybe [Tag]
..}
= AutomatedReasoningPolicy {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" AutomatedReasoningPolicy
newValue, Maybe (Value Text)
Maybe PolicyDefinitionProperty
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
policyDefinition :: Maybe PolicyDefinitionProperty
..}