module Stratosphere.BedrockAgentCore.GatewayTarget.ToolSchemaProperty (
module Exports, ToolSchemaProperty(..), mkToolSchemaProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.BedrockAgentCore.GatewayTarget.S3ConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.BedrockAgentCore.GatewayTarget.ToolDefinitionProperty as Exports
import Stratosphere.ResourceProperties
data ToolSchemaProperty
=
ToolSchemaProperty {ToolSchemaProperty -> ()
haddock_workaround_ :: (),
ToolSchemaProperty -> Maybe [ToolDefinitionProperty]
inlinePayload :: (Prelude.Maybe [ToolDefinitionProperty]),
ToolSchemaProperty -> Maybe S3ConfigurationProperty
s3 :: (Prelude.Maybe S3ConfigurationProperty)}
deriving stock (ToolSchemaProperty -> ToolSchemaProperty -> Bool
(ToolSchemaProperty -> ToolSchemaProperty -> Bool)
-> (ToolSchemaProperty -> ToolSchemaProperty -> Bool)
-> Eq ToolSchemaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ToolSchemaProperty -> ToolSchemaProperty -> Bool
== :: ToolSchemaProperty -> ToolSchemaProperty -> Bool
$c/= :: ToolSchemaProperty -> ToolSchemaProperty -> Bool
/= :: ToolSchemaProperty -> ToolSchemaProperty -> Bool
Prelude.Eq, Int -> ToolSchemaProperty -> ShowS
[ToolSchemaProperty] -> ShowS
ToolSchemaProperty -> String
(Int -> ToolSchemaProperty -> ShowS)
-> (ToolSchemaProperty -> String)
-> ([ToolSchemaProperty] -> ShowS)
-> Show ToolSchemaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ToolSchemaProperty -> ShowS
showsPrec :: Int -> ToolSchemaProperty -> ShowS
$cshow :: ToolSchemaProperty -> String
show :: ToolSchemaProperty -> String
$cshowList :: [ToolSchemaProperty] -> ShowS
showList :: [ToolSchemaProperty] -> ShowS
Prelude.Show)
mkToolSchemaProperty :: ToolSchemaProperty
mkToolSchemaProperty :: ToolSchemaProperty
mkToolSchemaProperty
= ToolSchemaProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), inlinePayload :: Maybe [ToolDefinitionProperty]
inlinePayload = Maybe [ToolDefinitionProperty]
forall a. Maybe a
Prelude.Nothing,
s3 :: Maybe S3ConfigurationProperty
s3 = Maybe S3ConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ToolSchemaProperty where
toResourceProperties :: ToolSchemaProperty -> ResourceProperties
toResourceProperties ToolSchemaProperty {Maybe [ToolDefinitionProperty]
Maybe S3ConfigurationProperty
()
haddock_workaround_ :: ToolSchemaProperty -> ()
inlinePayload :: ToolSchemaProperty -> Maybe [ToolDefinitionProperty]
s3 :: ToolSchemaProperty -> Maybe S3ConfigurationProperty
haddock_workaround_ :: ()
inlinePayload :: Maybe [ToolDefinitionProperty]
s3 :: Maybe S3ConfigurationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::BedrockAgentCore::GatewayTarget.ToolSchema",
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 -> [ToolDefinitionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InlinePayload" ([ToolDefinitionProperty] -> (Key, Value))
-> Maybe [ToolDefinitionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ToolDefinitionProperty]
inlinePayload,
Key -> S3ConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3" (S3ConfigurationProperty -> (Key, Value))
-> Maybe S3ConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3ConfigurationProperty
s3])}
instance JSON.ToJSON ToolSchemaProperty where
toJSON :: ToolSchemaProperty -> Value
toJSON ToolSchemaProperty {Maybe [ToolDefinitionProperty]
Maybe S3ConfigurationProperty
()
haddock_workaround_ :: ToolSchemaProperty -> ()
inlinePayload :: ToolSchemaProperty -> Maybe [ToolDefinitionProperty]
s3 :: ToolSchemaProperty -> Maybe S3ConfigurationProperty
haddock_workaround_ :: ()
inlinePayload :: Maybe [ToolDefinitionProperty]
s3 :: Maybe S3ConfigurationProperty
..}
= [(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 -> [ToolDefinitionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InlinePayload" ([ToolDefinitionProperty] -> (Key, Value))
-> Maybe [ToolDefinitionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ToolDefinitionProperty]
inlinePayload,
Key -> S3ConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3" (S3ConfigurationProperty -> (Key, Value))
-> Maybe S3ConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3ConfigurationProperty
s3]))
instance Property "InlinePayload" ToolSchemaProperty where
type PropertyType "InlinePayload" ToolSchemaProperty = [ToolDefinitionProperty]
set :: PropertyType "InlinePayload" ToolSchemaProperty
-> ToolSchemaProperty -> ToolSchemaProperty
set PropertyType "InlinePayload" ToolSchemaProperty
newValue ToolSchemaProperty {Maybe [ToolDefinitionProperty]
Maybe S3ConfigurationProperty
()
haddock_workaround_ :: ToolSchemaProperty -> ()
inlinePayload :: ToolSchemaProperty -> Maybe [ToolDefinitionProperty]
s3 :: ToolSchemaProperty -> Maybe S3ConfigurationProperty
haddock_workaround_ :: ()
inlinePayload :: Maybe [ToolDefinitionProperty]
s3 :: Maybe S3ConfigurationProperty
..}
= ToolSchemaProperty {inlinePayload :: Maybe [ToolDefinitionProperty]
inlinePayload = [ToolDefinitionProperty] -> Maybe [ToolDefinitionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ToolDefinitionProperty]
PropertyType "InlinePayload" ToolSchemaProperty
newValue, Maybe S3ConfigurationProperty
()
haddock_workaround_ :: ()
s3 :: Maybe S3ConfigurationProperty
haddock_workaround_ :: ()
s3 :: Maybe S3ConfigurationProperty
..}
instance Property "S3" ToolSchemaProperty where
type PropertyType "S3" ToolSchemaProperty = S3ConfigurationProperty
set :: PropertyType "S3" ToolSchemaProperty
-> ToolSchemaProperty -> ToolSchemaProperty
set PropertyType "S3" ToolSchemaProperty
newValue ToolSchemaProperty {Maybe [ToolDefinitionProperty]
Maybe S3ConfigurationProperty
()
haddock_workaround_ :: ToolSchemaProperty -> ()
inlinePayload :: ToolSchemaProperty -> Maybe [ToolDefinitionProperty]
s3 :: ToolSchemaProperty -> Maybe S3ConfigurationProperty
haddock_workaround_ :: ()
inlinePayload :: Maybe [ToolDefinitionProperty]
s3 :: Maybe S3ConfigurationProperty
..}
= ToolSchemaProperty {s3 :: Maybe S3ConfigurationProperty
s3 = S3ConfigurationProperty -> Maybe S3ConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3" ToolSchemaProperty
S3ConfigurationProperty
newValue, Maybe [ToolDefinitionProperty]
()
haddock_workaround_ :: ()
inlinePayload :: Maybe [ToolDefinitionProperty]
haddock_workaround_ :: ()
inlinePayload :: Maybe [ToolDefinitionProperty]
..}