module Stratosphere.Bedrock.Prompt (
        module Exports, Prompt(..), mkPrompt
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.Prompt.PromptVariantProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Prompt
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html>
    Prompt {Prompt -> ()
haddock_workaround_ :: (),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-customerencryptionkeyarn>
            Prompt -> Maybe (Value Text)
customerEncryptionKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-defaultvariant>
            Prompt -> Maybe (Value Text)
defaultVariant :: (Prelude.Maybe (Value Prelude.Text)),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-description>
            Prompt -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-name>
            Prompt -> Value Text
name :: (Value Prelude.Text),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-tags>
            Prompt -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-variants>
            Prompt -> Maybe [PromptVariantProperty]
variants :: (Prelude.Maybe [PromptVariantProperty])}
  deriving stock (Prompt -> Prompt -> Bool
(Prompt -> Prompt -> Bool)
-> (Prompt -> Prompt -> Bool) -> Eq Prompt
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Prompt -> Prompt -> Bool
== :: Prompt -> Prompt -> Bool
$c/= :: Prompt -> Prompt -> Bool
/= :: Prompt -> Prompt -> Bool
Prelude.Eq, Int -> Prompt -> ShowS
[Prompt] -> ShowS
Prompt -> String
(Int -> Prompt -> ShowS)
-> (Prompt -> String) -> ([Prompt] -> ShowS) -> Show Prompt
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Prompt -> ShowS
showsPrec :: Int -> Prompt -> ShowS
$cshow :: Prompt -> String
show :: Prompt -> String
$cshowList :: [Prompt] -> ShowS
showList :: [Prompt] -> ShowS
Prelude.Show)
mkPrompt :: Value Prelude.Text -> Prompt
mkPrompt :: Value Text -> Prompt
mkPrompt Value Text
name
  = Prompt
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       customerEncryptionKeyArn :: Maybe (Value Text)
customerEncryptionKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       defaultVariant :: Maybe (Value Text)
defaultVariant = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing, variants :: Maybe [PromptVariantProperty]
variants = Maybe [PromptVariantProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Prompt where
  toResourceProperties :: Prompt -> ResourceProperties
toResourceProperties Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::Prompt", 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
"CustomerEncryptionKeyArn"
                                 (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)
customerEncryptionKeyArn,
                               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
"DefaultVariant" (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)
defaultVariant,
                               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 -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags,
                               Key -> [PromptVariantProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Variants" ([PromptVariantProperty] -> (Key, Value))
-> Maybe [PromptVariantProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PromptVariantProperty]
variants]))}
instance JSON.ToJSON Prompt where
  toJSON :: Prompt -> Value
toJSON Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = [(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
"CustomerEncryptionKeyArn"
                    (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)
customerEncryptionKeyArn,
                  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
"DefaultVariant" (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)
defaultVariant,
                  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 -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags,
                  Key -> [PromptVariantProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Variants" ([PromptVariantProperty] -> (Key, Value))
-> Maybe [PromptVariantProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PromptVariantProperty]
variants])))
instance Property "CustomerEncryptionKeyArn" Prompt where
  type PropertyType "CustomerEncryptionKeyArn" Prompt = Value Prelude.Text
  set :: PropertyType "CustomerEncryptionKeyArn" Prompt -> Prompt -> Prompt
set PropertyType "CustomerEncryptionKeyArn" Prompt
newValue Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = Prompt {customerEncryptionKeyArn :: Maybe (Value Text)
customerEncryptionKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomerEncryptionKeyArn" Prompt
Value Text
newValue, Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
instance Property "DefaultVariant" Prompt where
  type PropertyType "DefaultVariant" Prompt = Value Prelude.Text
  set :: PropertyType "DefaultVariant" Prompt -> Prompt -> Prompt
set PropertyType "DefaultVariant" Prompt
newValue Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = Prompt {defaultVariant :: Maybe (Value Text)
defaultVariant = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultVariant" Prompt
Value Text
newValue, Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
instance Property "Description" Prompt where
  type PropertyType "Description" Prompt = Value Prelude.Text
  set :: PropertyType "Description" Prompt -> Prompt -> Prompt
set PropertyType "Description" Prompt
newValue Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = Prompt {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" Prompt
Value Text
newValue, Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
instance Property "Name" Prompt where
  type PropertyType "Name" Prompt = Value Prelude.Text
  set :: PropertyType "Name" Prompt -> Prompt -> Prompt
set PropertyType "Name" Prompt
newValue Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..} = Prompt {name :: Value Text
name = PropertyType "Name" Prompt
Value Text
newValue, Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
instance Property "Tags" Prompt where
  type PropertyType "Tags" Prompt = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" Prompt -> Prompt -> Prompt
set PropertyType "Tags" Prompt
newValue Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = Prompt {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" Prompt
newValue, Maybe [PromptVariantProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
variants :: Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
variants :: Maybe [PromptVariantProperty]
..}
instance Property "Variants" Prompt where
  type PropertyType "Variants" Prompt = [PromptVariantProperty]
  set :: PropertyType "Variants" Prompt -> Prompt -> Prompt
set PropertyType "Variants" Prompt
newValue Prompt {Maybe [PromptVariantProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Prompt -> ()
customerEncryptionKeyArn :: Prompt -> Maybe (Value Text)
defaultVariant :: Prompt -> Maybe (Value Text)
description :: Prompt -> Maybe (Value Text)
name :: Prompt -> Value Text
tags :: Prompt -> Maybe (Map Text (Value Text))
variants :: Prompt -> Maybe [PromptVariantProperty]
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
variants :: Maybe [PromptVariantProperty]
..}
    = Prompt {variants :: Maybe [PromptVariantProperty]
variants = [PromptVariantProperty] -> Maybe [PromptVariantProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PromptVariantProperty]
PropertyType "Variants" Prompt
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
customerEncryptionKeyArn :: Maybe (Value Text)
defaultVariant :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}