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 = -- | See: FunctionProperty {haddock_workaround_ :: (), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: name :: (Value Prelude.Text), -- | See: parameters :: (Prelude.Maybe (Prelude.Map Prelude.Text ParameterDetailProperty)), -- | See: requireConfirmation :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkFunctionProperty :: Value Prelude.Text -> FunctionProperty mkFunctionProperty name = FunctionProperty {haddock_workaround_ = (), name = name, description = Prelude.Nothing, parameters = Prelude.Nothing, requireConfirmation = Prelude.Nothing} instance ToResourceProperties FunctionProperty where toResourceProperties FunctionProperty {..} = ResourceProperties {awsType = "AWS::Bedrock::Agent.Function", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "Parameters" Prelude.<$> parameters, (JSON..=) "RequireConfirmation" Prelude.<$> requireConfirmation]))} instance JSON.ToJSON FunctionProperty where toJSON FunctionProperty {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "Parameters" Prelude.<$> parameters, (JSON..=) "RequireConfirmation" Prelude.<$> requireConfirmation]))) instance Property "Description" FunctionProperty where type PropertyType "Description" FunctionProperty = Value Prelude.Text set newValue FunctionProperty {..} = FunctionProperty {description = Prelude.pure newValue, ..} instance Property "Name" FunctionProperty where type PropertyType "Name" FunctionProperty = Value Prelude.Text set newValue FunctionProperty {..} = FunctionProperty {name = newValue, ..} instance Property "Parameters" FunctionProperty where type PropertyType "Parameters" FunctionProperty = Prelude.Map Prelude.Text ParameterDetailProperty set newValue FunctionProperty {..} = FunctionProperty {parameters = Prelude.pure newValue, ..} instance Property "RequireConfirmation" FunctionProperty where type PropertyType "RequireConfirmation" FunctionProperty = Value Prelude.Text set newValue FunctionProperty {..} = FunctionProperty {requireConfirmation = Prelude.pure newValue, ..}