Record Class AiToolParameter
java.lang.Object
java.lang.Record
com.suncode.pwfl.ai.tool.AiToolParameter
-
Constructor Summary
ConstructorsConstructorDescriptionAiToolParameter(String name, String jsonSchemaType, String description, boolean required, String itemsJsonSchemaType) Creates an instance of aAiToolParameterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theitemsJsonSchemaTyperecord component.Returns the value of thejsonSchemaTyperecord component.name()Returns the value of thenamerecord component.static AiToolParameteroptionalArray(String name, String description, String itemsJsonSchemaType) static AiToolParameteroptionalBoolean(String name, String description) static AiToolParameteroptionalInteger(String name, String description) static AiToolParameteroptionalObject(String name, String description) static AiToolParameteroptionalString(String name, String description) booleanrequired()Returns the value of therequiredrecord component.static AiToolParameterrequiredArray(String name, String description, String itemsJsonSchemaType) static AiToolParameterrequiredString(String name, String description) static StringtoJsonSchema(List<AiToolParameter> parameters) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiToolParameter
public AiToolParameter(String name, String jsonSchemaType, String description, boolean required, String itemsJsonSchemaType) Creates an instance of aAiToolParameterrecord class.- Parameters:
name- the value for thenamerecord componentjsonSchemaType- the value for thejsonSchemaTyperecord componentdescription- the value for thedescriptionrecord componentrequired- the value for therequiredrecord componentitemsJsonSchemaType- the value for theitemsJsonSchemaTyperecord component
-
-
Method Details
-
requiredString
-
optionalString
-
optionalInteger
-
optionalBoolean
-
optionalObject
-
requiredArray
public static AiToolParameter requiredArray(String name, String description, String itemsJsonSchemaType) -
optionalArray
public static AiToolParameter optionalArray(String name, String description, String itemsJsonSchemaType) -
toJsonSchema
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
jsonSchemaType
Returns the value of thejsonSchemaTyperecord component.- Returns:
- the value of the
jsonSchemaTyperecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
itemsJsonSchemaType
Returns the value of theitemsJsonSchemaTyperecord component.- Returns:
- the value of the
itemsJsonSchemaTyperecord component
-