module Stratosphere.Bedrock.Agent.GuardrailConfigurationProperty (
        GuardrailConfigurationProperty(..),
        mkGuardrailConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GuardrailConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html>
    GuardrailConfigurationProperty {GuardrailConfigurationProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html#cfn-bedrock-agent-guardrailconfiguration-guardrailidentifier>
                                    GuardrailConfigurationProperty -> Maybe (Value Text)
guardrailIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html#cfn-bedrock-agent-guardrailconfiguration-guardrailversion>
                                    GuardrailConfigurationProperty -> Maybe (Value Text)
guardrailVersion :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> Bool
(GuardrailConfigurationProperty
 -> GuardrailConfigurationProperty -> Bool)
-> (GuardrailConfigurationProperty
    -> GuardrailConfigurationProperty -> Bool)
-> Eq GuardrailConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> Bool
== :: GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> Bool
$c/= :: GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> Bool
/= :: GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> Bool
Prelude.Eq, Int -> GuardrailConfigurationProperty -> ShowS
[GuardrailConfigurationProperty] -> ShowS
GuardrailConfigurationProperty -> String
(Int -> GuardrailConfigurationProperty -> ShowS)
-> (GuardrailConfigurationProperty -> String)
-> ([GuardrailConfigurationProperty] -> ShowS)
-> Show GuardrailConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GuardrailConfigurationProperty -> ShowS
showsPrec :: Int -> GuardrailConfigurationProperty -> ShowS
$cshow :: GuardrailConfigurationProperty -> String
show :: GuardrailConfigurationProperty -> String
$cshowList :: [GuardrailConfigurationProperty] -> ShowS
showList :: [GuardrailConfigurationProperty] -> ShowS
Prelude.Show)
mkGuardrailConfigurationProperty :: GuardrailConfigurationProperty
mkGuardrailConfigurationProperty :: GuardrailConfigurationProperty
mkGuardrailConfigurationProperty
  = GuardrailConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), guardrailIdentifier :: Maybe (Value Text)
guardrailIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       guardrailVersion :: Maybe (Value Text)
guardrailVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GuardrailConfigurationProperty where
  toResourceProperties :: GuardrailConfigurationProperty -> ResourceProperties
toResourceProperties GuardrailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GuardrailConfigurationProperty -> ()
guardrailIdentifier :: GuardrailConfigurationProperty -> Maybe (Value Text)
guardrailVersion :: GuardrailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
guardrailIdentifier :: Maybe (Value Text)
guardrailVersion :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::Agent.GuardrailConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"GuardrailIdentifier" (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)
guardrailIdentifier,
                            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
"GuardrailVersion" (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)
guardrailVersion])}
instance JSON.ToJSON GuardrailConfigurationProperty where
  toJSON :: GuardrailConfigurationProperty -> Value
toJSON GuardrailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GuardrailConfigurationProperty -> ()
guardrailIdentifier :: GuardrailConfigurationProperty -> Maybe (Value Text)
guardrailVersion :: GuardrailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
guardrailIdentifier :: Maybe (Value Text)
guardrailVersion :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"GuardrailIdentifier" (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)
guardrailIdentifier,
               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
"GuardrailVersion" (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)
guardrailVersion]))
instance Property "GuardrailIdentifier" GuardrailConfigurationProperty where
  type PropertyType "GuardrailIdentifier" GuardrailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "GuardrailIdentifier" GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> GuardrailConfigurationProperty
set PropertyType "GuardrailIdentifier" GuardrailConfigurationProperty
newValue GuardrailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GuardrailConfigurationProperty -> ()
guardrailIdentifier :: GuardrailConfigurationProperty -> Maybe (Value Text)
guardrailVersion :: GuardrailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
guardrailIdentifier :: Maybe (Value Text)
guardrailVersion :: Maybe (Value Text)
..}
    = GuardrailConfigurationProperty
        {guardrailIdentifier :: Maybe (Value Text)
guardrailIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GuardrailIdentifier" GuardrailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
guardrailVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
guardrailVersion :: Maybe (Value Text)
..}
instance Property "GuardrailVersion" GuardrailConfigurationProperty where
  type PropertyType "GuardrailVersion" GuardrailConfigurationProperty = Value Prelude.Text
  set :: PropertyType "GuardrailVersion" GuardrailConfigurationProperty
-> GuardrailConfigurationProperty -> GuardrailConfigurationProperty
set PropertyType "GuardrailVersion" GuardrailConfigurationProperty
newValue GuardrailConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: GuardrailConfigurationProperty -> ()
guardrailIdentifier :: GuardrailConfigurationProperty -> Maybe (Value Text)
guardrailVersion :: GuardrailConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
guardrailIdentifier :: Maybe (Value Text)
guardrailVersion :: Maybe (Value Text)
..}
    = GuardrailConfigurationProperty
        {guardrailVersion :: Maybe (Value Text)
guardrailVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GuardrailVersion" GuardrailConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
guardrailIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
guardrailIdentifier :: Maybe (Value Text)
..}