Share via


InputVariable Class

  • java.lang.Object
    • com.microsoft.semantickernel.semanticfunctions.InputVariable

public class InputVariable

Metadata for an input variable of a KernelFunction<T>.

Constructor Summary

Constructor Description
InputVariable(String name)

Creates a new instance of InputVariable.

InputVariable(String name, String type, String description, String defaultValue, boolean isRequired, List<?> enumValues)

Creates a new instance of InputVariable.

Method Summary

Modifier and Type Method and Description
static InputVariable build(String name, Class<?> type, String description, String defaultValue, List<?> enumValues, boolean required)

Creates a new instance of InputVariable.

boolean equals(Object obj)
java.lang.String getDefaultValue()

Gets the default value of the input variable.

java.lang.String getDescription()

Gets the description of the input variable.

java.util.List<?> getEnumValues()

Gets the possible enum values of the input variable.

java.lang.String getName()

Gets the name of the input variable.

java.lang.String getType()

Gets the type of the input variable.

java.lang.Class<?> getTypeClass()

Gets the class of the type of the input variable.

int hashCode()
boolean isRequired()

Gets whether the input variable is required.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

InputVariable

public InputVariable(String name)

Creates a new instance of InputVariable.

Parameters:

name - the name of the input variable

InputVariable

public InputVariable(String name, String type, String description, String defaultValue, boolean isRequired, List enumValues)

Creates a new instance of InputVariable.

Parameters:

name - the name of the input variable
type - the type of the input variable
description - the description of the input variable
defaultValue - the default value of the input variable
isRequired - whether the input variable is required
enumValues - the enum values of the input variable

Method Details

build

public static InputVariable build(String name, Class type, String description, String defaultValue, List enumValues, boolean required)

Creates a new instance of InputVariable.

Parameters:

name - the name of the input variable
type - the type of the input variable
description - the description of the input variable
defaultValue - the default value of the input variable
enumValues - the enum values of the input variable
required - whether the input variable is required

Returns:

a new instance of InputVariable

equals

public boolean equals(Object obj)

Overrides:

InputVariable.equals(Object obj)

Parameters:

obj

getDefaultValue

public String getDefaultValue()

Gets the default value of the input variable.

Returns:

the default value of the input variable

getDescription

public String getDescription()

Gets the description of the input variable.

Returns:

the description of the input variable

getEnumValues

public List getEnumValues()

Gets the possible enum values of the input variable.

Returns:

the possible enum values of the input variable

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

getTypeClass

public Class getTypeClass()

Gets the class of the type of the input variable.

Returns:

the class of the type of the input variable

hashCode

public int hashCode()

Overrides:

InputVariable.hashCode()

isRequired

public boolean isRequired()

Gets whether the input variable is required.

Returns:

whether the input variable is required

Applies to