module Stratosphere.Bedrock.PromptVersion.PromptModelInferenceConfigurationProperty (
        PromptModelInferenceConfigurationProperty(..),
        mkPromptModelInferenceConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PromptModelInferenceConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html>
    PromptModelInferenceConfigurationProperty {PromptModelInferenceConfigurationProperty -> ()
haddock_workaround_ :: (),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-maxtokens>
                                               PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
maxTokens :: (Prelude.Maybe (Value Prelude.Double)),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-stopsequences>
                                               PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
stopSequences :: (Prelude.Maybe (ValueList Prelude.Text)),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-temperature>
                                               PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
temperature :: (Prelude.Maybe (Value Prelude.Double)),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-topp>
                                               PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty -> Bool
(PromptModelInferenceConfigurationProperty
 -> PromptModelInferenceConfigurationProperty -> Bool)
-> (PromptModelInferenceConfigurationProperty
    -> PromptModelInferenceConfigurationProperty -> Bool)
-> Eq PromptModelInferenceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty -> Bool
== :: PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty -> Bool
$c/= :: PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty -> Bool
/= :: PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty -> Bool
Prelude.Eq, Int -> PromptModelInferenceConfigurationProperty -> ShowS
[PromptModelInferenceConfigurationProperty] -> ShowS
PromptModelInferenceConfigurationProperty -> String
(Int -> PromptModelInferenceConfigurationProperty -> ShowS)
-> (PromptModelInferenceConfigurationProperty -> String)
-> ([PromptModelInferenceConfigurationProperty] -> ShowS)
-> Show PromptModelInferenceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PromptModelInferenceConfigurationProperty -> ShowS
showsPrec :: Int -> PromptModelInferenceConfigurationProperty -> ShowS
$cshow :: PromptModelInferenceConfigurationProperty -> String
show :: PromptModelInferenceConfigurationProperty -> String
$cshowList :: [PromptModelInferenceConfigurationProperty] -> ShowS
showList :: [PromptModelInferenceConfigurationProperty] -> ShowS
Prelude.Show)
mkPromptModelInferenceConfigurationProperty ::
  PromptModelInferenceConfigurationProperty
mkPromptModelInferenceConfigurationProperty :: PromptModelInferenceConfigurationProperty
mkPromptModelInferenceConfigurationProperty
  = PromptModelInferenceConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxTokens :: Maybe (Value Double)
maxTokens = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       stopSequences :: Maybe (ValueList Text)
stopSequences = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, temperature :: Maybe (Value Double)
temperature = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       topP :: Maybe (Value Double)
topP = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PromptModelInferenceConfigurationProperty where
  toResourceProperties :: PromptModelInferenceConfigurationProperty -> ResourceProperties
toResourceProperties PromptModelInferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: PromptModelInferenceConfigurationProperty -> ()
maxTokens :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::PromptVersion.PromptModelInferenceConfiguration",
         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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxTokens" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxTokens,
                            Key -> ValueList 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
"StopSequences" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
stopSequences,
                            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..=) Key
"Temperature" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
temperature,
                            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..=) Key
"TopP" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
topP])}
instance JSON.ToJSON PromptModelInferenceConfigurationProperty where
  toJSON :: PromptModelInferenceConfigurationProperty -> Value
toJSON PromptModelInferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: PromptModelInferenceConfigurationProperty -> ()
maxTokens :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = [(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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxTokens" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxTokens,
               Key -> ValueList 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
"StopSequences" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
stopSequences,
               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..=) Key
"Temperature" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
temperature,
               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..=) Key
"TopP" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
topP]))
instance Property "MaxTokens" PromptModelInferenceConfigurationProperty where
  type PropertyType "MaxTokens" PromptModelInferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType "MaxTokens" PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
set PropertyType "MaxTokens" PromptModelInferenceConfigurationProperty
newValue PromptModelInferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: PromptModelInferenceConfigurationProperty -> ()
maxTokens :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = PromptModelInferenceConfigurationProperty
        {maxTokens :: Maybe (Value Double)
maxTokens = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxTokens" PromptModelInferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
instance Property "StopSequences" PromptModelInferenceConfigurationProperty where
  type PropertyType "StopSequences" PromptModelInferenceConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType
  "StopSequences" PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
set PropertyType
  "StopSequences" PromptModelInferenceConfigurationProperty
newValue PromptModelInferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: PromptModelInferenceConfigurationProperty -> ()
maxTokens :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = PromptModelInferenceConfigurationProperty
        {stopSequences :: Maybe (ValueList Text)
stopSequences = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "StopSequences" PromptModelInferenceConfigurationProperty
ValueList Text
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
instance Property "Temperature" PromptModelInferenceConfigurationProperty where
  type PropertyType "Temperature" PromptModelInferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType
  "Temperature" PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
set PropertyType
  "Temperature" PromptModelInferenceConfigurationProperty
newValue PromptModelInferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: PromptModelInferenceConfigurationProperty -> ()
maxTokens :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = PromptModelInferenceConfigurationProperty
        {temperature :: Maybe (Value Double)
temperature = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "Temperature" PromptModelInferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
topP :: Maybe (Value Double)
..}
instance Property "TopP" PromptModelInferenceConfigurationProperty where
  type PropertyType "TopP" PromptModelInferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType "TopP" PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
-> PromptModelInferenceConfigurationProperty
set PropertyType "TopP" PromptModelInferenceConfigurationProperty
newValue PromptModelInferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: PromptModelInferenceConfigurationProperty -> ()
maxTokens :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: PromptModelInferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
topP :: PromptModelInferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = PromptModelInferenceConfigurationProperty
        {topP :: Maybe (Value Double)
topP = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TopP" PromptModelInferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
haddock_workaround_ :: ()
maxTokens :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
..}