module Stratosphere.Wisdom.AIGuardrail.GuardrailRegexConfigProperty (
GuardrailRegexConfigProperty(..), mkGuardrailRegexConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GuardrailRegexConfigProperty
=
GuardrailRegexConfigProperty {GuardrailRegexConfigProperty -> ()
haddock_workaround_ :: (),
GuardrailRegexConfigProperty -> Value Text
action :: (Value Prelude.Text),
GuardrailRegexConfigProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
GuardrailRegexConfigProperty -> Value Text
name :: (Value Prelude.Text),
GuardrailRegexConfigProperty -> Value Text
pattern :: (Value Prelude.Text)}
deriving stock (GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool
(GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool)
-> (GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool)
-> Eq GuardrailRegexConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool
== :: GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool
$c/= :: GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool
/= :: GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> Bool
Prelude.Eq, Int -> GuardrailRegexConfigProperty -> ShowS
[GuardrailRegexConfigProperty] -> ShowS
GuardrailRegexConfigProperty -> String
(Int -> GuardrailRegexConfigProperty -> ShowS)
-> (GuardrailRegexConfigProperty -> String)
-> ([GuardrailRegexConfigProperty] -> ShowS)
-> Show GuardrailRegexConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GuardrailRegexConfigProperty -> ShowS
showsPrec :: Int -> GuardrailRegexConfigProperty -> ShowS
$cshow :: GuardrailRegexConfigProperty -> String
show :: GuardrailRegexConfigProperty -> String
$cshowList :: [GuardrailRegexConfigProperty] -> ShowS
showList :: [GuardrailRegexConfigProperty] -> ShowS
Prelude.Show)
mkGuardrailRegexConfigProperty ::
Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text -> GuardrailRegexConfigProperty
mkGuardrailRegexConfigProperty :: Value Text
-> Value Text -> Value Text -> GuardrailRegexConfigProperty
mkGuardrailRegexConfigProperty Value Text
action Value Text
name Value Text
pattern
= GuardrailRegexConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), action :: Value Text
action = Value Text
action, name :: Value Text
name = Value Text
name,
pattern :: Value Text
pattern = Value Text
pattern, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GuardrailRegexConfigProperty where
toResourceProperties :: GuardrailRegexConfigProperty -> ResourceProperties
toResourceProperties GuardrailRegexConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailRegexConfigProperty -> ()
action :: GuardrailRegexConfigProperty -> Value Text
description :: GuardrailRegexConfigProperty -> Maybe (Value Text)
name :: GuardrailRegexConfigProperty -> Value Text
pattern :: GuardrailRegexConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Wisdom::AIGuardrail.GuardrailRegexConfig",
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
"Action" 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
action, 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,
Key
"Pattern" 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
pattern]
([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]))}
instance JSON.ToJSON GuardrailRegexConfigProperty where
toJSON :: GuardrailRegexConfigProperty -> Value
toJSON GuardrailRegexConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailRegexConfigProperty -> ()
action :: GuardrailRegexConfigProperty -> Value Text
description :: GuardrailRegexConfigProperty -> Maybe (Value Text)
name :: GuardrailRegexConfigProperty -> Value Text
pattern :: GuardrailRegexConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
pattern :: 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
"Action" 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
action, 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,
Key
"Pattern" 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
pattern]
([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])))
instance Property "Action" GuardrailRegexConfigProperty where
type PropertyType "Action" GuardrailRegexConfigProperty = Value Prelude.Text
set :: PropertyType "Action" GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> GuardrailRegexConfigProperty
set PropertyType "Action" GuardrailRegexConfigProperty
newValue GuardrailRegexConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailRegexConfigProperty -> ()
action :: GuardrailRegexConfigProperty -> Value Text
description :: GuardrailRegexConfigProperty -> Maybe (Value Text)
name :: GuardrailRegexConfigProperty -> Value Text
pattern :: GuardrailRegexConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
..}
= GuardrailRegexConfigProperty {action :: Value Text
action = PropertyType "Action" GuardrailRegexConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
..}
instance Property "Description" GuardrailRegexConfigProperty where
type PropertyType "Description" GuardrailRegexConfigProperty = Value Prelude.Text
set :: PropertyType "Description" GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> GuardrailRegexConfigProperty
set PropertyType "Description" GuardrailRegexConfigProperty
newValue GuardrailRegexConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailRegexConfigProperty -> ()
action :: GuardrailRegexConfigProperty -> Value Text
description :: GuardrailRegexConfigProperty -> Maybe (Value Text)
name :: GuardrailRegexConfigProperty -> Value Text
pattern :: GuardrailRegexConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
..}
= GuardrailRegexConfigProperty
{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" GuardrailRegexConfigProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
action :: Value Text
name :: Value Text
pattern :: Value Text
haddock_workaround_ :: ()
action :: Value Text
name :: Value Text
pattern :: Value Text
..}
instance Property "Name" GuardrailRegexConfigProperty where
type PropertyType "Name" GuardrailRegexConfigProperty = Value Prelude.Text
set :: PropertyType "Name" GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> GuardrailRegexConfigProperty
set PropertyType "Name" GuardrailRegexConfigProperty
newValue GuardrailRegexConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailRegexConfigProperty -> ()
action :: GuardrailRegexConfigProperty -> Value Text
description :: GuardrailRegexConfigProperty -> Maybe (Value Text)
name :: GuardrailRegexConfigProperty -> Value Text
pattern :: GuardrailRegexConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
..}
= GuardrailRegexConfigProperty {name :: Value Text
name = PropertyType "Name" GuardrailRegexConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
pattern :: Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
pattern :: Value Text
..}
instance Property "Pattern" GuardrailRegexConfigProperty where
type PropertyType "Pattern" GuardrailRegexConfigProperty = Value Prelude.Text
set :: PropertyType "Pattern" GuardrailRegexConfigProperty
-> GuardrailRegexConfigProperty -> GuardrailRegexConfigProperty
set PropertyType "Pattern" GuardrailRegexConfigProperty
newValue GuardrailRegexConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailRegexConfigProperty -> ()
action :: GuardrailRegexConfigProperty -> Value Text
description :: GuardrailRegexConfigProperty -> Maybe (Value Text)
name :: GuardrailRegexConfigProperty -> Value Text
pattern :: GuardrailRegexConfigProperty -> Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
pattern :: Value Text
..}
= GuardrailRegexConfigProperty {pattern :: Value Text
pattern = PropertyType "Pattern" GuardrailRegexConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
action :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}