module Stratosphere.Bedrock.Agent.FunctionProperty (
module Exports, FunctionProperty(..), mkFunctionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.Agent.ParameterDetailProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FunctionProperty
=
FunctionProperty {FunctionProperty -> ()
haddock_workaround_ :: (),
FunctionProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
FunctionProperty -> Value Text
name :: (Value Prelude.Text),
FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
parameters :: (Prelude.Maybe (Prelude.Map Prelude.Text ParameterDetailProperty)),
FunctionProperty -> Maybe (Value Text)
requireConfirmation :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (FunctionProperty -> FunctionProperty -> Bool
(FunctionProperty -> FunctionProperty -> Bool)
-> (FunctionProperty -> FunctionProperty -> Bool)
-> Eq FunctionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FunctionProperty -> FunctionProperty -> Bool
== :: FunctionProperty -> FunctionProperty -> Bool
$c/= :: FunctionProperty -> FunctionProperty -> Bool
/= :: FunctionProperty -> FunctionProperty -> Bool
Prelude.Eq, Int -> FunctionProperty -> ShowS
[FunctionProperty] -> ShowS
FunctionProperty -> String
(Int -> FunctionProperty -> ShowS)
-> (FunctionProperty -> String)
-> ([FunctionProperty] -> ShowS)
-> Show FunctionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FunctionProperty -> ShowS
showsPrec :: Int -> FunctionProperty -> ShowS
$cshow :: FunctionProperty -> String
show :: FunctionProperty -> String
$cshowList :: [FunctionProperty] -> ShowS
showList :: [FunctionProperty] -> ShowS
Prelude.Show)
mkFunctionProperty :: Value Prelude.Text -> FunctionProperty
mkFunctionProperty :: Value Text -> FunctionProperty
mkFunctionProperty Value Text
name
= FunctionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, parameters :: Maybe (Map Text ParameterDetailProperty)
parameters = Maybe (Map Text ParameterDetailProperty)
forall a. Maybe a
Prelude.Nothing,
requireConfirmation :: Maybe (Value Text)
requireConfirmation = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FunctionProperty where
toResourceProperties :: FunctionProperty -> ResourceProperties
toResourceProperties FunctionProperty {Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FunctionProperty -> ()
description :: FunctionProperty -> Maybe (Value Text)
name :: FunctionProperty -> Value Text
parameters :: FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: FunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::Agent.Function",
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
"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,
Key -> Map Text ParameterDetailProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Parameters" (Map Text ParameterDetailProperty -> (Key, Value))
-> Maybe (Map Text ParameterDetailProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text ParameterDetailProperty)
parameters,
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
"RequireConfirmation" (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)
requireConfirmation]))}
instance JSON.ToJSON FunctionProperty where
toJSON :: FunctionProperty -> Value
toJSON FunctionProperty {Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FunctionProperty -> ()
description :: FunctionProperty -> Maybe (Value Text)
name :: FunctionProperty -> Value Text
parameters :: FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: FunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (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
"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,
Key -> Map Text ParameterDetailProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Parameters" (Map Text ParameterDetailProperty -> (Key, Value))
-> Maybe (Map Text ParameterDetailProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text ParameterDetailProperty)
parameters,
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
"RequireConfirmation" (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)
requireConfirmation])))
instance Property "Description" FunctionProperty where
type PropertyType "Description" FunctionProperty = Value Prelude.Text
set :: PropertyType "Description" FunctionProperty
-> FunctionProperty -> FunctionProperty
set PropertyType "Description" FunctionProperty
newValue FunctionProperty {Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FunctionProperty -> ()
description :: FunctionProperty -> Maybe (Value Text)
name :: FunctionProperty -> Value Text
parameters :: FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: FunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
= FunctionProperty {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" FunctionProperty
Value Text
newValue, Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
instance Property "Name" FunctionProperty where
type PropertyType "Name" FunctionProperty = Value Prelude.Text
set :: PropertyType "Name" FunctionProperty
-> FunctionProperty -> FunctionProperty
set PropertyType "Name" FunctionProperty
newValue FunctionProperty {Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FunctionProperty -> ()
description :: FunctionProperty -> Maybe (Value Text)
name :: FunctionProperty -> Value Text
parameters :: FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: FunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
= FunctionProperty {name :: Value Text
name = PropertyType "Name" FunctionProperty
Value Text
newValue, Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
instance Property "Parameters" FunctionProperty where
type PropertyType "Parameters" FunctionProperty = Prelude.Map Prelude.Text ParameterDetailProperty
set :: PropertyType "Parameters" FunctionProperty
-> FunctionProperty -> FunctionProperty
set PropertyType "Parameters" FunctionProperty
newValue FunctionProperty {Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FunctionProperty -> ()
description :: FunctionProperty -> Maybe (Value Text)
name :: FunctionProperty -> Value Text
parameters :: FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: FunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
= FunctionProperty {parameters :: Maybe (Map Text ParameterDetailProperty)
parameters = Map Text ParameterDetailProperty
-> Maybe (Map Text ParameterDetailProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text ParameterDetailProperty
PropertyType "Parameters" FunctionProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
requireConfirmation :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
requireConfirmation :: Maybe (Value Text)
..}
instance Property "RequireConfirmation" FunctionProperty where
type PropertyType "RequireConfirmation" FunctionProperty = Value Prelude.Text
set :: PropertyType "RequireConfirmation" FunctionProperty
-> FunctionProperty -> FunctionProperty
set PropertyType "RequireConfirmation" FunctionProperty
newValue FunctionProperty {Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FunctionProperty -> ()
description :: FunctionProperty -> Maybe (Value Text)
name :: FunctionProperty -> Value Text
parameters :: FunctionProperty -> Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: FunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
requireConfirmation :: Maybe (Value Text)
..}
= FunctionProperty
{requireConfirmation :: Maybe (Value Text)
requireConfirmation = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RequireConfirmation" FunctionProperty
Value Text
newValue, Maybe (Map Text ParameterDetailProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
parameters :: Maybe (Map Text ParameterDetailProperty)
..}