module Stratosphere.Bedrock.Agent.InferenceConfigurationProperty (
        InferenceConfigurationProperty(..),
        mkInferenceConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InferenceConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html>
    InferenceConfigurationProperty {InferenceConfigurationProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-maximumlength>
                                    InferenceConfigurationProperty -> Maybe (Value Double)
maximumLength :: (Prelude.Maybe (Value Prelude.Double)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-stopsequences>
                                    InferenceConfigurationProperty -> Maybe (ValueList Text)
stopSequences :: (Prelude.Maybe (ValueList Prelude.Text)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-temperature>
                                    InferenceConfigurationProperty -> Maybe (Value Double)
temperature :: (Prelude.Maybe (Value Prelude.Double)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-topk>
                                    InferenceConfigurationProperty -> Maybe (Value Double)
topK :: (Prelude.Maybe (Value Prelude.Double)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-topp>
                                    InferenceConfigurationProperty -> Maybe (Value Double)
topP :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (InferenceConfigurationProperty
-> InferenceConfigurationProperty -> Bool
(InferenceConfigurationProperty
 -> InferenceConfigurationProperty -> Bool)
-> (InferenceConfigurationProperty
    -> InferenceConfigurationProperty -> Bool)
-> Eq InferenceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InferenceConfigurationProperty
-> InferenceConfigurationProperty -> Bool
== :: InferenceConfigurationProperty
-> InferenceConfigurationProperty -> Bool
$c/= :: InferenceConfigurationProperty
-> InferenceConfigurationProperty -> Bool
/= :: InferenceConfigurationProperty
-> InferenceConfigurationProperty -> Bool
Prelude.Eq, Int -> InferenceConfigurationProperty -> ShowS
[InferenceConfigurationProperty] -> ShowS
InferenceConfigurationProperty -> String
(Int -> InferenceConfigurationProperty -> ShowS)
-> (InferenceConfigurationProperty -> String)
-> ([InferenceConfigurationProperty] -> ShowS)
-> Show InferenceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InferenceConfigurationProperty -> ShowS
showsPrec :: Int -> InferenceConfigurationProperty -> ShowS
$cshow :: InferenceConfigurationProperty -> String
show :: InferenceConfigurationProperty -> String
$cshowList :: [InferenceConfigurationProperty] -> ShowS
showList :: [InferenceConfigurationProperty] -> ShowS
Prelude.Show)
mkInferenceConfigurationProperty :: InferenceConfigurationProperty
mkInferenceConfigurationProperty :: InferenceConfigurationProperty
mkInferenceConfigurationProperty
  = InferenceConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maximumLength :: Maybe (Value Double)
maximumLength = 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,
       topK :: Maybe (Value Double)
topK = 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 InferenceConfigurationProperty where
  toResourceProperties :: InferenceConfigurationProperty -> ResourceProperties
toResourceProperties InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::Agent.InferenceConfiguration",
         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
"MaximumLength" (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)
maximumLength,
                            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
"TopK" (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)
topK,
                            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 InferenceConfigurationProperty where
  toJSON :: InferenceConfigurationProperty -> Value
toJSON InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: 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
"MaximumLength" (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)
maximumLength,
               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
"TopK" (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)
topK,
               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 "MaximumLength" InferenceConfigurationProperty where
  type PropertyType "MaximumLength" InferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType "MaximumLength" InferenceConfigurationProperty
-> InferenceConfigurationProperty -> InferenceConfigurationProperty
set PropertyType "MaximumLength" InferenceConfigurationProperty
newValue InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = InferenceConfigurationProperty
        {maximumLength :: Maybe (Value Double)
maximumLength = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumLength" InferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
instance Property "StopSequences" InferenceConfigurationProperty where
  type PropertyType "StopSequences" InferenceConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "StopSequences" InferenceConfigurationProperty
-> InferenceConfigurationProperty -> InferenceConfigurationProperty
set PropertyType "StopSequences" InferenceConfigurationProperty
newValue InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = InferenceConfigurationProperty
        {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" InferenceConfigurationProperty
ValueList Text
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
instance Property "Temperature" InferenceConfigurationProperty where
  type PropertyType "Temperature" InferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType "Temperature" InferenceConfigurationProperty
-> InferenceConfigurationProperty -> InferenceConfigurationProperty
set PropertyType "Temperature" InferenceConfigurationProperty
newValue InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = InferenceConfigurationProperty
        {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" InferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
instance Property "TopK" InferenceConfigurationProperty where
  type PropertyType "TopK" InferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType "TopK" InferenceConfigurationProperty
-> InferenceConfigurationProperty -> InferenceConfigurationProperty
set PropertyType "TopK" InferenceConfigurationProperty
newValue InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = InferenceConfigurationProperty {topK :: Maybe (Value Double)
topK = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TopK" InferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
instance Property "TopP" InferenceConfigurationProperty where
  type PropertyType "TopP" InferenceConfigurationProperty = Value Prelude.Double
  set :: PropertyType "TopP" InferenceConfigurationProperty
-> InferenceConfigurationProperty -> InferenceConfigurationProperty
set PropertyType "TopP" InferenceConfigurationProperty
newValue InferenceConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: InferenceConfigurationProperty -> ()
maximumLength :: InferenceConfigurationProperty -> Maybe (Value Double)
stopSequences :: InferenceConfigurationProperty -> Maybe (ValueList Text)
temperature :: InferenceConfigurationProperty -> Maybe (Value Double)
topK :: InferenceConfigurationProperty -> Maybe (Value Double)
topP :: InferenceConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
topP :: Maybe (Value Double)
..}
    = InferenceConfigurationProperty {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" InferenceConfigurationProperty
Value Double
newValue, Maybe (ValueList Text)
Maybe (Value Double)
()
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
haddock_workaround_ :: ()
maximumLength :: Maybe (Value Double)
stopSequences :: Maybe (ValueList Text)
temperature :: Maybe (Value Double)
topK :: Maybe (Value Double)
..}