Class JsonSchemaOutputObjectProperty
java.lang.Object
de.xima.fc.prompt.service.support.JsonSchemaOutputObjectProperty
- All Implemented Interfaces:
Serializable
One of the properties of a JSON object schema, used in
JsonSchemaOutputByPropertyList.- Since:
- 8.5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the description of the property.getName()Gets the name of the property the JSON object should have.getType()Gets the data type of the property.booleanWhether the property is required or optional.voidsetDescription(String description) Sets the description of the property.voidSets the name of the property the JSON object should have.voidsetRequired(boolean required) Sets whether the property is required or optional.voidSets the data type of the property.
-
Constructor Details
-
JsonSchemaOutputObjectProperty
public JsonSchemaOutputObjectProperty()
-
-
Method Details
-
getDescription
Gets the description of the property. This is optional, but may be useful to aid the prompt service provider in understanding the purpose of the property.- Returns:
- The description of the property.
-
setDescription
Sets the description of the property. This is optional, but may be useful to aid the prompt service provider in understanding the purpose of the property.- Parameters:
description- The description of the property.
-
getName
Gets the name of the property the JSON object should have.- Returns:
- The name of the property.
-
setName
Sets the name of the property the JSON object should have.- Parameters:
name- The name of the property.
-
getType
Gets the data type of the property.- Returns:
- The data type of the property.
-
setType
Sets the data type of the property.- Parameters:
type- The data type of the property.
-
isRequired
public boolean isRequired()Whether the property is required or optional. An optional property may be omitted in the JSON object or set to null.- Returns:
- True if the property is required, false if it is optional.
-
setRequired
public void setRequired(boolean required) Sets whether the property is required or optional. An optional property may be omitted in the JSON object or set to null.- Parameters:
required- True if the property is required, false if it is optional.
-