Class KernelParameterMetadata<T>
- java.lang.Object
-
- com.microsoft.semantickernel.semanticfunctions.KernelParameterMetadata<T>
-
- Type Parameters:
T- The type of the parameter.
public class KernelParameterMetadata<T> extends Object
Metadata for a parameter to a kernel function. The Semantic Kernel creates this metadata from the annotations on the method that defines the function, or by introspection of a Java method.
-
-
Constructor Summary
Constructors Constructor Description KernelParameterMetadata(String name, String description, Class<T> parameterType, String defaultValue, boolean isRequired)Creates a new instance of theKernelParameterMetadataclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultValue()Gets the default value of the parameter.StringgetDescription()Gets the description of the parameter.StringgetName()Gets the name of the parameter.Class<?>getType()Gets the type of the parameter.booleanisRequired()Gets whether the parameter is required.
-
-
-
Constructor Detail
-
KernelParameterMetadata
public KernelParameterMetadata(String name, @Nullable String description, Class<T> parameterType, @Nullable String defaultValue, boolean isRequired)
Creates a new instance of theKernelParameterMetadataclass.- Parameters:
name- The name of the parameter.description- The description of the parameter.parameterType- The type of the parameter.defaultValue- The default value of the parameter.isRequired- Whether the parameter is required.
-
-
Method Detail
-
getName
public String getName()
Gets the name of the parameter.- Returns:
- The name of the parameter.
-
getDescription
@Nullable public String getDescription()
Gets the description of the parameter.- Returns:
- The description of the parameter.
-
getDefaultValue
@Nullable public String getDefaultValue()
Gets the default value of the parameter.- Returns:
- The default value of the parameter.
-
isRequired
public boolean isRequired()
Gets whether the parameter is required.- Returns:
- Whether the parameter is required.
-
getType
public Class<?> getType()
Gets the type of the parameter.- Returns:
- The type of the parameter.
-
-