module Stratosphere.Bedrock.Prompt.TextPromptTemplateConfigurationProperty (
        module Exports, TextPromptTemplateConfigurationProperty(..),
        mkTextPromptTemplateConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.Prompt.CachePointBlockProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.Prompt.PromptInputVariableProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.Prompt.TextS3LocationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TextPromptTemplateConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-textprompttemplateconfiguration.html>
    TextPromptTemplateConfigurationProperty {TextPromptTemplateConfigurationProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-textprompttemplateconfiguration.html#cfn-bedrock-prompt-textprompttemplateconfiguration-cachepoint>
                                             TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
cachePoint :: (Prelude.Maybe CachePointBlockProperty),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-textprompttemplateconfiguration.html#cfn-bedrock-prompt-textprompttemplateconfiguration-inputvariables>
                                             TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
inputVariables :: (Prelude.Maybe [PromptInputVariableProperty]),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-textprompttemplateconfiguration.html#cfn-bedrock-prompt-textprompttemplateconfiguration-text>
                                             TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
text :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-textprompttemplateconfiguration.html#cfn-bedrock-prompt-textprompttemplateconfiguration-texts3location>
                                             TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
textS3Location :: (Prelude.Maybe TextS3LocationProperty)}
  deriving stock (TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty -> Bool
(TextPromptTemplateConfigurationProperty
 -> TextPromptTemplateConfigurationProperty -> Bool)
-> (TextPromptTemplateConfigurationProperty
    -> TextPromptTemplateConfigurationProperty -> Bool)
-> Eq TextPromptTemplateConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty -> Bool
== :: TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty -> Bool
$c/= :: TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty -> Bool
/= :: TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty -> Bool
Prelude.Eq, Int -> TextPromptTemplateConfigurationProperty -> ShowS
[TextPromptTemplateConfigurationProperty] -> ShowS
TextPromptTemplateConfigurationProperty -> String
(Int -> TextPromptTemplateConfigurationProperty -> ShowS)
-> (TextPromptTemplateConfigurationProperty -> String)
-> ([TextPromptTemplateConfigurationProperty] -> ShowS)
-> Show TextPromptTemplateConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextPromptTemplateConfigurationProperty -> ShowS
showsPrec :: Int -> TextPromptTemplateConfigurationProperty -> ShowS
$cshow :: TextPromptTemplateConfigurationProperty -> String
show :: TextPromptTemplateConfigurationProperty -> String
$cshowList :: [TextPromptTemplateConfigurationProperty] -> ShowS
showList :: [TextPromptTemplateConfigurationProperty] -> ShowS
Prelude.Show)
mkTextPromptTemplateConfigurationProperty ::
  TextPromptTemplateConfigurationProperty
mkTextPromptTemplateConfigurationProperty :: TextPromptTemplateConfigurationProperty
mkTextPromptTemplateConfigurationProperty
  = TextPromptTemplateConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cachePoint :: Maybe CachePointBlockProperty
cachePoint = Maybe CachePointBlockProperty
forall a. Maybe a
Prelude.Nothing,
       inputVariables :: Maybe [PromptInputVariableProperty]
inputVariables = Maybe [PromptInputVariableProperty]
forall a. Maybe a
Prelude.Nothing, text :: Maybe (Value Text)
text = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       textS3Location :: Maybe TextS3LocationProperty
textS3Location = Maybe TextS3LocationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TextPromptTemplateConfigurationProperty where
  toResourceProperties :: TextPromptTemplateConfigurationProperty -> ResourceProperties
toResourceProperties TextPromptTemplateConfigurationProperty {Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: TextPromptTemplateConfigurationProperty -> ()
cachePoint :: TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
inputVariables :: TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
text :: TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
textS3Location :: TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::Prompt.TextPromptTemplateConfiguration",
         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 -> CachePointBlockProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CachePoint" (CachePointBlockProperty -> (Key, Value))
-> Maybe CachePointBlockProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CachePointBlockProperty
cachePoint,
                            Key -> [PromptInputVariableProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputVariables" ([PromptInputVariableProperty] -> (Key, Value))
-> Maybe [PromptInputVariableProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PromptInputVariableProperty]
inputVariables,
                            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
"Text" (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)
text,
                            Key -> TextS3LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TextS3Location" (TextS3LocationProperty -> (Key, Value))
-> Maybe TextS3LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TextS3LocationProperty
textS3Location])}
instance JSON.ToJSON TextPromptTemplateConfigurationProperty where
  toJSON :: TextPromptTemplateConfigurationProperty -> Value
toJSON TextPromptTemplateConfigurationProperty {Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: TextPromptTemplateConfigurationProperty -> ()
cachePoint :: TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
inputVariables :: TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
text :: TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
textS3Location :: TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
    = [(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 -> CachePointBlockProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CachePoint" (CachePointBlockProperty -> (Key, Value))
-> Maybe CachePointBlockProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CachePointBlockProperty
cachePoint,
               Key -> [PromptInputVariableProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InputVariables" ([PromptInputVariableProperty] -> (Key, Value))
-> Maybe [PromptInputVariableProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PromptInputVariableProperty]
inputVariables,
               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
"Text" (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)
text,
               Key -> TextS3LocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TextS3Location" (TextS3LocationProperty -> (Key, Value))
-> Maybe TextS3LocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TextS3LocationProperty
textS3Location]))
instance Property "CachePoint" TextPromptTemplateConfigurationProperty where
  type PropertyType "CachePoint" TextPromptTemplateConfigurationProperty = CachePointBlockProperty
  set :: PropertyType "CachePoint" TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
set PropertyType "CachePoint" TextPromptTemplateConfigurationProperty
newValue TextPromptTemplateConfigurationProperty {Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: TextPromptTemplateConfigurationProperty -> ()
cachePoint :: TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
inputVariables :: TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
text :: TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
textS3Location :: TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
    = TextPromptTemplateConfigurationProperty
        {cachePoint :: Maybe CachePointBlockProperty
cachePoint = CachePointBlockProperty -> Maybe CachePointBlockProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CachePoint" TextPromptTemplateConfigurationProperty
CachePointBlockProperty
newValue, Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe TextS3LocationProperty
()
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
haddock_workaround_ :: ()
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
instance Property "InputVariables" TextPromptTemplateConfigurationProperty where
  type PropertyType "InputVariables" TextPromptTemplateConfigurationProperty = [PromptInputVariableProperty]
  set :: PropertyType
  "InputVariables" TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
set PropertyType
  "InputVariables" TextPromptTemplateConfigurationProperty
newValue TextPromptTemplateConfigurationProperty {Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: TextPromptTemplateConfigurationProperty -> ()
cachePoint :: TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
inputVariables :: TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
text :: TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
textS3Location :: TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
    = TextPromptTemplateConfigurationProperty
        {inputVariables :: Maybe [PromptInputVariableProperty]
inputVariables = [PromptInputVariableProperty]
-> Maybe [PromptInputVariableProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PromptInputVariableProperty]
PropertyType
  "InputVariables" TextPromptTemplateConfigurationProperty
newValue, Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
instance Property "Text" TextPromptTemplateConfigurationProperty where
  type PropertyType "Text" TextPromptTemplateConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Text" TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
set PropertyType "Text" TextPromptTemplateConfigurationProperty
newValue TextPromptTemplateConfigurationProperty {Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: TextPromptTemplateConfigurationProperty -> ()
cachePoint :: TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
inputVariables :: TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
text :: TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
textS3Location :: TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
    = TextPromptTemplateConfigurationProperty
        {text :: Maybe (Value Text)
text = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Text" TextPromptTemplateConfigurationProperty
Value Text
newValue, Maybe [PromptInputVariableProperty]
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
textS3Location :: Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
textS3Location :: Maybe TextS3LocationProperty
..}
instance Property "TextS3Location" TextPromptTemplateConfigurationProperty where
  type PropertyType "TextS3Location" TextPromptTemplateConfigurationProperty = TextS3LocationProperty
  set :: PropertyType
  "TextS3Location" TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
-> TextPromptTemplateConfigurationProperty
set PropertyType
  "TextS3Location" TextPromptTemplateConfigurationProperty
newValue TextPromptTemplateConfigurationProperty {Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
Maybe TextS3LocationProperty
()
haddock_workaround_ :: TextPromptTemplateConfigurationProperty -> ()
cachePoint :: TextPromptTemplateConfigurationProperty
-> Maybe CachePointBlockProperty
inputVariables :: TextPromptTemplateConfigurationProperty
-> Maybe [PromptInputVariableProperty]
text :: TextPromptTemplateConfigurationProperty -> Maybe (Value Text)
textS3Location :: TextPromptTemplateConfigurationProperty
-> Maybe TextS3LocationProperty
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
textS3Location :: Maybe TextS3LocationProperty
..}
    = TextPromptTemplateConfigurationProperty
        {textS3Location :: Maybe TextS3LocationProperty
textS3Location = TextS3LocationProperty -> Maybe TextS3LocationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TextS3Location" TextPromptTemplateConfigurationProperty
TextS3LocationProperty
newValue, Maybe [PromptInputVariableProperty]
Maybe (Value Text)
Maybe CachePointBlockProperty
()
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
haddock_workaround_ :: ()
cachePoint :: Maybe CachePointBlockProperty
inputVariables :: Maybe [PromptInputVariableProperty]
text :: Maybe (Value Text)
..}