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, List<?> enumValues)Creates a new instance ofInputVariable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InputVariablebuild(String name, Class<?> type, String description, String defaultValue, List<?> enumValues, boolean required)Creates a new instance ofInputVariable.booleanequals(Object obj)StringgetDefaultValue()Gets the default value of the input variable.StringgetDescription()Gets the description of the input variable.List<?>getEnumValues()Gets the possible enum values 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.inthashCode()booleanisRequired()Gets whether the input variable is required.
-
-
-
Constructor Detail
-
InputVariable
public InputVariable(String name, String type, @Nullable String description, @Nullable String defaultValue, boolean isRequired, @Nullable List<?> enumValues)
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 requiredenumValues- the enum values of the input variable
-
InputVariable
public InputVariable(String name)
Creates a new instance ofInputVariable.- Parameters:
name- the name of the input variable
-
-
Method Detail
-
build
public static InputVariable build(String name, Class<?> type, @Nullable String description, @Nullable String defaultValue, @Nullable List<?> enumValues, boolean required)
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 variablerequired- whether the input variable is required- Returns:
- a new instance of
InputVariable
-
getName
public String getName()
Gets the name of the input variable.- Returns:
- the name 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
-
getType
public String getType()
Gets the type of the input variable.- Returns:
- the type of the input variable
-
getTypeClass
public Class<?> getTypeClass()
Gets the class of the type of the input variable.- Returns:
- the class of the type of the input variable
-
-