Class InputVariable
- java.lang.Object
-
- com.microsoft.semantickernel.semanticfunctions.InputVariable
-
public class InputVariable extends Object
Metadata for an input variable of aKernelFunction.
-
-
Constructor Summary
Constructors Constructor Description InputVariable(String name)Creates a new instance ofInputVariable.InputVariable(String name, String type, String description, String defaultValue, boolean isRequired)Creates a new instance ofInputVariable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultValue()Gets the default value of the input variable.StringgetDescription()Gets the description of the input variable.StringgetName()Gets the name of the input variable.StringgetType()Gets the type of the input variable.Class<?>getTypeClass()Gets the class of the type of the input variable.booleanisRequired()Gets whether the input variable is required.
-
-
-
Constructor Detail
-
InputVariable
public InputVariable(String name)
Creates a new instance ofInputVariable.- Parameters:
name- the name of the input variable
-
InputVariable
public InputVariable(String name, String type, @Nullable String description, @Nullable String defaultValue, boolean isRequired)
Creates a new instance ofInputVariable.- Parameters:
name- the name of the input variabletype- the type of the input variabledescription- the description of the input variabledefaultValue- the default value of the input variableisRequired- whether the input variable is required
-
-
Method Detail
-
getName
public String getName()
Gets the name of the input variable.- Returns:
- the name of the input variable
-
getType
public String getType()
Gets the type of the input variable.- Returns:
- the type of the input variable
-
getDescription
@Nullable public String getDescription()
Gets the description of the input variable.- Returns:
- the description of the input variable
-
getDefaultValue
@Nullable public String getDefaultValue()
Gets the default value of the input variable.- Returns:
- the default value of the input variable
-
isRequired
public boolean isRequired()
Gets whether the input variable is required.- Returns:
- whether the input variable is required
-
getTypeClass
public Class<?> getTypeClass()
Gets the class of the type of the input variable.- Returns:
- the class of the type of the input variable
-
-