module Stratosphere.Bedrock.Guardrail.ManagedWordsConfigProperty (
ManagedWordsConfigProperty(..), mkManagedWordsConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManagedWordsConfigProperty
=
ManagedWordsConfigProperty {ManagedWordsConfigProperty -> ()
haddock_workaround_ :: (),
ManagedWordsConfigProperty -> Maybe (Value Text)
inputAction :: (Prelude.Maybe (Value Prelude.Text)),
ManagedWordsConfigProperty -> Maybe (Value Bool)
inputEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
ManagedWordsConfigProperty -> Maybe (Value Text)
outputAction :: (Prelude.Maybe (Value Prelude.Text)),
ManagedWordsConfigProperty -> Maybe (Value Bool)
outputEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
ManagedWordsConfigProperty -> Value Text
type' :: (Value Prelude.Text)}
deriving stock (ManagedWordsConfigProperty -> ManagedWordsConfigProperty -> Bool
(ManagedWordsConfigProperty -> ManagedWordsConfigProperty -> Bool)
-> (ManagedWordsConfigProperty
-> ManagedWordsConfigProperty -> Bool)
-> Eq ManagedWordsConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManagedWordsConfigProperty -> ManagedWordsConfigProperty -> Bool
== :: ManagedWordsConfigProperty -> ManagedWordsConfigProperty -> Bool
$c/= :: ManagedWordsConfigProperty -> ManagedWordsConfigProperty -> Bool
/= :: ManagedWordsConfigProperty -> ManagedWordsConfigProperty -> Bool
Prelude.Eq, Int -> ManagedWordsConfigProperty -> ShowS
[ManagedWordsConfigProperty] -> ShowS
ManagedWordsConfigProperty -> String
(Int -> ManagedWordsConfigProperty -> ShowS)
-> (ManagedWordsConfigProperty -> String)
-> ([ManagedWordsConfigProperty] -> ShowS)
-> Show ManagedWordsConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManagedWordsConfigProperty -> ShowS
showsPrec :: Int -> ManagedWordsConfigProperty -> ShowS
$cshow :: ManagedWordsConfigProperty -> String
show :: ManagedWordsConfigProperty -> String
$cshowList :: [ManagedWordsConfigProperty] -> ShowS
showList :: [ManagedWordsConfigProperty] -> ShowS
Prelude.Show)
mkManagedWordsConfigProperty ::
Value Prelude.Text -> ManagedWordsConfigProperty
mkManagedWordsConfigProperty :: Value Text -> ManagedWordsConfigProperty
mkManagedWordsConfigProperty Value Text
type'
= ManagedWordsConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
inputAction :: Maybe (Value Text)
inputAction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, inputEnabled :: Maybe (Value Bool)
inputEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
outputAction :: Maybe (Value Text)
outputAction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, outputEnabled :: Maybe (Value Bool)
outputEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManagedWordsConfigProperty where
toResourceProperties :: ManagedWordsConfigProperty -> ResourceProperties
toResourceProperties ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::Guardrail.ManagedWordsConfig",
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
"Type" 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
type']
([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
"InputAction" (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)
inputAction,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
inputEnabled,
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
"OutputAction" (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)
outputAction,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OutputEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
outputEnabled]))}
instance JSON.ToJSON ManagedWordsConfigProperty where
toJSON :: ManagedWordsConfigProperty -> Value
toJSON ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: 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
"Type" 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
type']
([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
"InputAction" (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)
inputAction,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
inputEnabled,
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
"OutputAction" (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)
outputAction,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OutputEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
outputEnabled])))
instance Property "InputAction" ManagedWordsConfigProperty where
type PropertyType "InputAction" ManagedWordsConfigProperty = Value Prelude.Text
set :: PropertyType "InputAction" ManagedWordsConfigProperty
-> ManagedWordsConfigProperty -> ManagedWordsConfigProperty
set PropertyType "InputAction" ManagedWordsConfigProperty
newValue ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
= ManagedWordsConfigProperty
{inputAction :: Maybe (Value Text)
inputAction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InputAction" ManagedWordsConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
haddock_workaround_ :: ()
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
instance Property "InputEnabled" ManagedWordsConfigProperty where
type PropertyType "InputEnabled" ManagedWordsConfigProperty = Value Prelude.Bool
set :: PropertyType "InputEnabled" ManagedWordsConfigProperty
-> ManagedWordsConfigProperty -> ManagedWordsConfigProperty
set PropertyType "InputEnabled" ManagedWordsConfigProperty
newValue ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
= ManagedWordsConfigProperty
{inputEnabled :: Maybe (Value Bool)
inputEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InputEnabled" ManagedWordsConfigProperty
Value Bool
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
instance Property "OutputAction" ManagedWordsConfigProperty where
type PropertyType "OutputAction" ManagedWordsConfigProperty = Value Prelude.Text
set :: PropertyType "OutputAction" ManagedWordsConfigProperty
-> ManagedWordsConfigProperty -> ManagedWordsConfigProperty
set PropertyType "OutputAction" ManagedWordsConfigProperty
newValue ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
= ManagedWordsConfigProperty
{outputAction :: Maybe (Value Text)
outputAction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OutputAction" ManagedWordsConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
instance Property "OutputEnabled" ManagedWordsConfigProperty where
type PropertyType "OutputEnabled" ManagedWordsConfigProperty = Value Prelude.Bool
set :: PropertyType "OutputEnabled" ManagedWordsConfigProperty
-> ManagedWordsConfigProperty -> ManagedWordsConfigProperty
set PropertyType "OutputEnabled" ManagedWordsConfigProperty
newValue ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
= ManagedWordsConfigProperty
{outputEnabled :: Maybe (Value Bool)
outputEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OutputEnabled" ManagedWordsConfigProperty
Value Bool
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "Type" ManagedWordsConfigProperty where
type PropertyType "Type" ManagedWordsConfigProperty = Value Prelude.Text
set :: PropertyType "Type" ManagedWordsConfigProperty
-> ManagedWordsConfigProperty -> ManagedWordsConfigProperty
set PropertyType "Type" ManagedWordsConfigProperty
newValue ManagedWordsConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ManagedWordsConfigProperty -> ()
inputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
inputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
outputAction :: ManagedWordsConfigProperty -> Maybe (Value Text)
outputEnabled :: ManagedWordsConfigProperty -> Maybe (Value Bool)
type' :: ManagedWordsConfigProperty -> Value Text
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
type' :: Value Text
..}
= ManagedWordsConfigProperty {type' :: Value Text
type' = PropertyType "Type" ManagedWordsConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
inputAction :: Maybe (Value Text)
inputEnabled :: Maybe (Value Bool)
outputAction :: Maybe (Value Text)
outputEnabled :: Maybe (Value Bool)
..}