module Stratosphere.Bedrock.Guardrail.ContextualGroundingFilterConfigProperty (
ContextualGroundingFilterConfigProperty(..),
mkContextualGroundingFilterConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ContextualGroundingFilterConfigProperty
=
ContextualGroundingFilterConfigProperty {ContextualGroundingFilterConfigProperty -> ()
haddock_workaround_ :: (),
ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
action :: (Prelude.Maybe (Value Prelude.Text)),
ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
ContextualGroundingFilterConfigProperty -> Value Double
threshold :: (Value Prelude.Double),
ContextualGroundingFilterConfigProperty -> Value Text
type' :: (Value Prelude.Text)}
deriving stock (ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool
(ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool)
-> (ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool)
-> Eq ContextualGroundingFilterConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool
== :: ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool
$c/= :: ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool
/= :: ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty -> Bool
Prelude.Eq, Int -> ContextualGroundingFilterConfigProperty -> ShowS
[ContextualGroundingFilterConfigProperty] -> ShowS
ContextualGroundingFilterConfigProperty -> String
(Int -> ContextualGroundingFilterConfigProperty -> ShowS)
-> (ContextualGroundingFilterConfigProperty -> String)
-> ([ContextualGroundingFilterConfigProperty] -> ShowS)
-> Show ContextualGroundingFilterConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ContextualGroundingFilterConfigProperty -> ShowS
showsPrec :: Int -> ContextualGroundingFilterConfigProperty -> ShowS
$cshow :: ContextualGroundingFilterConfigProperty -> String
show :: ContextualGroundingFilterConfigProperty -> String
$cshowList :: [ContextualGroundingFilterConfigProperty] -> ShowS
showList :: [ContextualGroundingFilterConfigProperty] -> ShowS
Prelude.Show)
mkContextualGroundingFilterConfigProperty ::
Value Prelude.Double
-> Value Prelude.Text -> ContextualGroundingFilterConfigProperty
mkContextualGroundingFilterConfigProperty :: Value Double
-> Value Text -> ContextualGroundingFilterConfigProperty
mkContextualGroundingFilterConfigProperty Value Double
threshold Value Text
type'
= ContextualGroundingFilterConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), threshold :: Value Double
threshold = Value Double
threshold, type' :: Value Text
type' = Value Text
type',
action :: Maybe (Value Text)
action = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ContextualGroundingFilterConfigProperty where
toResourceProperties :: ContextualGroundingFilterConfigProperty -> ResourceProperties
toResourceProperties ContextualGroundingFilterConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ContextualGroundingFilterConfigProperty -> ()
action :: ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
enabled :: ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
threshold :: ContextualGroundingFilterConfigProperty -> Value Double
type' :: ContextualGroundingFilterConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::Guardrail.ContextualGroundingFilterConfig",
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
"Threshold" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
threshold, 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
"Action" (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)
action,
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
"Enabled" (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)
enabled]))}
instance JSON.ToJSON ContextualGroundingFilterConfigProperty where
toJSON :: ContextualGroundingFilterConfigProperty -> Value
toJSON ContextualGroundingFilterConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ContextualGroundingFilterConfigProperty -> ()
action :: ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
enabled :: ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
threshold :: ContextualGroundingFilterConfigProperty -> Value Double
type' :: ContextualGroundingFilterConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
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
"Threshold" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
threshold, 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
"Action" (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)
action,
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
"Enabled" (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)
enabled])))
instance Property "Action" ContextualGroundingFilterConfigProperty where
type PropertyType "Action" ContextualGroundingFilterConfigProperty = Value Prelude.Text
set :: PropertyType "Action" ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
set PropertyType "Action" ContextualGroundingFilterConfigProperty
newValue ContextualGroundingFilterConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ContextualGroundingFilterConfigProperty -> ()
action :: ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
enabled :: ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
threshold :: ContextualGroundingFilterConfigProperty -> Value Double
type' :: ContextualGroundingFilterConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
..}
= ContextualGroundingFilterConfigProperty
{action :: Maybe (Value Text)
action = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Action" ContextualGroundingFilterConfigProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Double
Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
..}
instance Property "Enabled" ContextualGroundingFilterConfigProperty where
type PropertyType "Enabled" ContextualGroundingFilterConfigProperty = Value Prelude.Bool
set :: PropertyType "Enabled" ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
set PropertyType "Enabled" ContextualGroundingFilterConfigProperty
newValue ContextualGroundingFilterConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ContextualGroundingFilterConfigProperty -> ()
action :: ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
enabled :: ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
threshold :: ContextualGroundingFilterConfigProperty -> Value Double
type' :: ContextualGroundingFilterConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
..}
= ContextualGroundingFilterConfigProperty
{enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" ContextualGroundingFilterConfigProperty
Value Bool
newValue, Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
threshold :: Value Double
type' :: Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
threshold :: Value Double
type' :: Value Text
..}
instance Property "Threshold" ContextualGroundingFilterConfigProperty where
type PropertyType "Threshold" ContextualGroundingFilterConfigProperty = Value Prelude.Double
set :: PropertyType "Threshold" ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
set PropertyType "Threshold" ContextualGroundingFilterConfigProperty
newValue ContextualGroundingFilterConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ContextualGroundingFilterConfigProperty -> ()
action :: ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
enabled :: ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
threshold :: ContextualGroundingFilterConfigProperty -> Value Double
type' :: ContextualGroundingFilterConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
..}
= ContextualGroundingFilterConfigProperty
{threshold :: Value Double
threshold = PropertyType "Threshold" ContextualGroundingFilterConfigProperty
Value Double
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
type' :: Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
type' :: Value Text
..}
instance Property "Type" ContextualGroundingFilterConfigProperty where
type PropertyType "Type" ContextualGroundingFilterConfigProperty = Value Prelude.Text
set :: PropertyType "Type" ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
-> ContextualGroundingFilterConfigProperty
set PropertyType "Type" ContextualGroundingFilterConfigProperty
newValue ContextualGroundingFilterConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: ContextualGroundingFilterConfigProperty -> ()
action :: ContextualGroundingFilterConfigProperty -> Maybe (Value Text)
enabled :: ContextualGroundingFilterConfigProperty -> Maybe (Value Bool)
threshold :: ContextualGroundingFilterConfigProperty -> Value Double
type' :: ContextualGroundingFilterConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
type' :: Value Text
..}
= ContextualGroundingFilterConfigProperty {type' :: Value Text
type' = PropertyType "Type" ContextualGroundingFilterConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
haddock_workaround_ :: ()
action :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
threshold :: Value Double
..}