module Stratosphere.Bedrock.Prompt.ToolSpecificationProperty (
module Exports, ToolSpecificationProperty(..),
mkToolSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.Prompt.ToolInputSchemaProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ToolSpecificationProperty
=
ToolSpecificationProperty {ToolSpecificationProperty -> ()
haddock_workaround_ :: (),
ToolSpecificationProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
ToolSpecificationProperty -> ToolInputSchemaProperty
inputSchema :: ToolInputSchemaProperty,
ToolSpecificationProperty -> Value Text
name :: (Value Prelude.Text)}
deriving stock (ToolSpecificationProperty -> ToolSpecificationProperty -> Bool
(ToolSpecificationProperty -> ToolSpecificationProperty -> Bool)
-> (ToolSpecificationProperty -> ToolSpecificationProperty -> Bool)
-> Eq ToolSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ToolSpecificationProperty -> ToolSpecificationProperty -> Bool
== :: ToolSpecificationProperty -> ToolSpecificationProperty -> Bool
$c/= :: ToolSpecificationProperty -> ToolSpecificationProperty -> Bool
/= :: ToolSpecificationProperty -> ToolSpecificationProperty -> Bool
Prelude.Eq, Int -> ToolSpecificationProperty -> ShowS
[ToolSpecificationProperty] -> ShowS
ToolSpecificationProperty -> String
(Int -> ToolSpecificationProperty -> ShowS)
-> (ToolSpecificationProperty -> String)
-> ([ToolSpecificationProperty] -> ShowS)
-> Show ToolSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ToolSpecificationProperty -> ShowS
showsPrec :: Int -> ToolSpecificationProperty -> ShowS
$cshow :: ToolSpecificationProperty -> String
show :: ToolSpecificationProperty -> String
$cshowList :: [ToolSpecificationProperty] -> ShowS
showList :: [ToolSpecificationProperty] -> ShowS
Prelude.Show)
mkToolSpecificationProperty ::
ToolInputSchemaProperty
-> Value Prelude.Text -> ToolSpecificationProperty
mkToolSpecificationProperty :: ToolInputSchemaProperty -> Value Text -> ToolSpecificationProperty
mkToolSpecificationProperty ToolInputSchemaProperty
inputSchema Value Text
name
= ToolSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), inputSchema :: ToolInputSchemaProperty
inputSchema = ToolInputSchemaProperty
inputSchema, name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ToolSpecificationProperty where
toResourceProperties :: ToolSpecificationProperty -> ResourceProperties
toResourceProperties ToolSpecificationProperty {Maybe (Value Text)
()
Value Text
ToolInputSchemaProperty
haddock_workaround_ :: ToolSpecificationProperty -> ()
description :: ToolSpecificationProperty -> Maybe (Value Text)
inputSchema :: ToolSpecificationProperty -> ToolInputSchemaProperty
name :: ToolSpecificationProperty -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
name :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::Prompt.ToolSpecification",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"InputSchema" Key -> ToolInputSchemaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ToolInputSchemaProperty
inputSchema, 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
"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]))}
instance JSON.ToJSON ToolSpecificationProperty where
toJSON :: ToolSpecificationProperty -> Value
toJSON ToolSpecificationProperty {Maybe (Value Text)
()
Value Text
ToolInputSchemaProperty
haddock_workaround_ :: ToolSpecificationProperty -> ()
description :: ToolSpecificationProperty -> Maybe (Value Text)
inputSchema :: ToolSpecificationProperty -> ToolInputSchemaProperty
name :: ToolSpecificationProperty -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
name :: Value Text
..}
= [(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
"InputSchema" Key -> ToolInputSchemaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ToolInputSchemaProperty
inputSchema, 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
"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])))
instance Property "Description" ToolSpecificationProperty where
type PropertyType "Description" ToolSpecificationProperty = Value Prelude.Text
set :: PropertyType "Description" ToolSpecificationProperty
-> ToolSpecificationProperty -> ToolSpecificationProperty
set PropertyType "Description" ToolSpecificationProperty
newValue ToolSpecificationProperty {Maybe (Value Text)
()
Value Text
ToolInputSchemaProperty
haddock_workaround_ :: ToolSpecificationProperty -> ()
description :: ToolSpecificationProperty -> Maybe (Value Text)
inputSchema :: ToolSpecificationProperty -> ToolInputSchemaProperty
name :: ToolSpecificationProperty -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
name :: Value Text
..}
= ToolSpecificationProperty
{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" ToolSpecificationProperty
Value Text
newValue, ()
Value Text
ToolInputSchemaProperty
haddock_workaround_ :: ()
inputSchema :: ToolInputSchemaProperty
name :: Value Text
haddock_workaround_ :: ()
inputSchema :: ToolInputSchemaProperty
name :: Value Text
..}
instance Property "InputSchema" ToolSpecificationProperty where
type PropertyType "InputSchema" ToolSpecificationProperty = ToolInputSchemaProperty
set :: PropertyType "InputSchema" ToolSpecificationProperty
-> ToolSpecificationProperty -> ToolSpecificationProperty
set PropertyType "InputSchema" ToolSpecificationProperty
newValue ToolSpecificationProperty {Maybe (Value Text)
()
Value Text
ToolInputSchemaProperty
haddock_workaround_ :: ToolSpecificationProperty -> ()
description :: ToolSpecificationProperty -> Maybe (Value Text)
inputSchema :: ToolSpecificationProperty -> ToolInputSchemaProperty
name :: ToolSpecificationProperty -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
name :: Value Text
..}
= ToolSpecificationProperty {inputSchema :: ToolInputSchemaProperty
inputSchema = PropertyType "InputSchema" ToolSpecificationProperty
ToolInputSchemaProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" ToolSpecificationProperty where
type PropertyType "Name" ToolSpecificationProperty = Value Prelude.Text
set :: PropertyType "Name" ToolSpecificationProperty
-> ToolSpecificationProperty -> ToolSpecificationProperty
set PropertyType "Name" ToolSpecificationProperty
newValue ToolSpecificationProperty {Maybe (Value Text)
()
Value Text
ToolInputSchemaProperty
haddock_workaround_ :: ToolSpecificationProperty -> ()
description :: ToolSpecificationProperty -> Maybe (Value Text)
inputSchema :: ToolSpecificationProperty -> ToolInputSchemaProperty
name :: ToolSpecificationProperty -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
name :: Value Text
..}
= ToolSpecificationProperty {name :: Value Text
name = PropertyType "Name" ToolSpecificationProperty
Value Text
newValue, Maybe (Value Text)
()
ToolInputSchemaProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
inputSchema :: ToolInputSchemaProperty
..}